473,323 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

how to work with macrons and ms sql 2000/2005

prabirchoudhury
162 100+
Hello

I am working on macrons name fields in MSSQL 2000/2005 database and it is not working for the select where fiels is macron. sql could not understand the search the index for the macron field.

any one have any idea how to keep( different format) the macron record and search for that records ..
exam ple code below..

Expand|Select|Wrap|Line Numbers
  1. select * from student where first_name like '%Māori%'”
  2.  
thanks
Jan 13 '10 #1
7 3365
ck9663
2,878 Expert 2GB
What error are you getting? Your code should return all records with first name with that string inside it.

~~ CK
Jan 13 '10 #2
prabirchoudhury
162 100+
Hey CK
thanks for your reply. I am not getting any error but no match return but the matches are in the searching field. testing query is not making any error eather. any idea?

thanks again
Jan 13 '10 #3
prabirchoudhury
162 100+
hello

INSERT INTO dbo.access (student_id,action, table_ref)
VALUES (100,'c', 'Māori')

here i cant insert "Māori" a macron on field into a table the datatype of the field is nvarchar(50)

any idea please, thanks
Jan 13 '10 #4
prabirchoudhury
162 100+
Hello

1. I cant insert a macron on field 'Māori' it is not making any error but just taking the data without macron.
2. even a macron on field is present in the table bit the select query not getting any error but no match return but the matches are in the searching field.

Expand|Select|Wrap|Line Numbers
  1. INSERT INTO student(student_id,action, table_ref)
  2. VALUES (100,'c', 'Māori') 
  3. select * from student where first_name like '%Māori%'
  4.  
many thanks

Prabir
Jan 13 '10 #5
Frinavale
9,735 Expert Mod 8TB
Try changing the first_name field so that it's a nvarchar type instead of a varchar type.

Apparently NVARCHAR is supports two-byte characters which is needed for non-English characters.

Check out this MSDN article on International Features in MS SQL Server 2005

**Edit**

I just re-read your post and apparently you are using nvarchar.
I'm not sure what's wrong....sorry

-Frinny
Jan 13 '10 #6
prabirchoudhury
162 100+
hey Frinny thanks for your reply..
Jan 13 '10 #7
nbiswas
149 100+
Use unicode

e.g.

Expand|Select|Wrap|Line Numbers
  1. declare @tbl table(field nvarchar(20))
  2. insert into  @tbl 
  3. select N'Māori' union all 
  4. select N'Maori' union all 
  5. select N'Some Māori' union all 
  6. select N'Some Maori'
Solution

Expand|Select|Wrap|Line Numbers
  1. select * from @tbl where field like N'%Māori%'

Output
Expand|Select|Wrap|Line Numbers
  1. field
  2. Māori
  3. Some Māori
If you need an exact match

try :
Expand|Select|Wrap|Line Numbers
  1. select * from @tbl where field = N'Māori'
Output

Expand|Select|Wrap|Line Numbers
  1. field
  2. Māori
Hope this helps
Feb 21 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: AlessanBar | last post by:
Hello Friends !! I have a strange problem, and I need to know what would be the source of this. I have a laptop computer with the following configuration: Pentium III Brand : Toshiba Speed :...
5
by: xchong.zhou | last post by:
I have a question when I work on Linkedserver The Linkedserver name is ,the Datebase name is Newexec,the Table name is Customers_CoypTest The SQLScript is below: Update ...
2
by: thomas_vicker | last post by:
Hi, I need to maintain both SQL Server 2000 and 2005 on my PC for support purposes. I am using the developer additions. After I install everything (with no install errors) I can use SQL 2005 Mgt...
3
by: pb648174 | last post by:
I recently needed to upgrade a sql 2000 machine to 2005. Instead of upgrading the sql 2000 default instance, I installed sql 2005 as a separate named instance so we could go back to sql 2000 if...
1
by: HandersonVA | last post by:
database has been recently upgraded from ms sql 2000 to ms sql 2005. are there anything I need to be aware after upgrading to ms sql 2005? for my experience, i got an error if i use column alias...
5
by: Jack | last post by:
Hello, I had SQL2000 server running fine on the windows 2003 box. I then installed SQL 2005 Express. They both worked together fine. I then uninstalled SQL 2005 Express and installed SQL 2005...
11
by: HC | last post by:
I posted this in one of the VB forums but I'm starting to think it might be more appropriate to have it here, since it really seems to be a SQL server (MSDE/Express 2005) problem: Hey, all, I...
2
by: Luke.Schollmeyer | last post by:
I found an unusual problem between 2000 and 2005 I haven't been able to decipher from any documentation. The query structure is as follows: select * from tableA a join tableB b ON...
5
by: brian.j.parker | last post by:
Hey all, I've noticed an obscure little quirk: it appears that if you use a login with trailing spaces on the name, SYSTEM_USER automatically trims those trailing spaces in SQL Server 2000, but not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.