Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem faced with v$session and Concat !!

Status
Not open for further replies.

meeradevi

Programmer
Oct 24, 2005
6
US
I want to net send a message to logged on users:

select distinct 'net send ' || substr(machine,instr(machine,'\')+1) || ' This is a test' ,machine from v$session
where terminal is not null


If my machine name is "ABC\MEERA" I expect the outpout to be "net send MEERA This is a test"

but I am getting "net send MEERA" only.

But if the machine name is "RAAJI" without "\" , I am getting the expected result "net send RAAJI This is a test"

How do I overcome this issue ?


 
Meeradevi,

My exact copy and paste of your code works fine (as expected) on my machine. Could you please do a copy and paste from your screen of both the code (as it runs from SQL*Plus) and the resulting output? Then perhaps we can be of more assistance.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Hi Santa....you are back !! :))

I have copied the exact code from my machine but the only difference is that the machine names in the actual database are bigger (for example) : CDT\BNSEN9238743

 
Thanks (I was out to a meeting this afternoon.)

So, could you please paste the exact display of your code and the output from your SQL*Plus session? It's not that I don't believe what you are saying...I just need to see what I've requested, if that works for you.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top