By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,412 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,412 IT Pros & Developers. It's quick & easy.

connecting multiple table

P: 30

i have 4 tables. and what to some fields from each table.
for example. i have Period , Debit and Credit fields in Gl table and Acccount field in Accounts table. i want to get the debit & credit values for selected date.

how can i do this.

i have written the query as follows. but this didn't came gives all the Account in Accounts table. not for selected table. don't know what was the wrong.

select Period,Debit,Credit,Account from Gl,Accounts where period='1'

actually i want to join all the 4 tables. but don't know how to combine this two tables. So please some one help me with this problem
Dec 10 '09 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 2,878
Here, read this

Good luck!!!

--- CK
Dec 10 '09 #2

P: 149
select a.*,x.* from accounts a
inner join
(select g.* from gl g
inner join Period p
on g.Period = p.Period
where p.Period = '01/01/2009') x
on a.AccountLink = x.AccountLink
Dec 11 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.