-
Notifications
You must be signed in to change notification settings - Fork 22
Error: 'CREATE VIEW' must be the first statement in a query batch. #42
Comments
@justinlettau do you think this is a bug? I still get the error using SSC PUSH production. |
I found out that I can change the IF exists lines and CREATE VIEW with 'CREATE OR ALTER VIEW'. This works fine for me! |
@DanielOverdevest Yeah, I do think it's a bug. I believe it has to do with how the queries are executed on push. I'm glad the |
@DanielOverdevest Can you reproduce this with in the latest version? The |
Hi Justin,
I will, next week. Ok?
GR. Daniel
… On 16 Jan 2019, at 22:42, Justin Lettau ***@***.***> wrote:
@DanielOverdevest <https://github.com/DanielOverdevest> Can you reproduce this with in the latest version? The push command is designed to separate statements by the GO and execute each segment separately; So in theory this error shouldn't occur.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#42 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ARsGeDRlFmKer0WNg4-E816pk2jXdPFQks5vD5y2gaJpZM4Wt8nZ>.
|
@DanielOverdevest Thanks! |
Hi Justin,I installed the latest version (2.1.0 and 2.1.1) and both are not working anymore with Azure SQL database (basic tier). I think you’re using functions which are not implemented in that version of SQL server.If you can give me some hints where to look at, I’m willing to dive a bit deeper in the problem and test for a solution.GR.Daniel
|
@DanielOverdevest The only issue I am aware of with Azure SQL is regarding jobs (#65). Is the error your getting look related to jobs? If so, this config should address it: {
"output": {
"jobs": false
}
} If not, could you provide some details about the error you are seeing? Thanks. |
I tried it out with the latest version (I had to wait until I need to push anything into production). When I find time I'm gonna change the pull request which fixed this problem using this statement: Thanks for the 2.1.1. update by the way. Clustered Indexes of multiple columns are now better captured. UPDATE: changing it to CREATE OR ALTER also returns the same error. So solution must be found in the way it't sent to the server and GO's, what you already suggested. |
Type
What kind of issue is this?
Current Behavior
It's not possible to deploy a view into another database, using
ssc push production
Gives this error code:
It looks like the current situation doesn't allow to run two statements in a single batch.
Example view:
Expected behavior
Expected to create the view for me.
Steps to Reproduce
Environment: Azure SQL Database (latest version)
ssc pull development
ssc push production
Other Information
The text was updated successfully, but these errors were encountered: