#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Query

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 1 November 29th 05 01:44 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM
Stop to modify the SQL query manually entered into query ! Olivier Rollet Excel Programming 6 November 3rd 04 08:34 AM


All times are GMT +1. The time now is 01:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"