Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select problem
Message
From
08/08/2006 09:43:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
08/08/2006 09:19:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01143760
Message ID:
01143770
Views:
8
>i have three table
>
>TB_GLTRANS (id int,origin c(20),acc_per int,acc_year int) , TB_GLTRANSD (id int,idaccount int,mnt_cre n(8,2),mnt_deb n(8,2)) and i got the account table TB_GLACCOUNT(id int,accountno c(10))
>
>I want to make a select but im not sure how to do it. For the result i want all the account with all the transaction(TB_GLTRANSD) for a determined acc_per and acc_year. So a account who does have a transaction i want to see it in the list.
>
>So the result must be TB_GLACCOUNT.id,TB_GLACCOUNT.accountno,TB_GLTRANS.id,TB_GLTRANS.acc_per,TB_GLTRANS.acc_year,
>TB_GLTRANSD.MNT_CRE,TB_GLTRANSD.mnt_deb
>
>Thanks you

Your tables' fields are not very clear. Anyway might be like:
select ;
 TB_GLACCOUNT.id,TB_GLACCOUNT.accountno,TB_GLTRANS.id,;
 TB_GLTRANS.acc_per,TB_GLTRANS.acc_year, ;
 TB_GLTRANSD.MNT_CRE,TB_GLTRANSD.mnt_deb ;
 from TB_GLACCOUNT ;
   inner join TB_GLTRANSD on TB_GLACCOUNT.id = TB_GLTRANSD.idaccount ;
   inner join TB_GLTRANS on TB_GLTRANSD.id  = TB_GLTRANS.id ;
 where TB_GLTRANS.acc_per == < per value > and ;
  TB_GLTRANS.acc_year == < year value >
Cetin
Ç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