Re: sql2k Collation problems.



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.
>


.



Relevant Pages

  • Re: SQL7: case sensitivity
    ... In SQL Server 7 you specify the collation on the SERVER level (this is ... changed in SQL Server 2000 where you can specify it down to column level). ... which is supposed to store filenames stored on a Unix ...
    (microsoft.public.sqlserver.programming)
  • RE: Advice on Create a SQL Server
    ... Use the default collation. ... domain, and running on a windows domain account, it is better to run under ... Windows Authentication mode. ... to SQL Server using a username/password. ...
    (microsoft.public.sqlserver.setup)
  • RE: Advice on Create a SQL Server
    ... Use the default collation. ... Mode" - it depends on how you will be connecting to your database. ... domain, and running on a windows domain account, it is better to run under ... to SQL Server using a username/password. ...
    (microsoft.public.sqlserver.setup)
  • Re: Installing SQL_Latin1_General_CP1_CI_AS collation order??
    ... Tibor Karaszi, SQL Server MVP ... "Ward Horsfall" wrote in message ... >> rebuildm.exe) interfaces and a collation designator, ...
    (microsoft.public.sqlserver.setup)
  • Re: Nearest Common Ancestor Report (XDb1s $1000 Challenge)
    ... but even MORE generic than the XDb1 implementation, ... disadvantage that 'john', 'John' and 'JOHN' are treated as three distinct ... Since this is the default collation, I assume that your database will use ... I have SQL Server on my desktop; ...
    (comp.object)

Loading