Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic sql ??????

Status
Not open for further replies.

bunmiA

MIS
Apr 20, 2004
27
GB
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..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top