Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LOAD
REFERENCE,
QPPRC,
DM,
TM,
DMcast,
TMcast;
SQL SELECT
REFERENCE,
QPPRC,
DM,
TM,
CAST(DM as INTEGER_TYPE) as DMcast,
CAST(TM as REAL_TYPE)as TMcast
FROM database.schema.table3 ;
SQL part is OK for sure. As I know, one can alias fields like that. Otherwise, how to load that field?
I get error: Field 'DMcast' not found.
Any ideas?
First, remove the preceding Load, so you just have an SQL SELECT and nothing else. Do you still get an error?
Probably you still get an error. And if so, it means that the SELECT syntax is not accepted by the driver that you use (ODBC or OLEDB). (The SELECT statement is not evaluated by the Qlik engine. It is sent to the DB driver for evaluation there.)
You can probably remove the Cast() call and use the Qlik functions, e.g. Num#(), to convert the field to an integer.
HIC
First, remove the preceding Load, so you just have an SQL SELECT and nothing else. Do you still get an error?
Probably you still get an error. And if so, it means that the SELECT syntax is not accepted by the driver that you use (ODBC or OLEDB). (The SELECT statement is not evaluated by the Qlik engine. It is sent to the DB driver for evaluation there.)
You can probably remove the Cast() call and use the Qlik functions, e.g. Num#(), to convert the field to an integer.
HIC
Henric,
Your suggestion to check output of only SQL part helped. I aliased fields with lower and upper case letters but DBMS changed them into upper case only. That's why my Load statement couldn't find "DMcast". "DMCAST" works.
BTS. All your blog posts are extremely interesting for beginners like me, thank you!:)