Re: How to use LIKE for detecting numbers with commas?

2009-07-06 Thread avrombay

It's ugly, but this should work:

SELECT * FROM table where numbers LIKE '8,%' or  numbers LIKE '%,8,%' or 
numbers LIKE '%,8'


-- B


- Original Message - 
From: "Highviews" 

To: 
Sent: Monday, July 06, 2009 6:31 PM
Subject: How to use LIKE for detecting numbers with commas?



Hi,
I have numbers separated with commas saved into a TEXT Field, for example:

ROW1: 10,5,2,8,
ROW2: 2,7,9,65
ROW3: 99,100,55,10,88,
etc...


Now i want to make a query like this:
SELECT * FROM table where numbers LIKE '%8%';

The above query when executed returned the following:
ROW1: 10,5,2,8,
ROW3: 99,100,55,10,88,

Where it should only return ROW1:
ROW1: 10,5,2,8,

But it is also detecting '88' from ROW2.

Any solution to this?
I only want exact numbers to be searched out.


Thanks!



---
http://www.visualbooks.com.pk/





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



FULL TEXT SEARCH ALTERNATIVES...

2006-08-02 Thread avrombay
Hi!

I'm getting a lot of pushback on using mysql for full-text searching on over 
30,000,000 documents. It's starting to slow down when using more than 10-15 
keywords. Is there an alternative anyone is using? 

I don't want to replace the database, but I do need to speed up the keyword 
search.

Any ideas? Thanks in advance!

-- Avi

Union vs OR

2005-08-26 Thread avrombay
I have a table that holds attributes for users. This is the structure:

TABLE properties (
  id int(11) NOT NULL,
  userid int(11) NOT NULL,
  attrType int(11) NOT NULL,
  attrValue text NOT NULL,
  FULLTEXT KEY propValue (propValue)
) TYPE=MyISAM;

The table is used to find people based on criteria.

A simple query:

select
userID, attrType, attrValue from properties
where
propType = 1
and
propValue= 'some value'

The problem I'm running into is that the number of attributes could be over
50.

Would a query with many sets of

(propType = 1 and propValue= 'some value')
or
(propType = 2 and propValue= 'some other value')
or ...

work better than doing the same thing with unions?

Or does anyone have an alternate solution?

Thanks for any help!

-- Avi



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



maximum query length

2005-08-17 Thread avrombay
Does anyone know if there's a maximum query length in mysql 4.1.x?

Thanks!


Limit on fulltext match?

2005-08-08 Thread avrombay
Does anyone know if there Is there a limit on the number/length of terms using 
"match against()"?

Thanks!

-- Avi


Re: migrate Access to MySQL

2005-07-28 Thread avrombay
I've used the exportSQL script
(http://www.rot13.org/~dpavlin/projects/sql/exportSQL3.txt) to dump tables
out of Access into a file that can be imported by mySQL. Since a lot of my
work is porting Access apps to web apps, it comes in very handy.

I've also written a really simple VB script that copies the records directly
from Access to mySQL via ODBC.  It uses DoCmd.TransferDatabase, if you'd
like to write your own.

I'd be happy to share it.

--  Brett

- Original Message - 
From: "Bing Du" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, July 28, 2005 9:32 AM
Subject: migrate Access to MySQL


Hello,

I've been looking around for a while.  Seems there are many options and
tools that can help do it.  Guidance and directions are highly welcome.

We need to move the contents of a bunch of tables from Access to the
existing tables on MySQL.  The target tables in MySQL already have some
information.  So we need some how to map Access fields to MySQL fields.

Anybody would like to share experience about how you did your migration
and what kind of tool can best meet needs as such?

Thanks much in advance,

Bing

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Limit on the expression length?

2005-07-21 Thread avrombay
Is there a limit on the expression length in a full text search? I have a 
situations where users might want to use over 100 words in a full-text search. 
(Yes, it's ridiculous.)

Thanks in advance!

-- Avi