Hi all,
Quite probable that this is not an SQL Explorer problem. maybe it is a driver problem.
I'm not sure.
But i want to run the very simple CREATE VIEW statement,
CREATE VIEW MYVIEW
AS
SELECT PATIENTS_ID FROM PATIENTS
And I am getting the very misleading error back,
'CREATE VIEW' must be the first statement in a query batch.
Now obviously that message is nonsense (like most sql error messages) because I am not trying to run a batch of statements. I only have one simple CREATE VIEW statement.
The driver I am using is from the sqljdbc.jar file I downloaded from microsoft...
and until now, it has worked without problem. The class being com.microsoft.sqlserver.jdbc.SQLServerDriver.
What could be the problem? This is driving me nuts!!!
Thanks for any reply.
sean
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just noticed that little checkbox on the right hand side
'Limit Rows'
As soon as I saw that i figured SQL Explorer must be sending a 'LIMIT' command before running my script.
In doing so it breaks my script, because my 'CREATE VIEW' is supposed to be the first statement in a batch.
So the batch I didn't know I had was
LIMIT ROWS 100
CREATE VIEW ....
Therefore causing me trouble.
Unchecking this checkbox now causes me an annoying message box warning me about the multitude of rows that might return after my CREATE VIEW command is executed (yeah right).
This could be improved!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
Quite probable that this is not an SQL Explorer problem. maybe it is a driver problem.
I'm not sure.
But i want to run the very simple CREATE VIEW statement,
CREATE VIEW MYVIEW
AS
SELECT PATIENTS_ID FROM PATIENTS
And I am getting the very misleading error back,
'CREATE VIEW' must be the first statement in a query batch.
Now obviously that message is nonsense (like most sql error messages) because I am not trying to run a batch of statements. I only have one simple CREATE VIEW statement.
The driver I am using is from the sqljdbc.jar file I downloaded from microsoft...
and until now, it has worked without problem. The class being com.microsoft.sqlserver.jdbc.SQLServerDriver.
What could be the problem? This is driving me nuts!!!
Thanks for any reply.
sean
Ok. After a good sleep, I figured it out.
I just noticed that little checkbox on the right hand side
'Limit Rows'
As soon as I saw that i figured SQL Explorer must be sending a 'LIMIT' command before running my script.
In doing so it breaks my script, because my 'CREATE VIEW' is supposed to be the first statement in a batch.
So the batch I didn't know I had was
LIMIT ROWS 100
CREATE VIEW ....
Therefore causing me trouble.
Unchecking this checkbox now causes me an annoying message box warning me about the multitude of rows that might return after my CREATE VIEW command is executed (yeah right).
This could be improved!