I would like to use a user-defined variable in the FROM part of a query like in the example below :
SET @year = 2013,
@ID3_1 = 107001001,
@TableSource = "S_EXPO_RISQUES_METEO";
SELECT @ID3_1,
@year,
TS.ID_TER,
TS.VALUE
FROM @TableSource TS;
How can I produce the equivalent result with an other statement ?