Hi Guys,
This is kind of a general question, but I am puzzled as to why this is happening. I have this query (Please don't assault me over the table names. I did not design this thing, and I don't have time to change hundreds of queries to reflect the field and table names I would've used).
Which works fine. However, when I typed it, the main subquery (T) was in parentheses (not brackets) and did not have the period before AS T.
This query, as it exists now, I cannot alter. I needed to remove the where clause, and when I did, I got a message saying 'Syntax Error In Update Statement'.
I was able to update the query by typing it as I did before (with the parentheses and no period), but I don't really understand
a. Why the changes when it saves?
and b. Why in the saved format can I not change it?
Am I getting close to making it too complex for the jet engine?
Any and all insights much appreciated.
Thanks,
Alex
Ignorance of certain subjects is a great part of wisdom
This is kind of a general question, but I am puzzled as to why this is happening. I have this query (Please don't assault me over the table names. I did not design this thing, and I don't have time to change hundreds of queries to reflect the field and table names I would've used).
Code:
UPDATE InputData AS U INNER JOIN [select b.ID, b.[Plan Code], a.CODE as 2007Code
FROM
(
select y.*, z.PRODUCT
from InputData y
INNER JOIN [tbl PlanCodes] z
on y.[Plan Code] = z.code
and y.[STATE] = z.[STATEABBR]
)
b
INNER JOIN
(
select * from [tbl PlanCodes] where YEAR = 2007
)
a
on b.PRODUCT = a.PRODUCT
and
b.STATE = a.STATEABBR
]. AS T ON U.ID = T.ID SET U.[Plan Code] = T.[2007Code]
WHERE SourceFileName like 'IVR*';
Which works fine. However, when I typed it, the main subquery (T) was in parentheses (not brackets) and did not have the period before AS T.
This query, as it exists now, I cannot alter. I needed to remove the where clause, and when I did, I got a message saying 'Syntax Error In Update Statement'.
I was able to update the query by typing it as I did before (with the parentheses and no period), but I don't really understand
a. Why the changes when it saves?
and b. Why in the saved format can I not change it?
Am I getting close to making it too complex for the jet engine?
Any and all insights much appreciated.
Thanks,
Alex
Ignorance of certain subjects is a great part of wisdom