Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sanjnep
Posting Yak Master
191 Posts |
Posted - 2007-06-15 : 15:26:53
|
| I need to create some tables dynamically using sp_executesql. But the problem is the length of sql string is more the 4000 characters. How can I solve this problem?Thanks |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-06-15 : 15:34:52
|
| Create table in 4000 characters then alter it with another 4000 characters. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-06-15 : 15:42:20
|
| Or how about redesigning your schema so that you don't have tables with this many characters in it? Is your database properly normalized? Why do you need to create tables dynamically?Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-16 : 00:50:43
|
quote: Originally posted by sanjnep I need to create some tables dynamically using sp_executesql. But the problem is the length of sql string is more the 4000 characters. How can I solve this problem?Thanks
You should avoid creating tables dynamicallyOtherwise you will end up with too much dynamic SQLAlso you should use Dynamic SQL only if you want to pass object names as parameterswww.sommarskog.se/dynamic_sql.htmlMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|