Solved

How do I select data up until the first space ?

Posted on 2009-05-20
1
448 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
Comment Utility

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

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Salesforce.com is a cloud-based customer relationship management (CRM) system. In this article, you will learn how to add and map custom lead and contact fields to your Salesforce instance.
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.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

9 Experts available now in Live!

Get 1:1 Help Now