Solved

How do I select data up until the first space ?

Posted on 2009-05-20
1
463 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now