Re: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-04 Thread Jochem van Dieten
George Abraham wrote: > > SQL Server dows not seem to have a datatype for boolean values. http://register.microsoft.com/mswish/suggestion.asp Ask for ISO/IEC 9075-2:2003 feature T031, "BOOLEAN data type" :-) > I use > the bit data type for it usually, but was wondering if that was one > drawba

Re: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-04 Thread George Abraham
Hmm, SQL Server dows not seem to have a datatype for boolean values. I use the bit data type for it usually, but was wondering if that was one drawback for SQL Server. George > >> True/false, why not use just one bit for it? > > > > I don't know, why not? > > Because a bit does not accept the l

Re: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-04 Thread Jochem van Dieten
James Smith wrote: >>Why allow a INT(13)? So you can allow an INT(1). If you have > > Not true at all, if we are dealing with character length and the maximum > value for an INT is 4294967295 the INT(1) to INT(10) should work, but > INT(13) should throw an error. The number behind the INT is a d

RE: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-04 Thread James Smith
> Why allow a INT(13)? So you can allow an INT(1). If you have Not true at all, if we are dealing with character length and the maximum value for an INT is 4294967295 the INT(1) to INT(10) should work, but INT(13) should throw an error. No program should accept erroneous values and then make up

Re: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread Anders Green
At 01:54 PM 11/3/2004, you wrote: >James Smith wrote: > > INSERT INTO barcodes (Barcode, ItemID) VALUES (0008811953928,17870) > > > > Could anyone tell me why the number 0004294967295 is causing an error > > when the SQL statement doesn't even show it being used? > > Becau

Re: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread Jochem van Dieten
James Smith wrote: > INSERT INTO barcodes (Barcode, ItemID) VALUES (0008811953928,17870) > > Could anyone tell me why the number 0004294967295 is causing an error > when the SQL statement doesn't even show it being used? Because it is 2^32. Instead of throwing an error M

RE: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread James Smith
> >>> INSERT INTO barcodes (Barcode, ItemID) VALUES > (0008811953928,17870) > >>> > >>> Could anyone tell me why the number 0004294967295 is causing an > >>> error > when the SQL statement doesn't even show it being used? > >> > >> Because it is 2^32. Instead of throwing an error MySQL jus

Re: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread Jochem van Dieten
James Smith wrote: >>> INSERT INTO barcodes (Barcode, ItemID) VALUES (0008811953928,17870) >>> >>> Could anyone tell me why the number 0004294967295 is >>> causing an error when the SQL statement doesn't even show it being used? >> >> Because it is 2^32. Instead of throwing an error MySQL

RE: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread James Smith
> I'm not seeing why it happens, but you could simplify your code: > > > INSERT INTO barcodes (Barcode, ItemID) > SELECT Barcode, ItemID > FROM stockitemdetails > Thanks, I was doing that originally but modified it so I could output some values to screen for debug reasons. -- Jay ~

RE: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread James Smith
> > INSERT INTO barcodes (Barcode, ItemID) VALUES (0008811953928,17870) > > > > Could anyone tell me why the number 0004294967295 is > causing an error > > when the SQL statement doesn't even show it being used? > > Because it is 2^32. Instead of throwing an error MySQL just > rounds your valu

RE: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread Pascal Peters
CF-Talk > Subject: Odd SQL Behaviour, errors generated by values I am not trying to > use! > > I am looping over a result set to insert the results into a new table. > > Select Query > > > SELECT Barcode, ItemID, Title > FROM stockitem

Re: Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread Jochem van Dieten
James Smith wrote: > > However the error box lists the SQL statement in question as... > > INSERT INTO barcodes (Barcode, ItemID) VALUES (0008811953928,17870) > > Could anyone tell me why the number 0004294967295 is causing an error when > the SQL statement doesn't even show it being used? Beca

Odd SQL Behaviour, errors generated by values I am not trying to use!

2004-11-03 Thread James Smith
I am looping over a result set to insert the results into a new table. Select Query SELECT Barcode, ItemID, Title FROM stockitemdetails ORDER BY Barcode Insert Query #Select2.ItemID# - #Select2.Barcode# - #Select2.Title# INSERT INTO barcodes (Barcode, Ite