vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We ran into a problem loading access where tables where if we did not select the property allow zero length we got an error message when loading data with some empty values. We are now ramping up SQL server and the question came up will SQL server have the same problem with empty data values. Is there an SQL server equivalent to allow zero length? |
| |||
| SQL-Server will always allow zero length values, unless you explicitely add a constraint to disallow this. So, by default, zero length values are allowed. If you do not want that, you could run ALTER TABLE mytable ADD CONSTRAINT constraintname CHECK (mycol <> '') for each relevant column. Hope this helps, Gert-Jan William Kossack wrote: > > We ran into a problem loading access where tables where if we did not > select the property allow zero length we got an error message when > loading data with some empty values. > > We are now ramping up SQL server and the question came up will SQL > server have the same problem with empty data values. > > Is there an SQL server equivalent to allow zero length? -- (Please reply only to the newsgroup) |
| ||||
| thanks Gert-Jan Strik wrote: > SQL-Server will always allow zero length values, unless you explicitely > add a constraint to disallow this. > > So, by default, zero length values are allowed. If you do not want that, > you could run > > ALTER TABLE mytable > ADD CONSTRAINT constraintname > CHECK (mycol <> '') > > for each relevant column. > > Hope this helps, > Gert-Jan > > William Kossack wrote: > > > > We ran into a problem loading access where tables where if we did not > > select the property allow zero length we got an error message when > > loading data with some empty values. > > > > We are now ramping up SQL server and the question came up will SQL > > server have the same problem with empty data values. > > > > Is there an SQL server equivalent to allow zero length? > > -- > (Please reply only to the newsgroup) |