Start a new topic

@export (problems with End of File)

[This topic is migrated from our old forums. The original author name has been removed]

Always when i am using @export, i have an extra empty line at the end of the file that i am generating, and this line generates me an error when i use this file to import its content. How can i eliminate that line when i am generating this file?(i double check query and results are not giving me empty lines).

[This reply is migrated from our old forums.]

Re: @export (problems with End of File)
Oscar, What script are you executing? I just tried with a simple @export and select and I get no extra line. (Please post the complete script). Also, what DbVis version are you using? Best Regards Roger Edited by: Roger Bjärevall on 2008-aug-13 12:09
[This reply is migrated from our old forums. The original author name has been removed]

Re: @export (problems with End of File)
Roger This is the script i am trying to execute:(Thanks a lot for your help) @export on; @export set filename="c:\Test\export\SalesOrder\${table}.csv" format="csv" CsvIncludeColumnHeader="false" ; select field1, field2, field3,field4,field5,field6 from tlib.as400table where field1 =(month(current timestamp)-1) and field2=day(current timestamp)-1 and field3=year(current timestamp) and field8='D' order by field4 desc; @spool log dbvis.log; -- Saves the Log to a file named dbvis.log @exit;
[This reply is migrated from our old forums.]

Re: @export (problems with End of File)
Oscar, Do you get this empty line even if exporting via the Export function in the grid? I.e. execute the SELECT statement only and then in the grid you find the Export function. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: @export (problems with End of File)
Roger I did execute only SELECT statement and i did not get that line , that is what i did when i first saw empty line for first time into my file.
[This reply is migrated from our old forums.]

Re: @export (problems with End of File)
Oscar, Do like this: o Execute only the SELECT statement in the SQL Commander (no @export commands). o The result is presented in the grid o Right click in the grid and choose "Export..." o Select "CVS" output format and then save the file o Now open the file in Notepad. It the empty line there? o Try import the data but choose "Into Grid" rather than into Database Table. Is the empty line there? Regars Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: @export (problems with End of File)
Roger I did that , and i could see that exporting manually , csv appears without that empty line(i followed all steps you said, now i really dont know what is generating that empty line). Thanks a lot for your time.
[This reply is migrated from our old forums. The original author name has been removed]

Re: @export (problems with End of File)
Hello Roger Any idea why i had that blank line ? i would appreciate so much your help. Best Regards
[This reply is migrated from our old forums.]

Re: @export (problems with End of File)
Oscar, I have tried many combinations now and am unfortunately not able to reproduce... What version of DbVis are you using? Zip one of the files you export and mail it to us: support@minq.se Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: @export (problems with End of File)
Roger I installed last version (6.0.13) and it did not work, i was checking and it seems i dont have a blank line, what is getting is only a change of line after last row, no idea how can i avoid that change of line? Regards
[This reply is migrated from our old forums.]

Re: @export (problems with End of File)
Oscar, Just letting you know that we probably (and finally!) found the reason for this issue. A fix will be available in the next version. Thanks for your patience. Best Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: @export (problems with End of File)
Thanks a lot for your support!!!, Amazing!!
[This reply is migrated from our old forums. The original author name has been removed]

Re: @export (problems with End of File)
Roger I would appreciate that you let me know when fix is ready, is it ready yet? in which version fix is gonna be ready? Thanks a lot for your support!!!
[This reply is migrated from our old forums.]

Re: @export (problems with End of File)
Oscar, The fix is in the new 6.5 version. Best Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: @export (problems with End of File)
Roger Thanks a lot , Seriously you save the job of a lot of guys (5 at least)..jeje Best Regards