Link to home
Start Free TrialLog in
Avatar of flynny
flynnyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

varchar(0) Length or precision specification 0 is invalid. MSSQL

Hi all,

I am trying to export a database structure from MYSQL and import to MSSQL.

Now I am getting the above error on creating tables with varchar(0).

what should i replace this with? (i assume a BIT?)/
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

>on creating tables with varchar(0).
Curiosity overwhelms me ... what would be an example of a character value with zero characters in it?

You're going to need a number that is the maximum amount of characters you forsee going into that value.
For example:  First names -15, last names-25, US Zip codes-10.

Tell us the values that will go into this column, and we'll recommend an appropriate data type.
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of flynny

ASKER

Hi Kent,

thanks for that I assumed it was zero based, hence a bit