473,383 Members | 1,870 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,383 software developers and data experts.

Very weird bug with 'like' function

antonopn
Hello there,

I have just faced a really weird problem with a query in SQL SERVER 2000.

I had a database with collation SQL_Latin1_General_CP1_CI_AS and converted it in a new database with collation Greek_CI_AI.

The conversion was absolutelly correct. Tables, views, sps, functions etc. where succesfully transfered into the new database. The new database is working fine, but I faced a problem with a "select-from-where-like" query.

I have a table named account with a column name code (varchar(255)). some values are:
'54.00'
'54.00.01.000'
'54.00.01.001'
'54.00.01.002'
etc.

This query does not return any values!
Expand|Select|Wrap|Line Numbers
  1. select * from account where code like '54.00%'
While this returns correct values
Expand|Select|Wrap|Line Numbers
  1. select * from account where code like '54.%'
The problem is with zeros (they are not number but characters).
The following query also returns correct values
Expand|Select|Wrap|Line Numbers
  1. select * from account where code = '54.00'
Overall, the problem occurs only when 'like' statement and character '0' come together...

I'm REALLY CONFUSED!!!

If anyone has any ideas I would really like to listen to them...
Feb 26 '09 #1
1 2015
nbiswas
149 100+
select * from account where code like '%54.00%'
Nov 28 '09 #2

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

Similar topics

2
by: Gabriel Afana | last post by:
I have a simple php script to just send email.....When I first load the script in a browser...it sends 2 emails. Why?? The weird thing is then when I refresh the page, it send only one email...I...
3
by: Alex Shi | last post by:
Hi all, Please take a look at following very simple script; #!/usr/bin/php -q <? echo "Hello, world!\n"; if (!$tty) { $tty = fopen('php://stdin', 'r'); }
0
by: Zwyatt | last post by:
having a really weird little bug w/ time_t...check it out: I have the following code (simplified here): #include <time.h> class A { public: char *aString; int aNum;
14
by: Nak | last post by:
Hi there, It's probably me being weird more than the function but I'm having problems with it doing as it should. I have a C++ application with 2 resources of custom types, RT_INIFILE @...
12
by: sparks | last post by:
My boss and I both have access 97 and access 2003 installed on our systems. Lately he has been having a lot of problems. Databases that won't close. The database looks like it closes but access...
7
by: dtschoepe | last post by:
Hi, I am working on a project for school and I am trying to get my head around something weird. I have a function setup which is used to get an input from stdin and a piece of memory is created...
8
by: elias.farah | last post by:
Hello Everyone, I'm having some very weird behavior on a couple of Access forms. (Not all forms, just some of them). The forms have been working for years, under Access XP/2003 etc, and last...
10
by: mcl | last post by:
Why can I not the change the value of a variable in another class, when I have passed it via a parameter list. I am sure I am being stupid, but I thought passed objects were Read/ Write eg...
18
by: Daniel Orner | last post by:
Hi all, I've been trying to pin down a memory leak in IE6 for several WEEKS now. I've done my share of googling etc., and know all about common leaks like circular references and closures, but...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.