Results 1 to 6 of 6

Thread: need Cridet account in 2nd line

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    3

    Angry 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

  2. #2
    Lively Member
    Join Date
    Dec 2008
    Location
    Hobart, Tasmania
    Posts
    104

    Re: need Cridet account in 2nd line

    I'm sorry, but your question is incomprehensible.
    Could you please rephrase it?

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    3

    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

  4. #4
    Lively Member
    Join Date
    Dec 2008
    Location
    Hobart, Tasmania
    Posts
    104

    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.

  5. #5
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,226

    Re: need Cridet account in 2nd line

    Quote Originally Posted by jasmin84 View Post
    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

  6. #6

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    3

    Re: need Cridet account in 2nd line

    hi
    i have been made requied query may be it help full also an other user

    SELECT gljl.code_combination_id, entered_dr AS amount_debit, gljl.description,
    gljc.je_category_key,gcck.concatenated_segments
    FROM gl_je_lines gljl, gl_je_headers glh, gl_je_categories_tl gljc
    ,gl_code_combinations_kfv gcck
    WHERE gljc.je_category_key = glh.CONTEXT
    And gcck.CODE_COMBINATION_ID = gljl.CODE_COMBINATION_ID
    and gljl.je_header_id IN (SELECT je_header_id
    FROM gl_je_headers
    WHERE je_category = '1')
    AND gljl.status = 'P'
    AND gljl.je_header_id = glh.je_header_id
    AND (glh.accrual_rev_status IS NULL OR glh.accrual_rev_status <> 'R')
    AND gljl.je_header_id IN (SELECT je_header_id
    FROM gl_je_lines
    ------in p_account_id we can pass debit account number the it will show crieid account with balnacse
    WHERE CODE_COMBINATION_ID = _account_id)
    AND entered_dr <> 0
    AND gcck.CODE_COMBINATION_ID <> _account_id
    AND gljl.je_header_id IN (SELECT je_header_id
    FROM gl_je_headers
    WHERE je_category = '1')
    AND gljl.status = 'P'
    AND gljl.je_header_id = glh.je_header_id
    AND (glh.accrual_rev_status IS NULL OR glh.accrual_rev_status <> 'R')
    AND gljl.je_header_id IN (SELECT je_header_id
    FROM gl_je_lines
    WHERE CODE_COMBINATION_ID = _account_id)
    AND entered_dr <> 0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width