How to store math symbols and text in sql server 2005?

Posted on 2008-10-19
Medium Priority
Last Modified: 2012-05-05
I have an app that reads a text file containing course objectives and stores in SQL db.  When the asp.net 2.0 app reads the word file and converts to .txt.  The math symbols are lost.  This is bad but not tragic if I could update the db by editing the particular objective and inserting the math symbol.

How does one store math symbols along with text?
Question by:vstack
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
  • 2
  • 2
LVL 37

Accepted Solution

momi_sabag earned 800 total points
ID: 22752355
if you use unicode data types (nvarchar) than you could store any symbol you want
you could also load the file directly into sql server and not going through the asp code at all and this way the symbols won't be lost
LVL 70

Assisted Solution

Qlemo earned 1200 total points
ID: 22752363
You are limited to symbols included in a charset. There are many, e.g. greek letters like sigma. If you need more complex things you will have to store PDF, DOC or whatever directly as LOB (binary object type).

Author Comment

ID: 22753002
I hear you.  What we are trying to do is store the objectives so that instructors can map uploaded materials directly to them..  This way, other instructors can search on a particular objective to find appropriate materials, so storing the entire file would not work.

Possibly the unicode types might work.  But how do I create a 'sigma' character, for instance and send it along with, let's say, an update to a particular math objective...

The application is an asp.net 2.0 app.

Maybe this is not possible.

LVL 70

Assisted Solution

Qlemo earned 1200 total points
ID: 22768915
This select does give you several ways to retrieve those chars. To find out Unicode number of chars, you can use the charmap.exe.

select  N'', nchar(0x2211), nchar(8721), nchar(unicode(N''))

Open in new window


Author Comment

ID: 22769913
I'll check this out.  Thanks

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
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: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

777 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