Concatenation using put
Posted: Thu May 26, 2011 4:30 am
I am attempting to put a SQL query into a variable and append it with a variable called LIMITSETTING.
In case you wonder the purpose of this is to allow me to limit the number of records loaded in a datagrid.
Initially I am loading 100 then I have a button to be clicked to load the next 100, and the next 100, and so on...
but the below code is not working:
My final tSQL value should look like this:
SELECT ID,TITLE FROM products LIMIT 0,200
In case you wonder the purpose of this is to allow me to limit the number of records loaded in a datagrid.
Initially I am loading 100 then I have a button to be clicked to load the next 100, and the next 100, and so on...
but the below code is not working:
Code: Select all
put "SELECT ID,TITLE FROM products LIMIT " . LimitSetting into tSQL
SELECT ID,TITLE FROM products LIMIT 0,200