Re: sql2k Collation problems.
- From: "Adrian Parker" <apparker@xxxxxxxxxxxxx>
- Date: Fri, 9 Dec 2005 09:02:12 -0000
Of course it will have the Latin1_General_CI_AS collation as you've
explicitly said to use it, but you should not have to specify it and it
should take the database default. It is not, it is taking the sql server
instance collation instead.
All we can do at this point is change all of our functions to add "COLLATE
database_default" after each return parameter declaration.
But it is still a bug.. See "Specifying Collations" in the SQL Server Books
Online.
"Parameters for stored procedures or functions, user-defined data types, and
variables are assigned the default collation of the database: "
"Sophie Guo [MSFT]" <v-sguo@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:1q%23FITJ$FHA.1240@xxxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> I tested the issue on my side and I reproduce the issue. However, I think
> it is a normal behavior as the function's collation is same as the table's
> collation since the function returns a table.
>
> For example, if running the following command in Query Analyzer:
>
> create FUNCTION dbo.myfunc ()
> RETURNS @Result table ( rescol varchar(10) collate Latin1_General_CI_AS)
> AS
> BEGIN
> INSERT @Result
> SELECT 'A'
> RETURN
> END
> GO
>
> Sp_help myfunc
>
> We will find that the function's collation is Latin1_General_CI_AS instead
> of the SQL server instance's collation.
>
> For more information, you may want to refer to the Functions topic and the
> "Collation Precedence" topic in SQL server 2000 books online.
>
> I hope the information is helpful.
>
> Sophie Guo
> Microsoft Online Partner Support
>
> Get Secure! - www.microsoft.com/security
>
> =====================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
.
- Follow-Ups:
- Re: sql2k Collation problems.
- From: Sophie Guo [MSFT]
- Re: sql2k Collation problems.
- References:
- sql2k Collation problems.
- From: Adrian Parker
- RE: sql2k Collation problems.
- From: Sophie Guo [MSFT]
- Re: sql2k Collation problems.
- From: Adrian Parker
- Re: sql2k Collation problems.
- From: Sophie Guo [MSFT]
- sql2k Collation problems.
- Prev by Date: Re: sql2k Collation problems.
- Next by Date: Re: sql server 2000 backup and restore
- Previous by thread: Re: sql2k Collation problems.
- Next by thread: Re: sql2k Collation problems.
- Index(es):
Relevant Pages
|
Loading