Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Japanese characters as question marks Expand / Collapse
Author
Message
Posted Thursday, April 11, 2013 8:27 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 9:32 AM
Points: 299, Visits: 1,195
Absolutely. Here you go.

https://www.dropbox.com/s/sp6b6kf6z997g55/erikd.csv

Post #1441536
Posted Thursday, April 11, 2013 9:32 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
Where I have your workflow:

1. dbo.LoadPreLoadFromExcel brings the contents of the Excel into a new "load" table
2. dbo.CreateTargetTable creates a new "target" table with typed columns from data in sample_fields (this proc will not create tables with Unicode columns)
3. dbo.LoadTargetFromFile copies data from "load" table created into "target" table
4. dbo.CreateProcessTable creates a new "process" table
5. dbo.LoadProcessfromTarget copies data from "target" to "process" table

I am assuming you sent me the definition for the "process" table because it has NVARCHAR columns and dbo.CreateTargetTable does not know how to create NVARCHAR columns in the "target" table. I think your problem is in the creation of the "target" table, i.e. in step 2 above. Can you please send the table definitions for the "load", "target" and "process" tables for this project, scripted out of SSMS by right-clicking the each and selecting "Script Table As" > "Create" as opposed to a copy/paste from the grid?


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1441554
Posted Thursday, April 11, 2013 9:47 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 9:32 AM
Points: 299, Visits: 1,195
Yeah, I sort of forgot to mention that I numbered them in the order I use them. Heh.

Here's the scripted output you asked for.

https://www.dropbox.com/s/inhtv19uyo04xyk/erikd_tables.zip

I've also included the full table create statement, along with _raw and _load, just in case.

Post #1441562
Posted Thursday, April 11, 2013 10:05 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
As suspected

[Prefix] [varchar](64) NULL,

in the "load" table is the best candidate for causing the issue. Should be NVARCHAR.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1441566
Posted Thursday, April 11, 2013 10:13 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 9:32 AM
Points: 299, Visits: 1,195
The other fields it's occurring in are first name, last name, and company name. Crud.
Post #1441567
Posted Friday, April 12, 2013 3:51 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 7:42 PM
Points: 176, Visits: 528
If I understand correctly, when looking at the same table with different clients, you can see the japanese characters in one, but not in the other? Doesn't that mean the data is in the table, but one client can't handle it properly, so it's a client issue?
Post #1441624
Posted Friday, April 12, 2013 7:57 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 9:32 AM
Points: 299, Visits: 1,195
nick.mcdermaid (4/12/2013)
If I understand correctly, when looking at the same table with different clients, you can see the japanese characters in one, but not in the other? Doesn't that mean the data is in the table, but one client can't handle it properly, so it's a client issue?


Sort of, but not exactly. It was more an issue of the characters converting to question marks from one staging table to another (columns changing from nvarchar to varchar).

The 'correct' data shows as rectangles in SSMS 2005, and Kanji in 2008. So that part is client related.
Post #1441712
Posted Friday, April 12, 2013 8:23 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
erikd (4/11/2013)
The other fields it's occurring in are first name, last name, and company name. Crud.

It should be a quick fix to the cursor declaration I showed above so those columns are generated as NVARCHAR.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1441731
Posted Friday, April 12, 2013 8:38 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 9:32 AM
Points: 299, Visits: 1,195
opc.three (4/12/2013)
erikd (4/11/2013)
The other fields it's occurring in are first name, last name, and company name. Crud.

It should be a quick fix to the cursor declaration I showed above so those columns are generated as NVARCHAR.


You were dead on. I changed and tested the script, and everything works beautifully. Thank you for your time.

Are you aware of a way to write text files as Unicode? The 'default' seems to be ANSI.

Actually, I'm going to start a new thread for that, it's a distinct topic with its own stored procedure.
Post #1441745
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse