Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Join 4 tables
Message
From
29/04/2002 07:22:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00650282
Message ID:
00650293
Views:
21
== wouldn't help much. set ansi on.
Cetin

>Hi!
>
>Yes. Try to change "=" to "==" for linking conditions, and assure all *_code field has the same length. Or just use SET EXACT ON command before query running.
>
>>They are characters. Does it make any difference?
>>
>>>Hi!
>>>
>>>What is a type of the fields "*_code" in lookup table and main tables used for joining? Are they character?
>>>
>>>>Hi!
>>>>
>>>>I've created a view with view designer. It has one "Invioice" table and 3 related lookup tables ("customer", "type", "country") all related to "Invioice". I join these tables and select all fields from "Invoice" and "...name" fields from lookup tables ("customer", "type", "country"). In the result cursor the last lookup table's "...name" filed doesn't seem to show the correct names (all the rows shows the same data while the codes in "Invioice" table are different). What can be wrong? The first 2 related tables works fine. I've tried to change the order of the lookup tables but the problem is allways with last table.
>>>>
>>>>SELECT Invoice.*, Customer.cust_name, Type.type_name, Country.count_name;
>>>> FROM data1!Customer INNER JOIN data1!Invoice;
>>>> INNER JOIN data1!Type;
>>>> INNER JOIN data1!Country ;
>>>> ON Country.count_code = Invoice.count_code ;
>>>> ON Type.type_code = Invoice.type_code ;
>>>> ON Customer.cust_code = Invoice.cust_code
>>>>
>>>>Thanks for any help.
Ç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
Reply
Map
View

Click here to load this message in the networking platform