Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! I am trying to load data into a QLikView document but I am facing some problems since it seems that during load, data type are "discarded". Example: I have a "Contract Number" that is a varchar, but when I try to load contract # = "1" and contract #="01", for the document both #'s are the same: "1".
Any ideas will be welcome.
Regards,
Gilberto.
Use the text function -- text([Contract Number]) as [Contract Number]) -- to preserve the leading 0.
-Rob
Use the text function -- text([Contract Number]) as [Contract Number]) -- to preserve the leading 0.
-Rob
Rob,
Thanks for the advice, but the problem is during data load and in the load script "text" is not recognized as a valid function name.
Regards,
Gilberto.
Are you using a preceding load?
Load text([Contract Number]) as [Contract Number];
SQL SELECT *
FROM SQLDATA_TABLE;
Thank you! This worked. Just a comment: since I have to include many fields more than the "Contract Number", the syntax for the Load and the Select should be:
Load text([Contract Number]) as [Contract Number], Other_Field1, Other Field3;
SQL SELECT *
From SQLDATA_TABLE;
yes, that is the sintax, but '*' works too, but be carfeful, because if you do this, maybe QV gives you an error Duplicate Names are not allowed, because you used an alias with the same name of the original field
This should be work fine
Load
*,
text([Contract Number]) as [Contract Number Text]
;
SQL SELECT *
From SQLDATA_TABLE;
bye