Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving data from multiple tables
Message
From
20/09/2005 05:08:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
20/09/2005 05:02:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01051149
Message ID:
01051167
Views:
9
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform