STRING Manipulation - select to right of a pattern

Last Post 15 Aug 2008 05:57 AM by mickgough. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
mickgough
New Member
New Member

--
13 Aug 2008 09:27 AM
Hi Folks,
I have an Oracle connection string value to connect from SQL2005 database to an Oracle database through Linked Server.

@MyOracleConnString = 'LINKEDSERVERNAME..SCHEMANAME.TABLENAME'

Basically I need to strip off the linked server name and dots
to get SCHEMANAME.TABLENAME string to the right of the dots ..
Just need SCHEMANAME.TABLENAME
Any ideas?
Thx M
SwePeso
New Member
New Member

--
13 Aug 2008 10:24 AM
Use PARSENAME function.


PARSENAME(@MyOracleConnString, 2) + '.' + PARSENAME(@MyOracleConnString, 1)
mickgough
New Member
New Member

--
15 Aug 2008 05:57 AM
Thanks Pesomannen..Perfect!


Acceptable Use Policy
---