Discussion Board for collaboration on QlikView Scripting.
I have the following piece of code for extracting from the DB and it works ok
However it does not concat the "trx-no" within the string and I get no error message
Any idea why I can't join the trx-no to the rest of the string?
Go to Solution.
Try casting it as a varchar instead of char and supply an argument that is matches the max expected length of the field.
even if you use varchar(20) and it only takes up 3 digits, it will drop the extras. I think it may be the lack of length argument that is causing your problems.
are you sure that trx-no is not null or empty?
I was about to suggest bringing throught that field (with CAST statement) on its own to see if indeed that was the situation.
Try replacing the double quotes in your SQL statement with open and close square brackets. The SQL engine could be interpreting your double quotes as string values rather than column names.
Also, try copying and pasting everything after the SQL keyword into SQL Server Management Studio and running directly against the DB. Better error feedback that way.
Yes I am sure
trx-no is always available, no nulls or empty data
I tried that but no luck I'm afraid
trx-no loads no problem with all values, however when I change to
CAST("trx-no" AS CHAR) AS trx-no
All values are blank??
maybe I'll try CONVERT
... what about your query if you adda anew column trx-no?
Is it visible?
There is anoher solution:
Do the same with Qlik so:
Can you bring it through without the CAST and make the concatenation in a preceding load?
EDIT: As Alessandro says !