Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Unicode and sql

Author  Topic 

pcperera
Starting Member

12 Posts

Posted - 2007-06-25 : 04:19:38
I am new to sql, I have problem with unicode data, I put this to forum, no good answers yet, expecting good results....

How to pass unicode data to stored procedure (Think below SP uni)
How to insert unicode data to table using stored procedure below Uni


I use sql server 2000 personal Edition

Create Table:
/*
create Table TestTable(Col1 nvarchar(20))
*/

Stored Prucedure:

CREATE PROCEDURE Uni
@UnitName nvarchar(20)
AS

INSERT INTO TestTable(Col1) VALUES (@UnitName)

After that I execute query analyser
1. Uni 'Test' – This text going to the table, Its in English, No problem
2. Uni '#3523;#3538;#3458;#3524;#3517;' – this string contains unicode Characters – Problem, when I open the table, this charaters shows like ?????


Refer this stored procedure
CREATE PROCEDURE UniNext
AS
INSERT INTO TestTable(Col1) VALUES (N'#3514;#3540;#3505;#3538; Uni String')

GO
Above displays numbers but, it is a string, I wrote unicode string, this page displays like this
I am inserting Unicode string with N prefix, It is ok

My problem again
How to pass unicode data to stored procedure (Think above SP uni)
How to insert unicode data to table using stored procedure above Uni


You can refer:
http://databases.aspfaq.com/general/why-do-some-sql-strings-have-an-n-prefix.html

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-06-25 : 05:25:23
Already asked here
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=376215


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -