>Cetin, Thanks for your reply.
>
>This code i m using for MS Sql Server with Vfp,
>while i m executing this code i m getting that
>error no. is '1526',the column prefix 'Table1' does not match with a table name or
>alias used in the query.
>
>regards
>Abdulla
You lost me there. So:
1) Are you looking for SQL server code or VFP code?
2) What's your actual table names?
*SQL server
Select t1.FirstName As Fname ,
t1.SecondName As SName,
'PinDet' = CASE
WHEN Len(t1.pinCode) > 0 THEN t2.PinDes
ELSE t1.City
END
From myTable1 t1
left join myTable2 t2 on t1.PinCode = t2.PinCode
Cetin