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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Unicode import

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-02 : 10:44:41
Mark writes "I'll try to keep this a SQL Server-specific issue, but it relates to importing from Access, so I apologize for in advance for any Access references.

I have an Access table that is used for doing some type of conversions and cross-referencing of a lot of scientific units of measurement. Our dbas want to import this into SQL Server 7.0. There is a field in the table "factor" (type memo) that contains a description of the unit of measurement. For example, the description for Angstrom reads like this: 10⁻¹⁰ m (exactly)

In the above description, the system substitutes squares for the values it can't display. In the case above, the first sqaure is a superscript minus sign and the second square is a superscript zero. I think you'd say "ten to the minus ten meters is the length of one angstrom."

Well, these formulae display perfectly in Access (but I admit I can't even paste them from one table to another). I have tried working with the AscB and AscW functions to parse every character, but I am not sure what I would do with the values.

When I import the table into SQL Server, the squares above turn into question marks.

My question: Is there a way to get them properly stored in SQL Server?

I can send you the Access database if it would help.

Thank you for your time.

Mark"

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-05-02 : 11:08:04
No help on the Access side, I'm afraid, but the Unicode string for that particular example can be constructed by:
SELECT N'10' + NCHAR(0x207B) + NCHAR(0x00B9) + NCHAR(0x2070) + N'm'
You'll need to store it in an nchar, nvarchar or ntext column. (Unless you're willing to store it as UTF-8 live with SQL Server misunderstanding what you're doing!)

Most standard Windows fonts don't have any glyphs for the superscript minus or superscript zero, but Arial Unicode and Lucida Sans Unicode both do.

Just tried it from an Access 2000 memo column into a SQL Server 2000 ntext column using DTS and it worked fine for me.


Go to Top of Page

Weezy
Starting Member

3 Posts

Posted - 2002-05-02 : 11:28:26
Thank you very much. This is a lot more info than I expected.

Regards,
Mark

Go to Top of Page
   

- Advertisement -