Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Rerieving the file name

Author  Topic 

sql_2k
Starting Member

26 Posts

Posted - 2008-02-17 : 14:03:37
Please share your thoughts for retrieving the file name q.dat from the field of the table as explained below without using any UDF in SQl query.

Ex - Table has a field say FileName = 'C\xxx\aaa\zzz\Q.dat'

regards,
Rani.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-17 : 16:22:17
Use REVERSE, CHARINDEX and SUBSTRING built-in functions.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-18 : 03:14:46
or with some trick using parsename function

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sql_2k
Starting Member

26 Posts

Posted - 2008-02-18 : 13:07:47
ParseName function works.

Many Thanks.
Go to Top of Page
   

- Advertisement -