Skip to Content
author's profile photo Former Member
Former Member

need some help with a sql query

Hello how can give me some help making a query?

Ik want to have a table to do a check if a wrong Vat code is used on a transaction

so i need to have:

Vatcode chartoff acount vat amont amont vat date

A2 8010 19 100 010405

this what I did:

SELECT T0.TransId, T0.ShortName, T1.Code,T1.Rate,T0.Debit, T0.Credit,T0.VatAmount, T0.SYSVatSum FROM JDT1 T0, OVTG T1 WHERE T0.Account=8010

who can give me some help?

thanks Jacques

jd@comm-co.com

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 26, 2005 at 04:54 AM

    Hi!

    i suppose that is you are lookin' for:

    SELECT 
    	T0.TransId, 
    	T0.ShortName, 
    	T1.Code,
    	T1.Rate,
    	T0.Debit, 
    	T0.Credit,
    	(T0.Debit-T0.Credit)*T1.Rate/100,
    	(T0.SysDeb-T0.SysCred)*T1.Rate/100
    FROM 
    	JDT1 T0
    	LEFT JOIN OVTG T1 ON
    		T1.Code = T0.VatGroup
    WHERE 
    	T0.Account = N'xxx'

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.