Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

issue with reload script?

Hi, I make example from "Getting Started with QlikView-20090924 1602"

My script is.

OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=SDBSF01;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=O-PC;Use Encryption for Data=False;Tag with column collation when possible=False];

SQL SELECT *

FROM DB NAME.dbo."table name$Customer";

SQL SELECT "Closed at Date",

"Customer No_",

"Due Date",

"Pmt_ Discount Date",

"Posting Date",

"Sales (LCY)",

"Sales Amount"

FROM DB NAME.dbo."table name$Cust_ Ledger Entry";

And work!


Example script is.

OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=SDBSF01;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=O-PC;Use Encryption for Data=False;Tag with column collation when possible=False];

SQL SELECT *

FROM DB NAME.dbo."table name$Customer";

SQL SELECT "Closed at Date",

"Customer No_",

"Date(Due Date) as Due Date",

"Month(Due Date) as Month",

"Year(Due Date) as Year",

"Pmt_ Discount Date",

"Posting Date",

"Sales (LCY)",

"Sales Amount"

FROM DB NAME.dbo."table name$Cust_ Ledger Entry";

And not work.

I think the problem is in syntax! But where? Can help me someone, please.

Error: Click

Thank you.

1 Solution

Accepted Solutions
Not applicable
Author

Hi, the double-quotes are the problem. For the SQL-Server the whole string between the " is the fieldname. So try it similar to e.g. Month("Due Date") as Month,

For my oppinion a better way would be using the "raw" SQL and do formatting and renameing with an preceding Load Statement.

Regards Roland

View solution in original post

2 Replies
Not applicable
Author

Hi, the double-quotes are the problem. For the SQL-Server the whole string between the " is the fieldname. So try it similar to e.g. Month("Due Date") as Month,

For my oppinion a better way would be using the "raw" SQL and do formatting and renameing with an preceding Load Statement.

Regards Roland

Not applicable
Author

Thank you!

I must learn SQL language and syntax. ! Embarrassed