Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I use a loop to build up a SQL string to be sent to SQL server via OLE DB. The loops works fine - when I "capture" the SQL before it gets sent to the database and then paste it into Query Analyzer - it runs and returns results.
If I limit the loop to generate a SQL string of less then 165,000 (approximate) characters it runs throught in QlikView, but over that the script fails withou error.
The question then is - is there a limit to the length of an SQL string the QlikView can handle.
Yea, you should always use a column list, not SELECT *.
Agreed, thanks.
One more question. Any idea how I could do the following:
LET lSQLString = 'SELECT REPLACE(REPLACE(W_MobileWeb_Dev.dbo.qmob_values.value_comments,';','-'),':','-') AS value_comments FROM W_MobileWeb_Dev.dbo.qmob_phcs LEFT JOIN W_MobileWeb_Dev.dbo.qmob_values ON W_MobileWeb_Dev.dbo.qmob_values.phcs_id = W_MobileWeb_Dev.dbo.qmob_phcs.id';
SQL $(lSQLString);
The quotes in the SQL statement are causing the quotes in QlikView to indicate the string are conflicting.
I've tried adding quotes, but without success.
Any ideas?
Regards,
Johan
This should work with doubling the quotes inside the string:
LET lSQLString = 'SELECT REPLACE(REPLACE(W_MobileWeb_Dev.dbo.qmob_values.value_comments,'';'',''-''),'':'',''-'') AS ..'
- Ralf
Excellent!!! Thank you Ralf, your assistance is MUCH appreciated!