Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Michael Landrup
  Where is Michael Landrup?
 
 Vietnam
 Michael Landrup
 To: onytoo
  Where is onytoo?
 Padang
 Indonesia
 onytoo
 Tags
Subject: RE: how to synthetic data?
Thread ID: 345281 Message ID: 345380 # Views: 47 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, May 23, 2012 4:21:42 AM         
   


> > I have 3 tables of data as shown below. I want a summary of them as only three tables sum up the difference. ask experts for help. thank you very much!
> >
>
>
> Even I don't understand why you combine the result like that
> :)
>
> Try this one
>
>
> create cursor cn1 (code I, value C(1))
> insert into cn1 values (1, 'A')
> insert into cn1 values (2, 'B')
> insert into cn1 values (3, 'C')
> insert into cn1 values (4, 'D')
> insert into cn1 values (5, 'E')
> 
> create cursor cn2 (code I, value C(1))
> insert into cn2 values (1, 'A')
> insert into cn2 values (2, 'F')
> insert into cn2 values (3, 'C')
> insert into cn2 values (4, 'D')
> insert into cn2 values (5, 'E')
> 
> create cursor cn3 (code I, value C(1))
> insert into cn3 values (1, 'A')
> insert into cn3 values (2, 'F')
> insert into cn3 values (3, 'C')
> insert into cn3 values (4, 'D')
> insert into cn3 values (5, 'E')
> 
> select
>     T1.code, ;
>     padr(T1.value + ;
>       iif(T1.value <> T2.value, '/' + T2.value, '') + ;
>       iif(T1.value <> T3.value and T2.value <> T3.value, '/' + T3.value, ''), 5) ;
>   from cn1 T1 ;
>   join cn2 T2 on T1.code=T2.code ;
>   join cn3 T3 on T1.code=T3.code
> 

>
> Regards,
> Onytoo
Thank for response of you.the problem already be resolve However actually i have more than 3 table data (about 60 table) i forgot given number of table in this question. Please help me!

ENTIRE THREAD

how to synthetic data? Posted by Michael Landrup @ 5/22/2012 6:24:11 AM
RE: how to synthetic data? Posted by Anders Altberg @ 5/22/2012 12:46:23 PM
RE: how to synthetic data? Posted by Cetin Basoz @ 5/22/2012 1:45:29 PM
RE: how to synthetic data? Posted by Michael Landrup @ 5/22/2012 4:11:34 PM
RE: how to synthetic data? Posted by Cetin Basoz @ 5/22/2012 7:04:29 PM
RE: how to synthetic data? Posted by Michael Landrup @ 5/23/2012 6:30:58 AM
RE: how to synthetic data? Posted by Cetin Basoz @ 5/23/2012 11:29:30 AM
RE: how to synthetic data? Posted by onytoo @ 5/22/2012 6:20:15 PM
RE: how to synthetic data? Posted by Michael Landrup @ 5/23/2012 4:21:42 AM
RE: how to synthetic data? Posted by Anders Altberg @ 5/23/2012 8:25:22 PM
RE: how to synthetic data? Posted by Michael Landrup @ 5/24/2012 5:21:22 AM