Handling national language prefix for checkconstraints
Posted
by
Chris Chilvers
on Stack Overflow
See other posts from Stack Overflow
or by Chris Chilvers
Published on 2011-11-30T17:47:37Z
Indexed on
2011/11/30
17:52 UTC
Read the original article
Hit count: 353
I'm trying to create a check constraint such as CHECK Type IN (N'Create', N'Remove')
for an enumeration's value.
Sqlite complains about this syntax and only accepts CHECK Type IN ('Create', 'Remove')
.
The main database will be Sql Server 2005, but I use sqlite's in memory database for unit tests.
Is there any way to get sqlite to recognise the national language (N) prefix? Alternatively, is there an easy way when using FluentNHibernate to adapt an nvarchar constant to match the database's dialect?
© Stack Overflow or respective owner