Add multiple columns not working

[expired user #7521]'s profile image [expired user #7521] posted 10 years ago in General Permalink
Adding multiple columns to table on mssql is generating

ALTER TABLE "dbo"."Wins_process_run_cache1"
ADD "Column 6" VARCHAR(8000) NULL,
ADD "Column 7" VARCHAR(8000) NULL,
ADD "Column 8" VARCHAR(8000) NULL;

can you make it generate this or tell me if there's a compatibility setting to make it generate properly?

ALTER TABLE "dbo"."Wins_process_run_cache1"
ADD "Column 6" VARCHAR(8000) NULL,
"Column 7" VARCHAR(8000) NULL,
"Column 8" VARCHAR(8000) NULL;
Code modification/commit from ansgar.becker, 10 years ago, revision 8.2.0.4683
MSSQL wants one ALTER TABLE query per ADD/CHANGE COLUMN. See http://www.heidisql.com/forum.php?t=14421
ansgar's profile image ansgar posted 10 years ago Permalink
Should be fixed in r4683
[expired user #7521]'s profile image [expired user #7521] posted 10 years ago Permalink
Its fixed but while testing this, I noticed that drop has the same issue as add. Its generating this

ALTER TABLE "dbo"."aaa"
DROP COLUMN "Column 8",
DROP COLUMN "Column 9",
DROP COLUMN "Column 10";

needs to be

ALTER TABLE "dbo"."aaa"
DROP COLUMN "Column 21",
COLUMN "Column 12",
COLUMN "Column 13",
COLUMN "Column 14";

Sorry to be repetitive.
ansgar's profile image ansgar posted 10 years ago Permalink
Yes, thanks for the hint. No need to be sorry - I oversaw that tiny detail again...
Code modification/commit from ansgar.becker, 10 years ago, revision 8.2.0.4688
MSSQL wants one ALTER TABLE query also per DROP COLUMN. See http://www.heidisql.com/forum.php?t=14421
ansgar's profile image ansgar posted 10 years ago Permalink
Fixed in r4688

Please login to leave a reply, or register at first.