.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

Hi how to select Names from a table which starts with a.. condition is not to use like and wild char

Posted By: jay     Posted Date: June 10, 2010    Points:2   Category :Sql Server
Hi how to select Names from a table which starts with a.. condition is
1. not to use "like" operator
2.and not to use wild characters....





Responses
Author: jay             
Posted Date: June 11, 2010     Points: 5   

hi i got answer we can use substring


select name from tbl_name as a
where upper(substring(ltrim(a.name),1,1))='A'

Author: Deco             
Posted Date: September 11, 2010     Points: 5   

Jay,

we can also use left function

SELECT Name 
FROM tbl_name
WHERE LEFT(Name,1) = 'A'


Regards,
Deco


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend