Solved

How do I select data up until the first space ?

Posted on 2009-05-20
1
475 Views
Last Modified: 2013-12-18
Hi,
My query is : select name from v$archived_log ;

X:\ORADATA\ARCHIVELOGS\1_7141_678967666.ARC
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=FTSDBGRD)(PORT=1521)))(CONNECT_DATA(SERVICE_NAME=guard_XPT.REGRESS.RDBMS.DEV.US.ORACLE.COM)(INSTANCE_NA
ME=facts)(SERVER=dedicated)))

I only want the log name X:\ORADATA\ARCHIVELOGS\1_7141_678967666.ARC  
not the tns connect string. Can I use substr and instr commands ? if so how ?
thanks.
0
Comment
Question by:partyon
1 Comment
 
LVL 11

Accepted Solution

by:
climbgunks earned 250 total points
ID: 24434210

SELECT SUBSTR(name, 1, INSTR(name, ' ')-1) FROM dual;

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle 12c database link between pdb not working 20 76
clob to char in oracle 3 39
Sql Join Problem 2 43
Create a MySQL table as easily as possible 6 37
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question