Access query to SQL Server stored procedure

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

UPDATE MONTH, Restrict INNER JOIN (JNLSEXPL INNER JOIN Tbl24 ON (JNLSEXPL.ACRONYM = Tbl24.ACRONYM) AND (JNLSEXPL.OPCO = Tbl24.OPCO)) ON (Restrict.[YEAR TAR] = JNLSEXPL.YEAR) AND (Restrict.[CATEGORY TAR] = JNLSEXPL.CATEGORY) SET JNLSEXPL.bUpdate = 1, JNLSEXPL.PAPCHA = IIf([Forms]![frmExtrapolateTariffs]![Frame63]=1,[Tbl24]![PAPCHA]*[MONTH]![FACTOR],[Tbl24]![PAPCHA]+[MONTH]![FACTOR2]), JNLSEXPL.PAPCUR = [Tbl24]![PAPCUR] WHERE (((Restrict.[SELECT TAR])=True));

Convert the Access query to SQL Server stored procedure

-- Anonymous, February 18, 2000

Answers

Augustine,

Of course, I cannot fully translate here without access to the Access database and its equivalent SQL Server database, but the INNER JOINs will translate directly, the IIf will translate to an If statement and the ! operator is a way of accessing things like form data.

The Access 2000 documentation says this about the ! operator:

The ! operator indicates that what follows is a user-defined item (an element of a collection). For example, use the ! operator to refer to an open form, an open report, or a control on an open form or report.

Identifier Refers to

Forms![Orders] The open Orders form

Reports![Invoice] The open Invoice report

Forms![Orders]![OrderID] The OrderID control on the open Orders form

Hope this helps,

Eric

-- Anonymous, February 28, 2000


Moderation questions? read the FAQ