Thread: Query
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Abdul[_2_] Abdul[_2_] is offline
external usenet poster
 
Posts: 137
Default Query

Sorry for my bad quick typing

This is what I use

SELECT T1.[Posting Date], T1.[Document No_], T1.[Account No_], T2.Name,
T1.Description, Round(T1.[Debit Amount],2) AS DebitAmount,
Round(T1.[Credit Amount],2) AS CreditAmount, T1.[Shortcut Dimension 1
Code], T1.[Shortcut Dimension 2 Code]
FROM Journal_Num AS T1 INNER JOIN T2 ON T1.[Account No_] = T2.No_
WHERE (([Account No_] Like "12345*"));

But it gives me only one side.

I need both side for this transaction, that is debit and credit. Since
on the credit side [Account No_] will not be 12345*

How I can get both debit and credit if either debit [Account No_] or
credit [Account No_] is 12345*

Thanks




Mark J wrote:
you need to post your question in greater detail and try spellcheck, it does
wonders for the rest of us.

"Abdul" wrote:

Hi All,

I am trying to get data from an accountig sql Table.

I want to get all documents if the account no is 112200 in either debit
or credit side.
sau if document1 debit side account no is 112200 the i want to get
bothe debit and credit side of that transaction

thanks