Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Export VarChar(6500) column Expand / Collapse
Author
Message
Posted Tuesday, October 12, 2010 8:01 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 29, 2014 2:57 AM
Points: 1,093, Visits: 1,222
Hi All,

In a table, I have one column with VarChar(6500). I execute few queries on Remote server to get the result in either CSV or XLS file. However due to such a huge column width, data for the said column is unable to fit in properly. Even I tried to manually copy the resultset from Remote server to local machine, but due to huge data, I am unable to do that. Also I can not perform OPENROWSET due to improper formate of the file.

Does anybody have better idea so that I can get such huge data into either CSV or XLS files?

Thanks in advance,

Mahesh


MH-09-AM-8694
Post #1002831
Posted Thursday, October 21, 2010 9:37 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, February 17, 2013 9:15 PM
Points: 2, Visits: 127
Hi Mahesh,

You can try my method. When I encountered similar issue, I used the following steps to fix it.

Step 1: Add "IMEX = 1 " ,
Like this: OPENROWSET(''MICROSOFT.JET.OLEDB.4.0'',''Excel 8.0;HDR=YES;IMEX=1; DATABASE = 'd:\WorkFolder', [TargetSheetName$] )

Step 2: Modify the value in Windows Registry. Set TypeGuessRows from 8 to 0.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel , TypeGuessRows = 8


And then, Run your program.

I hope that you will get your target
Post #1008940
Posted Friday, October 22, 2010 5:31 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 29, 2014 2:57 AM
Points: 1,093, Visits: 1,222
thank you very much Larry.

-- Mahesh


MH-09-AM-8694
Post #1009092
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse