Re: Help with SQL statement?

2003-01-15 Thread Salam Baker Shanawa
Try this: SELECT * FROM MyTable WHERE RefList not regexp "(^|[^0-9])MyNum([^0-9]|$)"; Regards Salam Jeff Snoxell wrote: Hi, I've got a varchar field in a mysql table that contains 'N' numbers (each a maximum of 4 digits, not zero padded) separated by spaces when more than 1 number is prese

Re: Help with SQL statement?

2003-01-15 Thread Paul DuBois
At 16:40 + 1/15/03, Jeff Snoxell wrote: Hi, I've got a varchar field in a mysql table that contains 'N' numbers (each a maximum of 4 digits, not zero padded) separated by spaces when more than 1 number is present. eg. field content might be any of the following '' '123 4567 1234 45 3' '3'

Re: Help with SQL statement?

2003-01-15 Thread Csongor Fagyal
Jeff Snoxell wrote: Hi, I've got a varchar field in a mysql table that contains 'N' numbers (each a maximum of 4 digits, not zero padded) separated by spaces when more than 1 number is present. eg. field content might be any of the following '' '123 4567 1234 45 3' '3' '3 4 6' I want to sel

Help with SQL statement?

2003-01-15 Thread Jeff Snoxell
Hi, I've got a varchar field in a mysql table that contains 'N' numbers (each a maximum of 4 digits, not zero padded) separated by spaces when more than 1 number is present. eg. field content might be any of the following '' '123 4567 1234 45 3' '3' '3 4 6' I want to select only those records

Help with SQL Statement

2001-03-28 Thread James Cox
Hi, Having some more problems with the sql. Here it is.. SELECT icaref, id, date, payee, descript, disb, payment, receipt-payment, receipt, SUM(disb), SUM(receipt-payment), FROM data WHERE SUM(receipt-payment) != 0 AND date BETWEEN 'varStart' AND 'varEnd' OR icaref LIKE '%varRef%' GROUP BY

Re: Help with SQL statement please.

2001-02-09 Thread Bob Hall
>I hope somebody may of come across this sort of problem before dealing with >counting total records in subcategories. > >I have two tables sslinks which contains links (URL) information and >sslinkcats which contains category information. > >The category table "sslinkcats" has a field called "lca

Re: Help with SQL statement please.

2001-02-08 Thread Rolf Hopkins
- From: "Phil Latio" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 08, 2001 20:52 Subject: Re: Help with SQL statement please. > I see, I need a recursive algorithm > > Can you get them in Woolworths? > > > > - Original M

Re: Help with SQL statement please.

2001-02-08 Thread Phil Latio
I see, I need a recursive algorithm Can you get them in Woolworths? - Original Message - From: "Tommie Jones" <[EMAIL PROTECTED]> To: "Phil Latio" <[EMAIL PROTECTED]> Cc: <> Sent: Thursday, February 08, 2001 12:18 PM Subject: Re: Help with

Re: Help with SQL statement please.

2001-02-08 Thread Tommie Jones
If I am not mistaken I think you are trying to do a nested select. This is not possible in Mysql. I've had similar problems. You will have to use some sort of recursive algorithm in your perl code (if you are using perl) to accomplish this. Phil Latio wrote: > > I hope somebody may of come acro

Help with SQL statement please.

2001-02-08 Thread Phil Latio
I hope somebody may of come across this sort of problem before dealing with counting total records in subcategories. I have two tables sslinks which contains links (URL) information and sslinkcats which contains category information. The category table "sslinkcats" has a field called "lcat_id" (

Re: HELP with SQL statement

2001-01-19 Thread Milo Stefani
I need to query > that will query up all the number 1's (positives) and subtract all the > number 3's (negatives) to give me a true rating. Any ideas? > > > - Original Message - > From: "Tomi Junnila" <[EMAIL PROTECTED]> > To: "m

Re: HELP with SQL statement

2001-01-19 Thread Tomi Junnila
* Mike Podlesny <[EMAIL PROTECTED]> wrote on 19.01.01 17:52: > Actually let me reword this because Tomi's answer won't quite work. The > table has a field called Rating. A number 1 is stored to represent positive > a 2 is stored for neutral and a 3 is stored for negative. I need to query > that

HELP with SQL statement

2001-01-19 Thread Mike Podlesny
ubtract all the number 3's (negatives) to give me a true rating. Any ideas? - Original Message - From: "Tomi Junnila" <[EMAIL PROTECTED]> To: "mySQL Mailing List" <[EMAIL PROTECTED]> Sent: Friday, January 19, 2001 10:32 AM Subject: Re: HELP with SQL sta

Re: HELP with SQL statement

2001-01-19 Thread Tomi Junnila
* Mike Podlesny <[EMAIL PROTECTED]> wrote on 19.01.01 17:25: > I have a table called RATING and two fields one called POSITIVE and the > other called NEGATIVE. I need to write an SQL statement for my mySQL > database that will return the value of the total of POSITIVEs minues the > total of the N

HELP with SQL statement

2001-01-19 Thread Mike Podlesny
I have a table called RATING and two fields one called POSITIVE and the other called NEGATIVE. I need to write an SQL statement for my mySQL database that will return the value of the total of POSITIVEs minues the total of the NEGATIVEs. Any ideas? -