[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

INSERTING UNICODE DATA IN SYBASE TABLE

Posted on 2004-10-27
10
Medium Priority
?
1,463 Views
Last Modified: 2012-06-21
Hi,

I have created my Sybase Server on win 2k machine the codepage of the database is UTF8
what i want is to insert japnese utf 8 data in a tabel which i have created in Sybase
can anybody help me how to go about it
thanks in advance

Charandeep
0
Comment
Question by:charan_leo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
10 Comments
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 12440862
Hi, I've held off answering because I didn't quite understand your question, but I see after a couple of days no-one else has responded.

What are you asking for help with? If you are using ASE 12.0+, you have configured the Sybase character set to utf8, and you have created the datatypes you want to put the data in as unichar (or possibly nchar/nvarchar), then you should be able to load the data as you would any other character data.

ie. insert it as literal text
bcp the data in from a file

I'm not sure I've understood what the problem is...?
0
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 12440866
The System Administration Guide has a chapter on internationalisation and code sets that might be helpful to you...

http://sybooks.sybase.com/onlinebooks/group-as/asg1251e/sag

Chapter 7.
0
 

Author Comment

by:charan_leo
ID: 12441251
Hi,

Thanks for the help you have given
i have installed adaptive server 12.5.2  on win 2k advanced server and now i have confugured my database server to UTF 8 as the charset of the database
what i want is to do is insert unicode data in the nvarchar field in a table in sybase
how do i do that?
if i use isql then try and insert isql to input unicode data in a table with nvarchar field i am not able to do it

plzz tell me how to go about it
0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 12441269
Can you show us exactly what it is you're doing, and what error messages you get when it fails?
0
 

Author Comment

by:charan_leo
ID: 12441364
i have created a tabel like this

CREATE TABLE rware.dbo.cq_employee2 (

emp_id                          int                                not null  ,

name                            nvarchar(300)                      not null  ,

comments                        nvarchar(300)                      not null  ,

job_descr                       nvarchar(300)                      not null  ,

index_flags                     int                                not null  
)

now i want to insert unicode data i.e data in japnese language in name comments and job_descr
when i copy the unicode data and paste it in isql there r just ???? appear in place of the actual data
i am not able to insert the actual unicode data
there is no error as such but instead of actual data i get only ????? in place of unicode data in tabel as well

can u tell me how to insert actual unicode data in it
0
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 12441473
I'm wondering if that's an issue with the codepage of the isql or the command prompt session you are running isql in.

Try adding

-Jutf8

to your isql command line. This will indicate the isql client itself is using utf8 as its codepage.

We can confirm that the server character set is correct if you run

sp_helpsort

Check what it reports the default character set as. (You may have installed utf8 but not made it the default.)

I'd also try creating a table and defining the columns as unichar rather than nvarchar:

CREATE TABLE rware.dbo.cq_employee2 (
emp_id                          int                                not null  ,
name                            univarchar(300)             not null  ,
comments                     univarchar(300)             not null  ,
job_descr                      univarchar(300)             not null  ,
index_flags                    int                                not null  
)

Try that both with and without -Jutf8 on the isql command line.

Lastly, try using a GUI client like SQL Advantage that ships with the Sybase client you've installed on your server. This could just be an issue with isql, which doesn't really have a lot of capabilities...

Good luck!
0
 

Author Comment

by:charan_leo
ID: 12441694
i have tried with -jutf8
and also sp_helpsort it gives me the following output
1> sp_helpsort
2> go

 Collation Name                 Collation ID
 ------------------------------ ------------
 defaultml                                 0
 thaidict                                  1
 utf8bin                                   4
 altnoacc                                 39
 altdict                                  45
 altnocsp                                 46
 scandict                                 47
 scannocp                                 48
 binary                                   50
 dict                                     51
 nocase                                   52
 nocasep                                  53
 noaccent                                 54
 espdict                                  55
 espnocs                                  56
 espnoac                                  57
 rusnocs                                  59
 cyrnocs                                  64
 elldict                                  65
 hundict                                  69
 hunnoac                                  70
 hunnocs                                  71
 turknoac                                 73
 turknocs                                 74

 Loadable Sort Table Name
 ------------------------------

Sort Order Description

 ------------------------------------------------------------------
 Character Set = 190, utf8
     Unicode 3.0.1 UTF-8 Character Set
     Class 2 Character Set
 Sort Order = 50, bin_utf8
     Binary sort order for the ISO 10646-1, UTF-8 multibyte encodin
     g character set (utf8).
(return status = 0)
1>

the gui sql advantage which you have told me can you tell me the URL from where i can download the SQL advantage from
i think you r right may be this is an issue with isql can u tell me the url of the GUI client which you arer talkin from where to download it
SQL Advantage
0
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 200 total points
ID: 12441744
sp_helpsort is showing the correct information, so your ASE is configured correctly.

Try with the columns as uni(var)char rather than nvarchar.

SQL Advantage is included with the Sybase ASE CDs. It's on the client CD.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever run into that annoying problem where the computer won't boot?  Wouldn't it be great if you had a tool that would make that disk boot again?  I have found one tool that works more often than not ...
While there are many new features for iOS 11, these are the five that can improve your digital lifestyle.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question