0

Hi

I need Help in SQL. I've created a VB Project of Accounting, Using Access as a Backend database, In database I've 2 tables:

Table 1: Trans
Table 2: Trans_Details

Following Fields are in "Trans"

FieldName (Type) FieldName (Type) FieldName (Type)
Vno (Text) Vdate (Date) VNarr (Text)


Following Fields are in "Trans_Details"
FieldName (Type) FieldName (Type) FieldName (Type) FieldName(Type)
Vno (Text) AccId (Text) DebitAmnt (Number)CreditAmnt(Number)


What i need is a SQL query which give me All Transactions of particular AccId for a specific range of range of dates.

Please Help me on to this.

Waiting for anyone's quick response


Ahmed

2
Contributors
3
Replies
4
Views
11 Years
Discussion Span
Last Post by mnemtsas
0

This should work for the command text for a command object in ADO

Parameters Date1 DateTime;Date2 DateTime;SELECT * FROM Trans_Details INNER JOIN Trans ON Trans_Details.Vno=Trans.Vno WHERE Trans.Vdate>=Date1 AND Trans.Vdate<=Date2

0

Hi mnemtsas,

Thanx for your reply. The code you've given will reult all Transaction within a specific range. What i want is All Transaction in a specific range AND a AccId specified.


waiting for reply.

Ahmed

0

Parameters Date1 DateTime;Date2 DateTime;Account Text;SELECT * FROM Trans_Details INNER JOIN Trans ON Trans_Details.Vno=Trans.Vno WHERE Trans.Vdate>=Date1 AND Trans.Vdate<=Date2 and Accid=Account;

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.