I have a problem trying to run dynamic sql<>?
when running the following query..
'create ' + @dbname + '..tablename etc.
this is all run as dynamic sql. The problem I am having is, the table being created is more than 8000 characters long...(defined as a sql command). The table has over 200 fields. which means I have to split the dynamic sql command in half... i.e
set @comm1 = 'create ' + @dbname + '..tablename etc.
field1 char()2),
.
.
set @comm2 = 'field100 int,
comm3 = @comm1 + @comm2
execute(@comm3)
this doesnt work.. it doesnt seem to like the concatenation.... does anyone have any ideas on this @ all!!!... I've been trying to sort this for a few days now..
when running the following query..
'create ' + @dbname + '..tablename etc.
this is all run as dynamic sql. The problem I am having is, the table being created is more than 8000 characters long...(defined as a sql command). The table has over 200 fields. which means I have to split the dynamic sql command in half... i.e
set @comm1 = 'create ' + @dbname + '..tablename etc.
field1 char()2),
.
.
set @comm2 = 'field100 int,
comm3 = @comm1 + @comm2
execute(@comm3)
this doesnt work.. it doesnt seem to like the concatenation.... does anyone have any ideas on this @ all!!!... I've been trying to sort this for a few days now..