<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://sqlzoo.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://sqlzoo.net/w/index.php?title=INSERT_problems:_incompatible_formats&amp;feed=atom&amp;action=history</id>
		<title>INSERT problems: incompatible formats - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://sqlzoo.net/w/index.php?title=INSERT_problems:_incompatible_formats&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=INSERT_problems:_incompatible_formats&amp;action=history"/>
		<updated>2013-05-21T14:50:51Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.4</generator>

	<entry>
		<id>http://sqlzoo.net/w/index.php?title=INSERT_problems:_incompatible_formats&amp;diff=1460&amp;oldid=prev</id>
		<title>Marek: Created page with &quot;Can't insert data because of incompatable formats. &lt;div class='ht'&gt; &lt;div class=params&gt;schema:scott&lt;/div&gt; &lt;div&gt; If the data inserted is of the wrong type the insert may fail. B...&quot;</title>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=INSERT_problems:_incompatible_formats&amp;diff=1460&amp;oldid=prev"/>
				<updated>2012-07-17T11:13:34Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Can&amp;#039;t insert data because of incompatable formats. &amp;lt;div class=&amp;#039;ht&amp;#039;&amp;gt; &amp;lt;div class=params&amp;gt;schema:scott&amp;lt;/div&amp;gt; &amp;lt;div&amp;gt; If the data inserted is of the wrong type the insert may fail. B...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Can't insert data because of incompatable formats.&lt;br /&gt;
&amp;lt;div class='ht'&amp;gt;&lt;br /&gt;
&amp;lt;div class=params&amp;gt;schema:scott&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
If the data inserted is of the wrong type the insert may fail. Because the date format may depend on the local settings this may cause confusion. Using a 4 digit year and a three character month works for most systems (in English speaking regions).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql class='tidy'&amp;gt;DROP TABLE t_x&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=sql class='setup'&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang='sql' class='def'&amp;gt;CREATE TABLE t_x (x VARCHAR(5), y DATE);&lt;br /&gt;
INSERT INTO t_x VALUES ('abcdef', NULL);&lt;br /&gt;
INSERT INTO t_x VALUES ('ambig', '10-11-12');&lt;br /&gt;
INSERT INTO t_x VALUES ('unamb', '10 Nov 2012');&lt;br /&gt;
SELECT * FROM t_x&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang='sql' class='def e-sqlserver'&amp;gt;CREATE TABLE t_x (x VARCHAR(5), y DATETIME);&lt;br /&gt;
INSERT INTO t_x VALUES ('abcdef', NULL);&lt;br /&gt;
INSERT INTO t_x VALUES ('ambig', '10-11-12');&lt;br /&gt;
INSERT INTO t_x VALUES ('unamb', '10 Nov 2012');&lt;br /&gt;
SELECT * FROM t_x&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang='sql' class='def e-access'&amp;gt;CREATE TABLE t_x (x VARCHAR(5), y DATETIME);&lt;br /&gt;
INSERT INTO t_x VALUES ('abcdef', NULL);&lt;br /&gt;
INSERT INTO t_x VALUES ('ambig', '10-11-12');&lt;br /&gt;
INSERT INTO t_x VALUES ('unamb', '10 Nov 2012');&lt;br /&gt;
SELECT * FROM t_x&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-access&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The string 'abcdef' is accepted but truncated. The date &lt;br /&gt;
'10-11-12' is accepted (as UK format).&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-oracle&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The string 'abcdef' is reject - too long for the &lt;br /&gt;
VARCHAR(5), '10-11-12' is rejected as a date&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-postgres&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The string 'abcdef' is accepted - but truncated. The date&lt;br /&gt;
'10-11-12' is accepted (as a UK format).&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-mysql&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The string 'abcdef' is accepted but truncated. The date&lt;br /&gt;
'10-11-12 is accepted as 12th Nov 2010, the date '10 Nov 2012' is not&lt;br /&gt;
recognised - instead the New Year's day 1 BC is used&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-sqlserver&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The string 'abcdedf' is rejected (too long). The date&lt;br /&gt;
'10-11-12' is accepted (as US format).&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{INSERT and DELETE ref}}&lt;/div&gt;</summary>
		<author><name>Marek</name></author>	</entry>

	</feed>