Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Binod Binani
  Where is Binod Binani?
 Kolkata
 India
 Binod Binani
 Tags
Subject: RE: sql DR/CR Seprate Colms from a Table
Thread ID: 131667 Message ID: 131674 # Views: 40 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Monday, May 14, 2007 1:45:07 PM         
   


> My dbf file "cbj99.dbf" is attached
>
> I don't know what is the wrong in query, I m not getting proper result.
> As in Dbf File ACD="I0003" (have three records but it shows four records.
>
>
SELECT cbj99.acd  as CODE_DR,;
>        CBJ99.date as dr_date,;
>        CBJ99.Amt  as dr_Amt,;
>        crcbj.acd  as Code_cr,;  
>        crcbj.date as cr_date,;
>        crcbj.Amt  as cr_Amt;
> From CBJ99 FULL JOIN CBJ99 crcbj ON CBJ99.ACD = crcbj.ACD .AND. CRCBJ.DC='C';
> where CBJ99.DC='D' INTO TABLE ledgers ORDER BY 1

>
>
>
>
> *Exchange of One $ Create only same one $, But Exchage of one Ideas Makes different two Ideas*
> http://www.foxite.com/uploads/8dc39f06-50ea-4cc7-8d58-c18aacca11be.zip

Binod,

Not sure what you are trying to do here. It looks like you are joining the table to itself. Try removing the "CBJ99" from after the JOIN. You already have that table in the FROM.

SELECT ... ;
   FROM cbj99 ;
      FULL JOIN crcbj ON cbj99.acd = crcbj.acd ;
   WHERE crcbj.dc = [C] ;
   ORDER BY 1 ;
   INTO TABLE ledgers 


Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

COMPLETE THREAD

sql DR/CR Seprate Colms from a Table Posted by Binod Binani @ 5/14/2007 1:27:07 PM
RE: sql DR/CR Seprate Colms from a Table Posted by Ken Murphy @ 5/14/2007 1:45:07 PM
RE: sql DR/CR Seprate Colms from a Table Posted by Binod Binani @ 5/14/2007 1:59:41 PM
RE: sql DR/CR Seprate Colms from a Table Posted by Pamela Thalacker @ 5/14/2007 10:53:26 PM
RE: sql DR/CR Seprate Colms from a Table Posted by tushar @ 5/14/2007 2:30:02 PM