June 15, 2005 at 6:34 am
Should be allowed unless the length of column is set to 1 ???? What other data do you have and what kind of error msg do the users get ?
**ASCII stupid question, get a stupid ANSI !!!**
June 15, 2005 at 6:50 am
The field length is set to 3 - so that's not the problem. The users are getting booted from the application. I'm just doing some poking around before I call the Vendor (it's a canned app) and I wasn't sure about whether or not the '-1' was allowed in a char field. Thanks : )
June 16, 2005 at 5:06 am
Yes, -1 can be placed in a char field.
June 16, 2005 at 6:30 am
CREATE TABLE tblFoo (dummycol char(3) NOT NULL)
INSERT tblFoo VALUES (-1)
SELECT dummycol, LEFT(dummycol, 1), SUBSTRING (dummycol, 2, 1) FROM tblFoo
gives
dummycol
-------- ---- ----
-1 - 1
It's the string "-1" not the number -1
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply