Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Join
Message
From
07/06/1999 03:36:21
 
 
To
07/06/1999 00:24:24
Narong Tohku
Knownet Co.,Ltd.
Bangkok, Thailand
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Join
Miscellaneous
Thread ID:
00226960
Message ID:
00226977
Views:
23
>Hi..All
>I have problem about Join table...
>I have 2 tabels for these
>Table 1 :
>-----------------------------------------------------------------------------------
>ID NAME DIAG OPERATE
>-----------------------------------------------------------------------------------
>1 Jim 001 A01
>1 Jim 002 A02
>-----------------------------------------------------------------------------------
>Table 2 :
>---------------------
>ID NURSE
>---------------------
>1 Jenny
>1 Anna
>1 Mam
>---------------------
>I want join 2 Table have maximum equal maximum of maximum table
>For this example ..maximum of join table = 3
>----------------------------------------------------------------------------------------------
>ID NAME DIAG OPERATE NURSE
>---------------------------------------------------------------------------------------------
>1 Jim 001 A01 Jenny
>1 Jim 002 A02 Anna
>1 Jim 001 A01 Mam
>----------------------------------------------------------------------------------------------
>OR
>----------------------------------------------------------------------------------------------
>ID NAME DIAG OPERATE NURSE
>---------------------------------------------------------------------------------------------
>1 Jim 001 A01 Jenny
>1 Jim 002 A02 Anna
>1 .NULL. .NULL. .NULL. Mam
>----------------------------------------------------------------------------------------------
>
>How I can do?
>
>Narong

Look at the OUTER JOIN clause.

you'll do something like:

SELE Table1.*, Table2.* FROM Table1 LEFT OUTER JOIN Table2 ON Table1.Pk = Table2.fk.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform