Hi All, I am porting an old MS access system to MS SQL and I am having a slight problem porting the SQL code to the server.
I am using a View in MS SQL server.
I have cust the expression down to just the one field I am trying to deal with, however I am having a few syntax problems, could someone possibly help me?
SELECT Ship_To, If(Substring([Ship_To],1,2)="05","BMW","") AS Expr1
FROM Master;
This is very easy to do in MS Access, I am unsure what I am doing wrong!
Loading
Santhosh Kumar JayaramanPosted Jan 31, 2013, 11:23 AM
SELECT Ship_To,
Case When Substring([Ship_To],1,2)='05' Then 'BMW'
Else '' END AS Expr1
FROM Master
Guest UserPosted Jan 31, 2013, 12:35 PM