Focal Point
Holding value of SQL into a variable

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9451058331

April 29, 2005, 11:16 AM
thangam
Holding value of SQL into a variable
Can I hold a SELECT QUERY o/p to variable instead of holding to a file so that it can be used to subsequent queries.

E.g SQL
SELECT min(date1) from table

END
April 29, 2005, 03:09 PM
Francis Mariani
Like this:

SET SQLENGINE=SQLMSS
-RUN

SQL
SELECT MAX(MODEL)
FROM WF_REPOS.DBO.CARSQL;
TABLE
ON TABLE HOLD AS HOLD01 FORMAT ALPHA
END
-RUN

-READ HOLD01 &MODEL.A24.

-TYPE MODEL: &MODEL