Solved

How do I select data up until the first space ?

Posted on 2009-05-20
1
494 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Via a live example, show how to take different types of Oracle backups using RMAN.

730 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