Convert Microsoft Access (JET SQL) to SQL Server (T-SQL)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • olivierd
    New Member
    • Mar 2010
    • 1

    Convert Microsoft Access (JET SQL) to SQL Server (T-SQL)

    hallo, I would like to convert this request from JET SQL into T sql

    UPDATE [Import] INNER JOIN [Dat_XRate]
    ON ([Import].[Mois] = [Dat_XRate].[Mois]
    AND [Import].[annee] = [Dat_XRate].[annee]
    AND [Dat_XRate].[CurS] = 'XOF'
    AND [Dat_XRate].[CurD] = 'USD')
    SET [Valusd] = ((([Valeur] / [Rate] + 0.5) * 100) \1) /100


    It is very simple but each time I want to use a "INNER JOIN" in T SQL I got an error message
    Thx for answer
    Olivier
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    try this...

    Code:
    UPDATE [Import] 
    SET [Valusd] = ((([Valeur] / [Rate] + 0.5) * 100) \1) /100
    FROM IMPORT
    INNER JOIN [Dat_XRate]
    ON ([Import].[Mois] = [Dat_XRate].[Mois]
    AND [Import].[annee] = [Dat_XRate].[annee]
    AND [Dat_XRate].[CurS] = 'XOF'
    AND [Dat_XRate].[CurD] = 'USD')

    Happy Coding!!!

    ~~ CK

    Comment

    Working...