Re: Help with SQL query construction

2007-12-03 Thread Peter Brawley
Marcus, I've managed to do this with a Perl-DBI script, but would much prefer to do it completely with MySQL instead. You could port it to a recursive stored procedure. It would probably be slower, and what would you have gained? PB Marcus Claesson wrote: Hi! I have a "SQL query constru

RE: Help with SQL query construction

2007-12-03 Thread Jeff Mckeon
> -Original Message- > From: Marcus Claesson [mailto:[EMAIL PROTECTED] > Sent: Monday, December 03, 2007 7:49 AM > To: mysql@lists.mysql.com > Subject: Help with SQL query construction > > Hi! > > I have a "SQL query construction" question that I h

Help with SQL query construction

2007-12-03 Thread Marcus Claesson
Hi! I have a "SQL query construction" question that I hope someone can help me with. After comparing a bunch of DNA fragments (see name below) with a larger reference sequence I get a ordered list ranked according to similarities, and with start/stop co-ordinates where the fragments map to the ref

Re: Help with SQL Queries

2006-10-04 Thread Johan Höök
< -- Original Message -- FROM: "Yashesh Bhatia" <[EMAIL PROTECTED]> TO:mysql@lists.mysql.com DATE: Wed, 4 Oct 2006 17:36:38 +0530 SUBJECT: Help with SQL Queries Hi, Is the the right group to post for questions with SQL Queries ? thx.

Re: Help with SQL Queries

2006-10-04 Thread Yashesh Bhatia
Oct 2006 17:36:38 +0530 SUBJECT: Help with SQL Queries Hi, Is the the right group to post for questions with SQL Queries ? thx. yashesh bhatia -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http:/

re: Help with SQL Queries

2006-10-04 Thread Rob Desbois
uot;Yashesh Bhatia" <[EMAIL PROTECTED]> TO:mysql@lists.mysql.com DATE: Wed, 4 Oct 2006 17:36:38 +0530 SUBJECT: Help with SQL Queries Hi, Is the the right group to post for questions with SQL Queries ? thx. yashesh bhatia -- MySQL General Mailing List F

Help with SQL Queries

2006-10-04 Thread Yashesh Bhatia
Hi, Is the the right group to post for questions with SQL Queries ? thx. yashesh bhatia -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Help with SQL DELETE issue

2006-01-16 Thread Pete Harlan
Agreed. OTOH, I would recommend 4.1.15 until they solve the problem with updates in 4.1.16 apparently not using index prefixes. --Pete On Sun, Jan 15, 2006 at 05:07:08PM +, Jocelyn Fournier wrote: > Hi, > > Excepted if he found a bug in an older version of MySQL, it's of course > false !

Re: Help with SQL DELETE issue

2006-01-15 Thread Jocelyn Fournier
Hi, Excepted if he found a bug in an older version of MySQL, it's of course false ! (it would be a major issue which would make MySQL just unusable) Regards, Jocelyn David Rabinowitz a écrit : Hi, We are using MySQL 4.1.16, recently upgraded from 4.0.18. On the old server we tried not t

Help with SQL DELETE issue

2006-01-15 Thread David Rabinowitz
Hi, We are using MySQL 4.1.16, recently upgraded from 4.0.18. On the old server we tried not to delete records, as their is a common belief that deleting records will corrupt the table's index and we will have to call repair table. I couldn't find any documentation on that. Unfortunately he

Re: Help with SQL Command

2005-09-09 Thread Gleb Paharenko
Hello. >..e, but I am manually entering it in. Use mysql command line client. You may pass SQL statements as the command line options or execute them from the file (i.e mysql -e "sql_statement" or mysql < sql_file). See: http://dev.mysql.com/doc/mysql/en/mysql.html Eric Mynes

Help with SQL Command

2005-09-09 Thread Eric Mynes
Greetings all, I am knew to the the world of SQL and am interested in putting data into a database that I have created. The data will be in the form of a tab delimited text file that will generated several times a day with different data. What I would like to do is use the LOAD LOCAL DATA INFIL

Re: help with SQL (join?) query

2004-11-30 Thread Dan Sashko
MAIL PROTECTED]> Sent: Tuesday, November 30, 2004 7:08 PM Subject: Re: help with SQL (join?) query No offense but your response has created more confusion about this.. Here is a more simple diagram for what I'd like to get from an SQL query: Table users: uid username 1 john 2 jim

Re: help with SQL (join?) query

2004-11-30 Thread Michael Stassen
How so? Is there something you didn't understand? Peter's solution is the right idea. You need to join the groups table to the users table once to get the creatorname and again to get the ownername. Maybe it will be clearer if we rewrite the query to make the join conditions explicit: SEL

Re: help with SQL (join?) query

2004-11-30 Thread Kris
No offense but your response has created more confusion about this.. Here is a more simple diagram for what I'd like to get from an SQL query: Table users: uid username 1 john 2 jim 3 mary Table groups: id name creator owner 1 test 11 2 abc 1

Re: help with SQL (join?) query

2004-11-30 Thread Peter Valdemar Mørch
Kris zoob-at-doomstar.com |Lists| wrote: I am trying to join to tables: users: uid name 1 john 2 jim 3 mary groups: groupid groupname groupowner groupcreator 1 test1 1 1 2test2 1 2 3

help with SQL (join?) query

2004-11-30 Thread Kris
I am trying to join to tables: users: uid name 1 john 2 jim 3 mary groups: groupid groupname groupowner groupcreator 1 test1 1 1 2test2 1 2 3 test32

Re: Help with sql without using INTERSECT

2004-08-12 Thread SGreen
INTERSECT sound very much like UNION DISTINCT (http://dev.mysql.com/doc/mysql/en/UNION.html) because this query should give you what you asked for and is very similar to yours: (SELECT ID_ENTRY FROM table WHERE ID_AGE = 1) UNION DISTINCT (SELECT ID_ENTRY FROM table WHERE ID_AGE=2) However, I ca

Re: Help with sql without using INTERSECT

2004-08-12 Thread gerald_clark
Jeff Meyer wrote: I have the following table: +-+-+ | ID_AGE | ID_ENTRY | +-+-+ | 1 | 1 | | 1 | 4 | | 1 | 5 | | 2 | 1 | | 2 |

Help with sql without using INTERSECT

2004-08-12 Thread Jeff Meyer
I have the following table: +-+-+ | ID_AGE | ID_ENTRY | +-+-+ | 1 | 1 | | 1 | 4 | | 1 | 5 | | 2 | 1 | | 2 | 2 | |

Help with SQL Query

2003-09-01 Thread Kim G. Pedersen
Hi Having 2 tables TOrders: ProductID Amount 400810 4008 -5 4110 7 4110 2 4110 -4 4110 1 TStock ProductID Count 4110 3 4110 2 What I want Is a sum of product nee

Re: help with sql query : DATETIME function

2003-02-26 Thread Paul DuBois
At 18:30 -0800 2/26/03, Admin-Stress wrote: I have a table with this structure : username VARCHAR(32) address VARCHAR(128) datereg DATETIME // date of registration classINT How is the sql query for username who are their datereg was 30 days ago and class = 1? WHERE class = 1 AN

help with sql query : DATETIME function

2003-02-26 Thread Admin-Stress
I have a table with this structure : username VARCHAR(32) address VARCHAR(128) datereg DATETIME // date of registration classINT How is the sql query for username who are their datereg was 30 days ago and class = 1? thanks __ D

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

Re: please help with sql query

2002-09-27 Thread Clive Smart
Hi there Try This: SELECT products.product_name, products.fg_number, images.image_name, images.thumbnail, images.image_path, images.color_depth, images.width_inches, images.height_inches, images.resolution, images.filesize, images.filetype, images.notes FROM products LEFT JOIN images ON produc

please help with sql query

2002-09-27 Thread Michael Knauf/Niles
I have two tables: products +-+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+--+--+-+-++ | id | int(6) |

Re: Help! With sql date type

2002-04-18 Thread Jan Peuker
ogram. - Original Message - From: "stan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 9:37 PM Subject: Help! With sql date type > Hello, > I would like to add a date column to my sql database table that > auto-increments the date

Help! With sql date type

2002-04-18 Thread stan
Hello, I would like to add a date column to my sql database table that auto-increments the date's week field by 2 weeks for every entry. I have set up the mysql database table to automatically take entries for ad submissions and I want to timestamp each entry with the calculated date. Is this p

Re: Help with sql syntax

2002-01-21 Thread Anvar Hussain K.M.
Hi, Select person from persons as p, person_skills as ps where p.personid = ps.person_id And ps.skill_id in (id1,id2..); Anvar. At 09:40 PM 21/01/2002 -0500, you wrote: >I have three tables as follows (simplified): > >persons (person_id,person) >skills( skill_id,skill) >person_skills( person_

Help with sql syntax

2002-01-21 Thread Brian Smith
I have three tables as follows (simplified): persons (person_id,person) skills( skill_id,skill) person_skills( person_id,skill_id) A person can have one or more entries in the person_skills table, indicating their skills. I need to select persons where there skills match ALL skill_id's in a set

help with sql query

2001-10-02 Thread barry
mysql - version 3.23.40-log (build from src) i have created a database that records ahrs worked and have 2 fields (amongst others) ahrs_start & ahrs_end both are set as type time (hh:mm:ss) as we get paid for a minmum of 1hr for being called out i would like to be able to craft a query that su

Re: Help with SQL

2001-04-04 Thread Gerald Clark
Jim Hamer wrote: > > Hello Listers, > > I am using mysql and I am trying to get a SQL statement to work. I have > designed a query in Microsoft Access and I am changing the syntax so that > it will run from Perl against a mysql database. Here is the code: > > # from Access > #SELECT DISTINCTROW

Re: Help with SQL

2001-04-04 Thread Steve Werby
"Jim Hamer" <[EMAIL PROTECTED]> wrote: > I am using mysql and I am trying to get a SQL statement to work. I have > designed a query in Microsoft Access and I am changing the syntax so that > it will run from Perl against a mysql database. Here is the code: > > # from Access > #SELECT DISTINCTROW Q

Help with SQL

2001-04-04 Thread Jim Hamer
Hello Listers, I am using mysql and I am trying to get a SQL statement to work. I have designed a query in Microsoft Access and I am changing the syntax so that it will run from Perl against a mysql database. Here is the code: # from Access #SELECT DISTINCTROW Query1.licenceNo, Query1.subCCYYM

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? -