Hello,

I saw a number of posts describing similar problems, however was not able 
to fine a solution...

My program receives a tab-separated file from a 3rd party (which I cannot 
modify) , which sometimes has double-quotes surrounding values.
I've attached a sample file to this email. I'm using CSVREAD to import the 
file as an H2 database table for further downstream processing.
The problem is that the downstream logic depends on empty strings 
(including "") being converted to NULL values.

No matter what I try - I'm not able to convert empty strings represented by 
two double-quotes "" between tabs to NULL values in database table :(

I tried many things including passing ||CHAR(34)||CHAR(34)|| to nullString 
parameter, but nothing works...
Looks like a bug?
-------
DROP TABLE IF EXISTS sample_table;

CREATE MEMORY TABLE IF NOT EXISTS sample_tab;le 
AS SELECT * FROM CSVREAD('sample_tsv_with_double_quotes.csv',null,
'caseSensitiveColumnNames=true charset=UTF-8 nullString="" fieldSeparator= 
');

SELECT * FROM sample_table ;
-------
(sample input file is attached)

Any help is appreciated!

Thank You!
Oleg

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/LmV7tuExSOkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Campaign	Campaign Daily Budget	Languages	Geo Targeting	Ad Group	Max CPC	Max Content CPC	Placement Max CPC	Max CPM	Max CPA	Keyword	Keyword Type	First Page CPC	Quality Score	Headline	Description Line 1	Description Line 2	Display URL	Destination URL	Campaign Status	AdGroup Status	Creative Status	Keyword Status	Suggested Changes	Comment
"onestop-hobo_bags-products-ps"	"0.00"	"en"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	""	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Abbey Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Aces Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Aggie Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Aggie Wallets: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo AimToFreeze Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Alda Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Alda Wallets: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Alicia Clutches: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Alicia Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Ally Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Ally Wristlets: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Alton Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Amica Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Amica Wallets: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Ana Clutches: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Ana Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Angela Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""
"onestop-hobo_bags-products-ps"	""	""	""	"Hobo Angelica Handbags: Model"	""	""	""	""	""	""	""	""	""	""	""	""	""	""	"Active"	"Active"	""	""	"add"	""

Reply via email to