Bugs item #2854722, was opened at 2009-09-09 00:19
Message generated for change (Comment added) made by stmane
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2854722&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: MonetDB5 CVS Head
Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Niels Nes (nielsnes)
Summary: SQL: Adjacent delimiters with copy into, do not create NULL

Initial Comment:
Using:

create table bla(test integer, test2 integer);
COPY 1 RECORDS INTO bla from stdin using delimiters ',', '\n';
1,

I would expect that the it would insert:
1, NULL

Instead:
!SQLException:sql:value '' from line 1 field 2 not inserted, expecting type int
!SQLException:importTable:failed to import table

----------------------------------------------------------------------

>Comment By: Stefan Manegold (stmane)
Date: 2009-09-09 09:42

Message:
Confirming Martin:

sql>create table bla(test integer, test2 integer);
Operation successful
sql>COPY 1 RECORDS INTO bla from stdin using delimiters ',', '\n';
more>1,
!SQLException:sql:value '' while parsing '' from line 0 field 1 not
inserted, expecting type int
!SQLException:importTable:failed to import table
0 tuples
sql>COPY 1 RECORDS INTO bla from stdin using delimiters ',', '\n' NULL as
'';
more>1,
Rows affected 1
sql>select * from bla;
+-------+-------+
| test  | test2 |
+=======+=======+
|     1 |  null |
+-------+-------+
1 tuple
sql>


----------------------------------------------------------------------

Comment By: Martin Kersten (mlkersten)
Date: 2009-09-09 00:27

Message:
The response is correct, because you have not overruled the NULL
representation.
The following might work.

COPY 1 RECORDS INTO bla from stdin using delimiters ',', '\n' NULL as '';


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2854722&group_id=56967

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to