Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 To: Barak Ros
  Where is Barak Ros?
 TLV
 Israel
 Barak Ros
 Tags
Subject: RE: relations
Thread ID: 310873 Message ID: 310876 # Views: 32 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Sunday, June 26, 2011 4:32:56 PM         
   


> >
> >
SELECT 000 as fmyid,l1.fval,l1.fid FROM level1 l1 ;
> > UNION ALL ;
> > SELECT l2a.* FROM level1 l1 ;
> > JOIN level2a l2a ON l1.fid = l2a.fid ;
> > UNION ALL ;
> > SELECT l2b.* FROM level1 l1 ;
> > JOIN level2b l2b ON l1.fid = l2b.fid ;
> > order by 3,1
> > 

> > Reorder fields as necessary.
> >
> > Regards
> > Samir
>
> thanks, but this is not what I need. this is just an example of what I need , but the real tables has diffrent structures, level2a and level2b are diffrent.
> Thanks any way
> Barak

Well, I don't know. That's the only data I had to test with.
Depends how you designed your report, I think. If need 1 cursor, then you must somehow make the fields compatible between tables. There are several functions for that, CAST() should be useful then.

[Edit]
Sorry, didn't see you're using VFP6. No cast() there, but other functions such as trim(), pad(), trans() etc.

Regards
Samir

ENTIRE THREAD

relations Posted by Barak Ros @ 6/26/2011 3:24:06 PM
RE: relations Posted by Samir H. @ 6/26/2011 4:14:09 PM
RE: relations Posted by Barak Ros @ 6/26/2011 4:26:38 PM
RE: relations Posted by Samir H. @ 6/26/2011 4:32:56 PM
RE: relations Posted by Barak Ros @ 6/26/2011 4:38:23 PM
RE: relations Posted by Samir H. @ 6/26/2011 5:05:51 PM
RE: relations Posted by Tamar Granor @ 6/27/2011 10:51:16 PM