H
hmmmm?
I have this query(A) which works fine, however, whenever I make any
modification (e.g. change an alias) to another query used in query(A) the
syntax of QueryA changes and it doesn't work. Here's the query before it
changes:
SELECT T1.PLOT, T1.NUM, T1.GENUS, T1.SPECIES
FROM spp_vol AS T1 INNER JOIN [SELECT PLOT, NUM, MAX(perc_vol) AS MaxVol
FROM spp_vol WHERE FORTYPE="SW" GROUP BY PLOT, NUM]. AS T2 ON
(T1.PLOT=T2.PLOT) AND (T1.NUM=T2.NUM) AND (T1.perc_vol=T2.MaxVol)
WHERE FORTYPE="SW"
GROUP BY T1.PLOT, T1.NUM, GENUS, SPECIES;
and here's the query after
SELECT T1.PLOT, T1.NUM, T1.GENUS, T1.SPECIES
FROM spp_vol AS T1 INNER JOIN [SELECT PLOT, NUM, MAX(perc_vol) AS MaxVol
FROM spp_vol WHERE FORTYPE="SW" GROUP BY PLOT, NUM;] AS T2 ON
(T1.PLOT=T2.PLOT) AND (T1.NUM=T2.NUM) AND (T1.perc_vol=T2.MaxVol)
WHERE FORTYPE="SW"
GROUP BY T1.PLOT, T1.NUM, GENUS, SPECIES;
The only thing that changes is around the embedded SELECT....so "]. AS T2"
changes to ";] AS T2"
It's not a huge issue to change it back and save it, however is REALLY
annoying and I want to understand why it's happening.
Thanks
modification (e.g. change an alias) to another query used in query(A) the
syntax of QueryA changes and it doesn't work. Here's the query before it
changes:
SELECT T1.PLOT, T1.NUM, T1.GENUS, T1.SPECIES
FROM spp_vol AS T1 INNER JOIN [SELECT PLOT, NUM, MAX(perc_vol) AS MaxVol
FROM spp_vol WHERE FORTYPE="SW" GROUP BY PLOT, NUM]. AS T2 ON
(T1.PLOT=T2.PLOT) AND (T1.NUM=T2.NUM) AND (T1.perc_vol=T2.MaxVol)
WHERE FORTYPE="SW"
GROUP BY T1.PLOT, T1.NUM, GENUS, SPECIES;
and here's the query after
SELECT T1.PLOT, T1.NUM, T1.GENUS, T1.SPECIES
FROM spp_vol AS T1 INNER JOIN [SELECT PLOT, NUM, MAX(perc_vol) AS MaxVol
FROM spp_vol WHERE FORTYPE="SW" GROUP BY PLOT, NUM;] AS T2 ON
(T1.PLOT=T2.PLOT) AND (T1.NUM=T2.NUM) AND (T1.perc_vol=T2.MaxVol)
WHERE FORTYPE="SW"
GROUP BY T1.PLOT, T1.NUM, GENUS, SPECIES;
The only thing that changes is around the embedded SELECT....so "]. AS T2"
changes to ";] AS T2"
It's not a huge issue to change it back and save it, however is REALLY
annoying and I want to understand why it's happening.
Thanks