DROP TABLE IF EXISTS dbo.MyTable flagged as invalid
steveculshaw
Posts: 16 Bronze 2
I'm getting an error from SQL Prompt when I try and format my SQL, yet the SQL runs Ok ...
The error is from the statement ...
This is with SQL Prompt v7.2.0.260
The error is from the statement ...
DROP TABLE IF EXISTS dbo.MyTable
This is with SQL Prompt v7.2.0.260
Cheers,
SteveC.
SteveC.
Comments
You’re correct but unfortunately the formatting system in v7.2 doesn’t fully support SQL Server 2016 syntax.
The upcoming v7.3 beta’s formatting system will support this syntax but since IF EXISTS is quite simple I’ll look into adding support for it in v7.2 now.
Thanks
Ali
SteveC.
I’ve had a look at supporting IF EXISTS in Prompt’s current formatting system. Unfortunately, because we’re in the middle of transitioning to a new and improved formatting system, backporting syntax support at this point is quite complex.
This new formatting system supports IF EXISTS and will be released in the next Prompt beta. Sorry for the delay.
Thanks
Ali
CREATE TABLE #temp
(
test VARCHAR(20)
)
DROP TABLE IF EXISTS #temp
I'm unable to reproduce the issue here. It might be that the new formatting feature isn't turned on. Please could you check that "SQL Prompt > Options > Labs > Experimental features > Use new formatting styles" is on?
Many thanks
Harry
Enabling the new formatting styles resolved my issue. Thanks for the resolution!