Skip to main content
Announcements
Discover what’s possible with embedded analytics! March 6, 10 AM ET SIGN UP!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ErrorMsg: Incorrect syntax near 'LOAD'

Hi - I am new to Qlik and attempting to create a date calendar, I keep getting an error message.  Can someone please assist?

Microsoft OLD DB provider SQL Server, ErrorMsg: Incorrect syntax near 'LOAD'

LOAD

num(Floor(R.date_written)) AS Initial_Date,

Date(Floor(R.date_written)) AS Calendar_Date,

Year(R.date_written) AS Year,

'W' & Ceil(Month(R.date_written) /3) AS Quarter,

Month((R.date_written) AS Month,

Day(R.date_written) AS Day,

Week(R.date_written AS Week,

WeekStart(R.date_written) AS Week Start

;

Any help is appreciated

8 Replies
Not applicable
Author

You are missing closing parenthesis in the Week(r.date_written) line

Not applicable
Author

Sorry, that was a typo.  Even with the parenthesis, it still does not work.

Not applicable
Author

next possibility. error message indicates a sql server error. Load is not a sql server command. I would assume your command would be a SQL SELECT and not a load if coming from database.

Not applicable
Author

Look at your Month(

Replace

Month((R.date_written) AS Month,

with

Month(R.date_written) AS Month,

prma7799
Master III
Master III

Hi,

Try this

LOAD

num(Floor(R.date_written)) AS Initial_Date,

Date(Floor(R.date_written)) AS Calendar_Date,

Year(R.date_written) AS Year,

'W' & Ceil(Month(R.date_written) /3) AS Quarter,

Month(R.date_written) AS Month,

Day(R.date_written) AS Day,

Week(R.date_written) AS Week,

WeekStart(R.date_written) AS Week_Start

;

Thanks,

Prashant

Anonymous
Not applicable
Author

Hi,

am i missing something or there is no table specified in load statement.

i think it should be resident table syntax at the end of load statement.

Regards

Neetha

rajeshvaswani77
Specialist III
Specialist III

Hi Chris,

Specify load from what.

I see an OLEDB error, I think before this there is a connection statement. Do you get Connected displayed?

Is the connection failing?

Also did not see SQL for table as well as any spreadsheet, what is your source?

thanks,

Rajesh Vaswani

Not applicable
Author

Hi Chris,

Do specify the source connection, that is from where its loaded!

Regards,

Barathiraja