-
Apr 17th, 2012, 07:06 AM
#1
Thread Starter
New Member
need Cridet account in 2nd line
i have debit account and debilt amount but i need my account to wich account with Credit EXPL
Account NO, DEbit, Credit
117740 1500
12450 1500
plz help mee
-
Apr 22nd, 2012, 12:02 AM
#2
Lively Member
Re: need Cridet account in 2nd line
I'm sorry, but your question is incomprehensible.
Could you please rephrase it?
-
Apr 22nd, 2012, 06:21 AM
#3
Thread Starter
New Member
Re: need Cridet account in 2nd line
I need one query who calculate debit and credit
One of account has to be debit but from where that account credit ???
line query plz define how can i get credit account in debit account line
Exmpl
Account no , debit amount, Credit amount
1123 15000
1321 -10000
1546 -5000
Now just clear me how can I make query in same conditions
-
Apr 22nd, 2012, 10:03 AM
#4
Lively Member
Re: need Cridet account in 2nd line
Sorry I still don't understand...
The "database" has just those three fields in it?
ie just account no, debit amount, credit amount....
I'd expect a balance field somewhere, don't you think?
I still don't understand what you want to do...
do you want to find out which accounts are in credit....
or are in debit...
or whether a particular account is in debit or credit?
Or something else?
We need more information as to:
what information are you are wanting to get returned?
What database are you using?
Are you using another program to connect to it?... ie vb6... .net, etc?
some actual data... a few rows at least... the sample data you provided seems to have three fields but only two are populated... one is the account no, the other looks like a balance, but could be a credit or a debit row....
In general though, in case you are unfamiliar with a database like SQL server or the like....... a SQL query would work sort of like this...
Code:
SELECT DebitAmount from databaseName where account = '1123'
which would return the debit amount for account no 1123....(assuming there is only 1 account number 1123).
or
Code:
SELECT AccountNo from databaseName where DebitAmount > 0
to return a list of accounts that have a debit amount of more than zero...
If you are not familiar with databases, I'd suggest reading up on them in some of the links in this forum.
A great one posted by Si the geek is here:
http://www.vbforums.com/showthread.php?t=337051
Hope this helps.
-
Apr 23rd, 2012, 12:24 PM
#5
Re: need Cridet account in 2nd line
Originally Posted by jasmin84
I need one query who calculate debit and credit
One of account has to be debit but from where that account credit ???
line query plz define how can i get credit account in debit account line
Exmpl
Account no , debit amount, Credit amount
1123 15000
1321 -10000
1546 -5000
Now just clear me how can I make query in same conditions
You wish to run a select query that will give you the sum of debits / credits for each account and the balance? Is that correct?
Code:
Select [account no], sum([debit amount]), sum([credit amount]), sum([credit amount]) - sum([debit amount]) from [tablename]
group by [account no]
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Apr 26th, 2012, 01:15 AM
#6
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|