开发者

How to increment max number of columns for a select statement **4096**

I would like to do a SELECT Statement with more than 4096 different computations of a big table >= 10 GB. (max is 4096)

Is there a way to increment this value 4096 to 5100. I am asking this beca开发者_JAVA百科use I would like to scan a huge table only once and avoid doing multiple select statements...


I was under the impression that these are hard-coded limits.

The first thought I had was, can you get around it with a union ?

Also, it might help to clarify your wording, are you trying to select > 4096 columns, or > 4096 different calculations ?

What about selecting to XML, does that make a difference ?

To expand on Martins comment, you could do this:

instead of

SELECT A, B, C
  FROM TestTable

try:

SELECT A + '||' + B, C
  FROM TestTable

Then in your application:

var joinedSelect = sqlDataReader[0].split("||");
string columnA = joinedSelect[0];
string columnB = joinedSelect[1];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜