Ryszard Musielak
Member
Hello,
I am extracting some data into a CSV files using SQLEXP. Goes into a text file (I just rename is as .CSV) and I use the comma as a delimiter. Some columns are fine, Excel understands them, but some are opened in Excel with data padded, so the Excel output looks more padded to the right, even though I try to use the LTRIM function to strip out any blanks. Here is the bare output in the SQLEXP session:
When I use DBeaver, this is not the case.
Here are the column types:
CREATE TABLE PUB."supplier" (
"supp-code" varchar(20) NOT NULL,
"supp-name" varchar(60),
"supp-add" varchar(208),
"curr-code" varchar(8),
Any suggesitons?
Attached is a sample record I see in Excel .
Thanks,
Richard
I am extracting some data into a CSV files using SQLEXP. Goes into a text file (I just rename is as .CSV) and I use the comma as a delimiter. Some columns are fine, Excel understands them, but some are opened in Excel with data padded, so the Excel output looks more padded to the right, even though I try to use the LTRIM function to strip out any blanks. Here is the bare output in the SQLEXP session:
Code:
SELECT ltrim(s."supp-name")||',',
ltrim(s."supp-add",s."supp-code")
FROM pub.supplier s
WHERE s."curr-code" = 'GBP'
and s."supp-code" = 'A10000';
Code:
1> 2> 3> 4> concat(ltrim(supp-name),,) ltrim(supp-add,supp-code)
------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
RXXXXX Ltd , TURNPIKE WAY;HIGH TOWN;RRRRR;PO22 4CL
When I use DBeaver, this is not the case.
Here are the column types:
CREATE TABLE PUB."supplier" (
"supp-code" varchar(20) NOT NULL,
"supp-name" varchar(60),
"supp-add" varchar(208),
"curr-code" varchar(8),
Any suggesitons?
Attached is a sample record I see in Excel .

Thanks,
Richard
Last edited: