tsql - AZURE SQL TRUNCATE TABLE PARTITIONS -


i stuck trying

truncate table partitiontable1 (partitions (2, 4, 6 8)); 

that syntax same in msdn here

in vs 2012 latest ssdt , target platform: "microsoft azure sql database v12" error :

"sql46010: incorrect syntax near (. " , mark bracket between "with ( partitions"

i´ve got same error in azure management portal - sql database.

in microsoft sql server management studio error message:

"incorrect syntax near 'with'."

any thought appreciated...

disclaimer: work on sql server tooling team.

there 2 separate issues here, 1 in ssdt , 1 related ssms failure.

  • for ssms failure, problem using azure v1 server/database , syntax isn't supported against v1 dbs. try upgrading server or running against different 1 verify works expected you. there information on upgrading or creating azure v12 databases here.
  • the main ssdt bug because syntax new azure v12 (not available in other sql server version). ssdt uses component called sqldom parse scripts, , current release still uses sql server 2014 rtm version of component. fixed in upcoming preview release support new syntax such this. unfortunately until issue cause statement fail in project system. workaround avoid using new syntax until ssdt updated.

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -