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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

T-SQL

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server
 

Hi,

I have a column having values as

HSBC INDIA

AIRINDIA

CITIBANK

 

I want a query to written only the first part of the value as

HSBC

AIRINDIA

CITIBANK

I tried with this

select SUBSTRING(corporatename,1,charindex(' ',corporatename)) from View_VoucherDetail

but i am only getting HSBC as output

Any Help would be great

 


Thanks and regards, Rishabh


View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

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