Author |
Topic |
Delinda
Constraint Violating Yak Guru
315 Posts |
Posted - 2009-11-17 : 01:26:25
|
so far, me using varchar(8000), but still not enough to store dynamic SQL.i need variable more than varchar(8000), it's possible? me try varchar(max) still not enough |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Delinda
Constraint Violating Yak Guru
315 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Delinda
Constraint Violating Yak Guru
315 Posts |
Posted - 2009-11-17 : 03:23:19
|
quote: Originally posted by tkizer It sounds like you are partitioning manually via multiple tables rather than what SQL Server provides through table partitioning. Have you looked into table partitioning instead, which would just have one base table and many partitions?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog"Let's begin with the premise that everything you've done up until this point is wrong."
Me will looking into Table partitioning. This technology support SQL Server 2000? |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-11-17 : 09:11:21
|
have to do it manually. may want to create a viewCreate View tTrip_ALLASSELECT fields FROM tTrip_200909union allSELECT fields FROM tTrip_200908etc. |
|
|
lhull_sql
Starting Member
1 Post |
Posted - 2009-11-18 : 12:04:02
|
Tara-can you explain why you think it is poorly designed if you need a large dynamic SQL string? We have same problem as one listed above and use many dynamic SQL stored procedures that allow us to have extreme flexibility regarding the parameters passed in and various ways one code base can run because it is dynamic.quote: Originally posted by tkizer You've got a poorly designed system if you need that big of a string for dynamic SQL. Why does it need to be dynamic in the first place?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog"Let's begin with the premise that everything you've done up until this point is wrong."
|
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2009-11-18 : 12:08:50
|
quote: Originally posted by lhull_sql Tara-can you explain why you think it is poorly designed if you need a large dynamic SQL string? We have same problem as one listed above and use many dynamic SQL stored procedures that allow us to have extreme flexibility regarding the parameters passed in and various ways one code base can run because it is dynamic.quote: Originally posted by tkizer You've got a poorly designed system if you need that big of a string for dynamic SQL. Why does it need to be dynamic in the first place?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog"Let's begin with the premise that everything you've done up until this point is wrong."
Start reading here:http://www.sommarskog.se/dynamic_sql.htmlCharlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
|