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

correct this query

hi

while run this query it is showing no data's found

SELECT T1.[ItemCode], T1.[Dscription], T1.[Quantity], T0.[BatchNum], T0.[Located] FROM OIBT T0 inner join IGE1 T1 on T0.[ItemCode] = T1.[ItemCode] WHERE T0.[BaseType] = '60' and T1.[BaseRef]=[%0] GROUP BY T1.[ItemCode], T1.[Dscription], T1.[Quantity], T0.[BatchNum], T0.[Located]

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Nov 09, 2012 at 03:33 AM

    Hi Ramesh

    Try This

    SELECT T0.[ItemCode], T0.[ItemName], T0.[BatchNum], T0.[WhsCode], T0.[Quantity], T1.[Located]

    FROM IBT1 T0

    INNER JOIN OIBT T1 ON T0.BatchNum = T1.Batchnum and T0.Itemcode=T1.ItemCode

    INNER JOIN OITM T2 ON T0.Itemcode = T2.Itemcode

    INNER JOIN IGE1 T4 ON T0.basetype = T4.ObjType and T0.Baseentry = T4.Docentry

    WHERE T4.[BaseRef]=[%0]

    Regards

    Kennedy

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 09, 2012 at 06:41 AM

    Hi

    Find the query

    SELECT T0.[ItemCode], T0.[ItemName], T0.[BatchNum], T0.[WhsCode], T0.[Quantity], T1.[Located]

    FROM IBT1 T0 INNER JOIN OIBT T1 ON T0.BatchNum = T1.Batchnum AND T0.ItemCode = T1.ItemCode ,

    OIGE T2 INNER JOIN IGE1 T3 ON T2.DocEntry = T3.DocEntry

    WHERE T0.BaseNum = T2.DocNum AND T0.ItemCode = T3.ItemCode AND T3.BaseRef ='[%0]'

    Regards

    Jenny

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2012 at 08:25 PM

    Hi,

    Try:

    SELECT T0.ItemCode, T0.ItemName, T0.BatchNum, T0.WhsCode, SUM(T0.Quantity) 'QTY', T1.Located

    FROM IBT1 T0

    INNER JOIN OIBT T1 ON T0.BatchNum = T1.BatchNum and T0.ItemCode=T1.ItemCode

    INNER JOIN OITM T2 ON T0.Itemcode = T2.Itemcode

    INNER JOIN IGE1 T3 ON T0.basetype = T3.ObjType and T0.BaseEntry = T3.DocEntry

    WHERE T3.BaseRef='[%0]'

    GROUP BY T0.ItemCode, T0.ItemName, T0.BatchNum, T0.WhsCode, T1.Located

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 14, 2012 at 01:32 AM

    Hi Ramesh kannan.....

    SELECT T0.DocEntry,T0.DocNum, T1.ItemCode, T1.Dscription,

    T2.BatchNum,T2.Quantity, T1.LineNum

    FROM dbo.OIGE T0

    INNER JOIN dbo.IGE1 T1 ON T0.DocEntry = T1.DocEntry

    INNER JOIN dbo.IBT1 T2 ON T1.ObjType = T2.BaseType

    and T0.DocEntry = T2.BaseEntry

    and T1.LineNum = T2.BaseLinNum

    and T1.ItemCode = T2.ItemCode

    WHERE T1.BaseType = '202'

    and T0.DocNum = '[%0\]'

    ORDER BY T1.LineNum

    Regards

    Kennedy

    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.