locked
Convert MS SQL Query to MS Access RRS feed

  • Question

  • User-1249732592 posted

    I have write a query in MS SQL 2005 but i want to use this query in MS Access.

    My SQL Query doesn't work in MS ACCESS..

    What is exact query for MS Access.

    SELECT a.DATEANDTIME,a.VAL AS 'Batch ID', b.val as 'Set Weight', c.val as 'NET Weight' , d.val as 'Gross Weight'FROM FLOATTABLE as a JOIN Floattable as b on a.dateandtime = b.dateandtime JOIN Floattable as c ON a.dateandtime = c.dateandtime JOIN Floattable as d ON a.dateandtime = d.dateandtime WHERE a.TAGINDEX = 0 AND a.VAL = 1 AND b.TagIndex = 2 AND c.tagindex = 3 AND d.TagIndex = 4


    Wednesday, October 6, 2010 12:31 AM

Answers

  • User-906034138 posted

    SELECT
     a.DATEANDTIME,
     a.VAL AS 'Batch ID',
     b.val as 'Set Weight',
     c.val as 'NET Weight' ,
     d.val as 'Gross Weight'
    FROM
    FLOATTABLE a,Floattable b,Floattable c,Floattable d
    where a.dateandtime = b.dateandtime and a.dateandtime = c.dateandtime and a.dateandtime = d.dateandtime and  a.TAGINDEX = 0
     AND a.VAL = 1 AND b.TagIndex = 2 AND c.tagindex = 3 AND d.TagIndex = 4 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 6, 2010 1:42 AM

All replies

  • User-906034138 posted

    SELECT
     a.DATEANDTIME,
     a.VAL AS 'Batch ID',
     b.val as 'Set Weight',
     c.val as 'NET Weight' ,
     d.val as 'Gross Weight'
    FROM
    FLOATTABLE a,Floattable b,Floattable c,Floattable d
    where a.dateandtime = b.dateandtime and a.dateandtime = c.dateandtime and a.dateandtime = d.dateandtime and  a.TAGINDEX = 0
     AND a.VAL = 1 AND b.TagIndex = 2 AND c.tagindex = 3 AND d.TagIndex = 4 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 6, 2010 1:42 AM
  • User-1249732592 posted

    Thanks parthasbhadra..

    Wednesday, October 6, 2010 1:54 AM