Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need help with a SQL SELECT statement - here it is:
SQL SELECT creationdate as "Order created",
id_case,
model as "WL_model",
"model_name_long",
"model_name_short",
service,
status,
"subsidiary_registered",
repairdate
FROM "_lordwh_global".dbo."v_case";
Now i want to replace the id_case with something like that:
IF(ISNULL(Sum(id_case)),0,Sum(id_case))
How can I implement such a function in the SQL select?
I want to replace all NULL-values with a 0 from the id_case.
Thanks for help!
Yep, I fix it now
load If(Len(id_case) > 0, 1, 0) AS id_case, model as "WL_model", "model_name_long", "model_name_short", service, status, "subsidiary_registered", repairdate;SQL SELECT creationdate as "Order created", id_case, model as "WL_model", "model_name_long", "model_name_short", service, status, "subsidiary_registered", repairdate FROM "_lordwh_global".dbo."v_case";
Anyway, that error is usually because of a missing "," or ";" depending on the type of load you are doing.
Regards.
Thank you. It's working now, but I still can't get my result I want.
QlikView won't let me select the NULL values ...
Do otherwise, and use the where clause to select all null values:
WHERE Len(id_case) = 0
If this doesn't work, you will have to check how your database works with null values, and how your odbc/driver returns them.
Regards.