January 24, 2005 at 5:09 am
Greetings!
I'd like to put a default empty string in string columns so I can make those columns "Not Null". I tried ' ' in the default line to no avail. How would I do that?
Thanks,
SMK
January 24, 2005 at 8:55 am
What I do sometimes is create a User Defined Data type of SQLEmpty (or whatever naming convention is used). Define it as ' ', then use that for the defaults.
Quand on parle du loup, on en voit la queue
January 24, 2005 at 1:00 pm
USE tempdb
CREATE TABLE #t
(
c1 VARCHAR DEFAULT ''
)
INSERT INTO #t DEFAULT VALUES
SELECT * FROM #t
DROP TABLE #t
works for me. However, I think you're doing this with EM. In that case, you might need to place some () around the ''.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 24, 2005 at 1:07 pm
Wow thanks, Frank. That did it. It's usually the little things like that that consume great quantities of time.
SMK
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy