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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Output to .txt - linesize, pagesize Qs (Brett?)

Author  Topic 

scared
Starting Member

14 Posts

Posted - 2007-04-25 : 16:41:54
Last year user X002548 assisted output to txt file

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=68461&SearchTerms=create,file

where he used a BCP shell script to pass outfile specs.

I'm using SQL query writer ODBCview and would like to view the data before loading it into a file, but I'm getting a ?crunch? error.

In other languages you can :

set linesize X (518, in my case)
set space 0
set newpage 0
set pagesize 0
set heading off etc for a clean flat file load.

I'm getting errors using the set command; I think it may be a SQL/Plus function, not native to SQL.

Are there similar functions for setting page specs? Thank you guys so
very much. I'm a noob (4 days old at this now!) and am in awe of the support you provide.

Lisa

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-04-25 : 16:54:49
>> I think it may be a SQL/Plus function,..."

Are you running Oracle?





CODO ERGO SUM
Go to Top of Page

scared
Starting Member

14 Posts

Posted - 2007-04-25 : 17:00:36

Are you running Oracle?
*******

No, MS SQL server. :( thanks again





CODO ERGO SUM
[/quote]
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-04-25 : 17:34:54
What is it you actually need help with?

Are you having trouble using BCP to export data to a file?





CODO ERGO SUM
Go to Top of Page

scared
Starting Member

14 Posts

Posted - 2007-04-25 : 17:50:46
I'm trying to view the (coalesced and converted) data in an ODBC report writer and I'm getting the error output param result -1. Query works fine if I report, say, 80 bytes wide (6 columns or so) but returns the -1 column at 518 bytes long.

I'm wondering if I have to set the line size for viewing the record?
Is there a limit?

Thank you very much, Sir
Lisa

Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-04-25 : 19:02:53
quote:
Originally posted by scared

I'm trying to view the (coalesced and converted) data in an ODBC report writer and I'm getting the error output param result -1. Query works fine if I report, say, 80 bytes wide (6 columns or so) but returns the -1 column at 518 bytes long.

I'm wondering if I have to set the line size for viewing the record?
Is there a limit?

Thank you very much, Sir
Lisa





Your question doesn't seem to be about SQL Server, but about a problem you are having with "an ODBC report writer".

Have you tried to contact the report writer vendor for help with this?





CODO ERGO SUM
Go to Top of Page
   

- Advertisement -