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
 General SQL Server Forums
 New to SQL Server Programming
 Query related to ms-access

Author  Topic 

Soundarya Pampineni
Starting Member

1 Post

Posted - 2009-07-27 : 05:14:23
i have a value in the database as 140/2005.

i need to retrieve only 2005 from database.

so what is the sql query to be written for retrieving only 2005

Thanks in Advance

Regards
Soundarya

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-07-27 : 05:20:16
Substring() function can be used in T-SQl. But i think that can't possible in MS-Access

select substring('140/2005',charindex('/','140/2005')+1,len('140/2005'))

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-07-27 : 05:32:42
Hi Soundarya

Use this...Split(YourText, "/")

-------------------------
R..
Go to Top of Page
   

- Advertisement -