March 19, 2009 at 2:23 pm
If I want to search records starting with '01', this is a possible statement:
SELECT *
FROM TableName
WHERE (LEFT(FieldName, 2) = '01')
What is the statement to retrive records that have '12009' starting in the character 14 ?
March 19, 2009 at 2:27 pm
This isn't a data corruption question (which this forum is about) and looks like a homework question...
Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
March 19, 2009 at 2:38 pm
Sorry Paul Randal. I'm a newbie to the forums. It's a real question to solve a problem at work. I'm going to search for the appropiate forum.
m.torres
March 19, 2009 at 2:45 pm
Look in Books Online under 'LEFT' and it'll give you a link to the String Functions section.
Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
March 19, 2009 at 2:50 pm
Continued here - http://www.sqlservercentral.com/Forums/Topic679935-9-1.aspx
No more replies to this thread please.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply