Re: sql syntax error

2014-08-08 Thread Christophe
Hi, Le 08/08/2014 17:48, Johan De Meersman a écrit : > > As your code is french, I'll assume you're on Azerty; the backtick is Alt-Gr > plus the rightmost key (right next to return) on the middle row. Enjoy > spraining your fingers :-p > > /johan > Alt-GR plus '7' for French keyboard layout

Re: sql syntax error

2014-08-08 Thread Johan De Meersman
- Original Message - > From: "florent larose" > Subject: sql syntax error > > near ''membres2' WHERE > [...] > FROM 'espace_membre2'.'membres2' WHERE You were on the right path - mysql is wibbly about quotes. Either remove the quotes entirely ( espace_membre2.membres2 ) or try backtick

Re: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-19 Thread Baron Schwartz
I would work from the inside out. What you're doing is grouping scenes by DVD and throwing away the ones that have no scenes. If you start with DVDs and do a subquery for each row, you'll process DVDs without scenes and then filter them out. If you start with a subquery that's grouped by DVD ID, al

RE: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-19 Thread Daevid Vincent
elly [mailto:my...@wastedtimes.net] Sent: Saturday, May 19, 2012 3:34 PM To: mysql@lists.mysql.com Subject: Re: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format Hi. On Friday 18 May 2012 18:21:07 Daevid Vincent wrote: > Actually, I may have figured

Re: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-19 Thread Mark Kelly
Hi. On Friday 18 May 2012 18:21:07 Daevid Vincent wrote: > Actually, I may have figured it out. Is there a better way to do this? I don't see why you need the dvds table when the dvd_id is in the scene table: SELECT a.dvd_id FROM scenes_list a, moviefiles b WHERE a.scene_id = b.scene_id AND

RE: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-18 Thread Daevid Vincent
> -Original Message- > Sent: Friday, May 18, 2012 5:34 PM > > I have a table of DVDs, another of scenes and a last one of encoding > formats/files... > > I want to find in one query all the dvd_id that have > 0 scene_id that's > encoded in format_id = 13. > In other words all DVDs that ar

Re: SQL Fiddle

2012-03-02 Thread Johan De Meersman
- Original Message - > From: "Chris Tate-Davies" > > Not sure if anyone on this list has heard of this, but I found this > yesterday and it may prove to be quite useful one day. > > http://www.sqlfiddle.com/ Hee, funny :-) Thanks for that. -- Bier met grenadyn Is als mosterd by den w

Re: SQL DATA

2011-12-14 Thread Hal�sz S�ndor
2011/12/13 16:10 -0500, Shawn Green (MySQL) Many of you are missing the big picture. This flag (along with most of the others you can use to describe a stored procedure) are meant to indicate to the replication system whether it needs to log the CALL to this procedure and in which form

Re: SQL DATA

2011-12-13 Thread Shawn Green (MySQL)
Hello All, On 12/5/2011 14:20, wrote: A procedure MODIFIES SQL DATA if all the modifying involves a temporary table, or only READS SQL DATA? Does it matter whether the temporary table is meant to outlast the procedure-call? Many of you are missing the big picture. This flag (along with m

Re: SQL DATA

2011-12-13 Thread Singer X.J. Wang
I didn't say anything about recursive optimizations. All I said was the following statement: "When the procedure is executed, each query in the procedure is obviously run through the query optimizer. " 2011/12/13 Arthur Fuller > I am not sure that the db engineers should look into supporting re

Re: SQL DATA

2011-12-13 Thread Arthur Fuller
I am not sure that the db engineers should look into supporting recursive optimizations. That sounds to me like a waste of their time, and conversely an investment in your (my) time. This kind of thing is far too app-specific to generalize into an all-encompassing algorithm, IMO, and even if it cou

Re: SQL DATA

2011-12-13 Thread Singer X.J. Wang
When the procedure is executed, each query in the procedure is obviously run through the query optimizer. But the flags are symbolic only for humans. 2011/12/9 Halász Sándor > ;>>> 2011/12/08 10:21 -0500, Singer X.J. Wang > But again one of the flags are binding in any way. There's nothi

Re: SQL DATA

2011-12-10 Thread Hal�sz S�ndor
2011/12/09 20:37 -0500, Singer X.J. Wang When the procedure is executed, each query in the procedure is obviously run through the query optimizer. But the flags are symbolic only for humans. "Obviously"? As I wrote, someone said that the optimizer does _not_ look into procedur

Re: SQL DATA

2011-12-09 Thread Hal�sz S�ndor
;>>> 2011/12/08 10:21 -0500, Singer X.J. Wang But again one of the flags are binding in any way. There's nothing preventing me from declaring my procedure * READS SQL DATA indicates that the routine contains statements that read data (for example,

Re: SQL DATA

2011-12-08 Thread Hal�sz S�ndor
2011/12/05 14:26 -0500, Singer X.J. Wang Note that all the flags are non binding.. YMMV... Yes, but what does it _mean_? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Re: sql query advise

2011-06-24 Thread Johan De Meersman
Have a look at GROUP BY and aggregate functions: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html - Original Message - > From: "Norman Khine" > To: mysql@lists.mysql.com > Sent: Thursday, 23 June, 2011 4:05:35 PM > Subject: sql query advise > > hello, > i have this SQL cod

Re: SQL book recommendation?

2010-10-29 Thread Philip Riebold
On 28 Oct 2010, at 18:45, Paul DuBois wrote: > > On Oct 26, 2010, at 6:31 AM, Philip Riebold wrote: > >> >> On 26 Oct 2010, at 11:49, MikeB wrote: >> >>> I'm finding the MySQL online manuals hard going in figuring out how to >>> construct SQL queries. Can anyone perhaps recommend a good book

Re: SQL book recommendation?

2010-10-28 Thread Mike OK
I have two of Paul's books and they are excellent. - Original Message - From: "Paul DuBois" To: "[MySQL] Mysql list" Cc: "MikeB" ; "Philip Riebold" Sent: Thursday, October 28, 2010 1:45 PM Subject: Re: SQL book recommendation? On O

Re: SQL book recommendation?

2010-10-28 Thread Paul DuBois
On Oct 26, 2010, at 6:31 AM, Philip Riebold wrote: > > On 26 Oct 2010, at 11:49, MikeB wrote: > >> I'm finding the MySQL online manuals hard going in figuring out how to >> construct SQL queries. Can anyone perhaps recommend a good book that can >> shed light on the subject? >> >> Thanks. >

Re: SQL book recommendation?

2010-10-27 Thread wroxdb
2010/10/26 Philip Riebold : > > On 26 Oct 2010, at 11:49, MikeB wrote: > >> I'm finding the MySQL online manuals hard going in figuring out how to >> construct SQL queries. Can anyone perhaps recommend a good book that can >> shed light on the subject? >> >> Thanks. > > The book I've been using i

Re: SQL book recommendation?

2010-10-26 Thread Arthur Fuller
Visit our site (www.artfulsoftware.com) for lots of tips, especially on queries. Arthur >-Original Message- > >From: Philip Riebold [mailto:p.rieb...@ucl.ac.uk] > >Sent: Tuesday, October 26, 2010 7:31 AM > >To: MikeB > >Cc: mysql@lists.mysql.com > >Sub

RE: SQL book recommendation?

2010-10-26 Thread Jerry Schwartz
>-Original Message- >From: Philip Riebold [mailto:p.rieb...@ucl.ac.uk] >Sent: Tuesday, October 26, 2010 7:31 AM >To: MikeB >Cc: mysql@lists.mysql.com >Subject: Re: SQL book recommendation? > > >On 26 Oct 2010, at 11:49, MikeB wrote: > >> I'm finding the MySQL

Re: SQL book recommendation?

2010-10-26 Thread Philip Riebold
On 26 Oct 2010, at 11:49, MikeB wrote: > I'm finding the MySQL online manuals hard going in figuring out how to > construct SQL queries. Can anyone perhaps recommend a good book that can shed > light on the subject? > > Thanks. The book I've been using is 'MySQL, The definitive guide to using

RE: SQL book recommendation?

2010-10-26 Thread Jay Blanchard
[snip] I'm finding the MySQL online manuals hard going in figuring out how to construct SQL queries. Can anyone perhaps recommend a good book that can shed light on the subject? [/snip] http://www.peachpit.com/store/product.aspx?isbn=0321375734 MySQL, Second Edition: Visual QuickStart Guide, 2n

Re: sql to duplicate records with modified value

2010-04-27 Thread Voytek Eymont
thanks, Ray, that worked well (btw, you have a typo, 'Independant' instead of 'Independent') btw2, I have a pdf with some 15,000 names that I would like to display with a search function, I email you later, maybe you can help me with that -- Voytek > Hi Voytek > > > You could try some vari

Re: sql query advise

2010-04-23 Thread Norman Khine
hi martin, On Fri, Apr 23, 2010 at 9:50 PM, Martin Gainty wrote: > Norm- > I would strongly suggest locking the table before updating..a SELECT for > UPDATE would accomplish that objective: thanks for the reply and the advise on locking the table > > """SELECT oppc_id, limitedDate FROM db1.partn

Re: sql to duplicate records with modified value

2010-03-27 Thread Ray Cauchi
Hi Voytek You could try some variation of: INSERT INTO inserttable (user, maildir) SELECT REPLACE(user, '@', 'spam@') as user, CONCAT(maildir,'.spam/') as maildir FROM selecttable [WHERE ..] the where bit is optional of course! let me know how you go - hope you are keeping well! ray At 03

Re: sql to duplicate records with modified value

2010-03-27 Thread Voytek Eymont
> Voytek Eymont wrote: > Are you hoping to do all that you want - copy rows, update rows and > create new rows - in a single SQL statement? Because if that's what you > want, I don't think it's possible. Unless someone has come up with some > new tricks, you can't insert a new record and update

Re: sql to duplicate records with modified value

2010-03-27 Thread Rhino
Voytek Eymont wrote: I have Postfix virtual mailboxes in MySQL table like below: I'd like to duplicate all records whilst MODIFYING two fields like so: current record has format like: user 'usern...@domain.tld' maildir 'domain.tld/usern...@domain.tld/' add new record that has: user 'username

Re: SQL command for MySQL ?

2010-03-17 Thread Chris W
I'm not 100% sure I understand what you are wanting but if I do, the INSERT ... ON DUPLICATE KEY UPDATE Syntax detailed here http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html Will probably do what you want. For it to work you would have to have a unique key on the three field

Re: SQL query for unique values.

2010-02-15 Thread Manasi Save
Hi, A simple group by function should work for this: Select Fruit,GrownInStates From tbl1 Group By Fruit; and if you want grownstates in comma separated format then you can use Group_Concat function Select Fruit, Group_Concat(GrownInStates, SEPARATOR ',') From tbl1 Group By Fruit; Hope th

RE: sql file system + optimization

2009-12-15 Thread John Daisley
Yes, you can symlink it. How much performance benefit you get will depend on hardware and traffic. === John Daisley MySQL 5.0 Certified Database Administrator (CMDBA) MySQL 5.0 Certified Developer Cognos BI Developer Telephone: +44(0)1283 537111 Mobile: +44(0)7812 451238 Email:

RE: SQL Question

2009-11-03 Thread Martin Gainty
you'll need to write a recursive routine to call the same sql statement and iterate from the largest value and attenuate that value by 1 each time # file: test.pl been a few years but this should work #initialize your variable that you will attenuate my $global = "9876543210"; #number of rows actu

Re: SQL select basics

2008-10-20 Thread Moon's Father
select * from ( SELECT ID_number, count( CU_number ) AS CC FROM MyTable GROUP BY ID_number ) T WHERE CC = ( select max(cc) from ( SELECT ID_number, count( CU_number ) AS CC FROM MyTable GROUP BY ID_number ) T2 ) On Wed, Oct 15, 2008 at 5:08 PM, dave aptiva <[EMAIL PROTECTED]>wrote: > Hello a

Re: SQL select basics

2008-10-17 Thread Jim Lyons
SELECT ID_number, count( CU_number ) FROM MyTable GROUP BY ID_number order by 2 desc limit 10 will give you the top 10. Change 10 to whatever you want or take off the limit clause to get all records. On Fri, Oct 17, 2008 at 4:25 AM, dave aptiva <[EMAIL PROTECTED]>wrote: > Hello all, > > I'm new

Re: SQL select basics

2008-10-17 Thread Ian Christian
2008/10/17 dave aptiva <[EMAIL PROTECTED]>: > > I tried SELECT ID_number, max( count( CU_number ) ) but this causes an error > "# - Invalid use of group function " # sqlite3 SQLite version 3.5.9 Enter ".help" for instructions sqlite> create table moo (id_number, cu_number); sqlite> insert int

Re: SQL question: find items tagged with specific tags

2008-04-23 Thread Sebastian Mendel
Ingo Weiss schrieb: Thanks, Sebastian! I have tried this one before. The problem is that it finds all items the tags of which include EITHER 'blue' OR 'red', not 'blue' AND 'red': oh ... "and" ..., i missred SELECT DISTINCT items.* FROM items INNER JOIN taggings ON item

Re: SQL question: find items tagged with specific tags

2008-04-23 Thread Ingo Weiss
Thanks, Sebastian! I have tried this one before. The problem is that it finds all items the tags of which include EITHER 'blue' OR 'red', not 'blue' AND 'red': mysql> SELECT DISTINCT items.title from items inner join taggings on (items.id = taggings.item_id) inner join tags on (tags.id =

Re: SQL question: find items tagged with specific tags

2008-04-22 Thread Sebastian Mendel
Ingo Weiss schrieb: Hi all, I have an application where items can be tagged. There are three tables 'items', 'taggings' and 'tags' joined together like this: items inner join taggings on (items.id = taggings.item_id) inner join tags on (tags.id = taggings.tag_id) Now I have been struggli

Re: SQL query question for GROUP BY

2008-04-15 Thread Perrin Harkins
On Fri, Apr 11, 2008 at 4:01 PM, Victor Danilchenko <[EMAIL PROTECTED]> wrote: > Oooh, this looks evil. It seems like such a simple thing. I guess > creating max(log_date) as a field, and then joining on it, is a solution -- > but my actual query (not the abridged version) is already half a

Re: SQL query question for GROUP BY

2008-04-15 Thread Victor Danilchenko
I just thought of something else... could the same be accomplished using stored routines? I could find no way in MySQL to create stored routines which could be used with the 'group by' queries though. If this were possible, it should then be also possible to define a 'LAST' stored routine, o

Re: SQL query question for GROUP BY

2008-04-11 Thread Rob Wultsch
On Fri, Apr 11, 2008 at 1:01 PM, Victor Danilchenko <[EMAIL PROTECTED]> wrote: > Oooh, this looks evil. It seems like such a simple thing. I guess > creating max(log_date) as a field, and then joining on it, is a solution -- > but my actual query (not the abridged version) is already half a

Re: SQL query question for GROUP BY

2008-04-11 Thread Victor Danilchenko
Oooh, this looks evil. It seems like such a simple thing. I guess creating max(log_date) as a field, and then joining on it, is a solution -- but my actual query (not the abridged version) is already half a page long. I think at this point, unless someone else suggests a better solution, th

Re: SQL query question for GROUP BY

2008-04-11 Thread Rob Wultsch
On Fri, Apr 11, 2008 at 11:46 AM, Victor Danilchenko <[EMAIL PROTECTED]> wrote: > GROUP BY seems like an obvious choice; 'GROUP BY username', to be > exact. However, this seems to produce not the last row's values, but ones > from a random row in the group. Under most databases your query i

Re: Sql 5 new installation and root password?

2008-03-01 Thread Jørn Dahl-Stamnes
On Saturday 01 March 2008 13:45, Jørn Dahl-Stamnes wrote: > I have just installed MySQL 5. The server is running, but I'm not able to > connect to the server as root. > > I have not set any root password, since I have not found any way to do this > in version 5 (it was rather good documented in ver

RE: sql help: delete row where only related to one other row

2008-02-21 Thread roger.maynard
Take a look at http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.ht ml "CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. Between two tab

Re: SQL help/problem with timestamped data differences

2008-01-08 Thread Dan Buettner
Mark, is the 'secs' column the offset from the minimum value of the timestamp column? If so, you might try something like this: SELECT UNIX_TIMESTAMP(MIN(timestamp)) INTO @min_timestamp FROM my_table; SELECT uid, timestamp, UNIX_TIMESTAMP(timestamp) - @min_timestamp AS secs FROM my_table ORDER B

Re: SQL analysis tool - open source?

2007-12-06 Thread Russell E Glaue
Hmm... mysqlsla is not bad However, I was hoping for something to help dive into the SQL queries and present their relation together in a single view of how the database and tables are being used. mysqlsla shows the unique queries being used. And I'd like to see from the other end how the databas

Re: SQL analysis tool - open source?

2007-12-06 Thread Baron Schwartz
You could also try http://hackmysql.com/mysqlsla On Dec 6, 2007 9:23 AM, B. Keith Murphy <[EMAIL PROTECTED]> wrote: > MySQL Proxy is good. It doesn't fit in some environments however. > Another option would be the QPP (Query Processing Programs) that I and a > co-worker have developed. They can

Re: SQL analysis tool - open source?

2007-12-06 Thread B. Keith Murphy
MySQL Proxy is good. It doesn't fit in some environments however. Another option would be the QPP (Query Processing Programs) that I and a co-worker have developed. They can be downloaded at http://www.paragon-cs.com/queryprogs. thanks Keith Michael Dykman wrote: Have you considered:

Re: SQL analysis tool - open source?

2007-12-05 Thread Michael Dykman
Have you considered: http://forge.mysql.com/wiki/MySQL_Proxy On Dec 5, 2007 5:14 PM, Russell E Glaue <[EMAIL PROTECTED]> wrote: > > Does anyone know of an open source SQL analysis tool? > > I have query logging turned on in MySQL. > And I would like to analyze all the logged SQL select queri

Re: SQL query problem

2007-11-14 Thread Ravi Kumar.
Dear Mat, Your mail is not very clear. But I have a feeling that using '%' wildcard in the like operand should help you Regards, Ravi. On 11/14/07, Matthew Stuart <[EMAIL PROTECTED]> wrote: > > Hi, I have built a site with Dreamweaver and I have a problem with a > query. > > I am trying to

Re: SQL injection?

2007-09-04 Thread Baron Schwartz
Hi, Fletcher Mattox wrote: We were recently the target of an SQL injection, so I am trying to determine if they were successful. I have recovered the SQL commands from mysqld.log, but the code has me stumped. INSERT INTO queries (file,id) VALUES ('labs.php','4 OR 0 IN (SELECT TOP 1 CHAR(60)

Re: SQL injection?

2007-09-04 Thread Michael Dykman
It looks to me that they are trying to plant a query into your queries file. What type is column 'id'? I am guessing that they (think they) have found a vulnerability where running a web app (prob labls.php') after this injection has taken place, the resulting query might get exectuted... how ma

Re: SQL LINKING TABLE Command

2007-07-17 Thread Baron Schwartz
Hi, Thufir wrote: SELECT product_name, customer.name, date_of_sale FROM `sales` , product, customer WHERE product.product_id = sales.product_id and customer.customer_id = sales.customer_id LIMIT 0, 30 The above SQL command links three tables and display the required result. The tables are linke

Re: SQL LINKING TABLE Command

2007-07-16 Thread Gary Josack
Thufir wrote: SELECT product_name, customer.name, date_of_sale FROM `sales` , product, customer WHERE product.product_id = sales.product_id and customer.customer_id = sales.customer_id LIMIT 0, 30 The above SQL command links three tables and display the required result. The tables are linked by

Re: SQL question

2007-06-15 Thread Edward Quick
Is it just this line I need to change? INNER JOIN url_categories uc ON uc.ID=bt.category_ID; Would it change to something like: INNER JOIN url_categories uc ON CAST(uc.ID as CHAR)=delimit(bt.category_ID) Just guessing! Thanks - that's what I thought. I really don't have much experience with

Re: SQL question

2007-06-14 Thread Edward Quick
Thanks - that's what I thought. I really don't have much experience with mySQL. If it's not too much trouble, could someone give me a bit more help on how to do that please? Ed. no, those won't match based on just the datatype change.. you will have to define a user defined function to do

Re: SQL question

2007-06-14 Thread Edward Quick
Thanks, that's interesting. Actually the uc.ID column is still type tinyint as it holds only one number, but are you saying if I change this to varchar my query will work e.g. 15 = 15:17 would work? What is the type of the 'uc.ID' column? If it's varchar, your match will work fine. If it

Re: SQL restore deleted records

2007-04-13 Thread Andrey Kotrekhov
Добрый день. SQL Hello, All. There is a problem. Ones many records from MyISAM table are deleted. Nobody change this table after this. The records have variable length. How can I restore it? The table format isn't well described in manual, as for me. is not it possible to recover data from my

RE: SQL restore deleted records

2007-04-13 Thread Mikhail Berman
] Subject: Re: SQL restore deleted records > SQL > Hello, All. > > There is a problem. > Ones many records from MyISAM table are deleted. > Nobody change this table after this. > The records have variable length. > > How can I restore it? > The table format isn't well

Re: SQL restore deleted records

2007-04-13 Thread asv
> SQL > Hello, All. > > There is a problem. > Ones many records from MyISAM table are deleted. > Nobody change this table after this. > The records have variable length. > > How can I restore it? > The table format isn't well described in manual, as for me. is not it possible to recover data from m

Re: SQL and PHP: Incorrect errorcode

2007-02-25 Thread Atle Veka
Joern, is the client version of mysql in PHP the same as your client libs on the server (where you run perror)? PHP is often times compiled with its own mysql libs and you have to specifically tell PHP to build with the system mysql libs if you want to. Just a thought. Atle On Sun, 25 Feb 2007,

RE: SQL Translation

2007-02-17 Thread Trimeloni, Adam
ggestions, notice how I had to keep the qp.location_id in the on portion to keep them equivalent. Regards, Adam Adam Trimeloni Project Leader Quality Systems [EMAIL PROTECTED] (949) 255-2600 -Original Message- From: Trimeloni, Adam Sent: Thursday, February 15, 2007 2:32 PM To: '

RE: SQL Translation

2007-02-15 Thread Trimeloni, Adam
, 2007 2:19 PM To: Dan Nelson; Trimeloni, Adam Cc: mysql@lists.mysql.com Subject: RE: SQL Translation > > Select * > > from group_mstr gm,group_payers gp > > where gm.practice_id = '1' > > and gp.location_id = '2' > > and gp.practice_id =* gm.practice_

RE: SQL Translation

2007-02-15 Thread Gary W. Smith
> > Select * > > from group_mstr gm,group_payers gp > > where gm.practice_id = '1' > > and gp.location_id = '2' > > and gp.practice_id =* gm.practice_id > > and gp.group_id =* gm.group_id > > order by gp.payer_id > > I bet =* is shorthand for an outer join (not sure if it's left or > right). Yo

Re: SQL Translation

2007-02-15 Thread Dan Nelson
In the last episode (Feb 15), Trimeloni, Adam said: > I am currently working on a project to support using a MySQL database > along with SQL Server 2000. The following query has me stumped: > > Select * > from group_mstr gm,group_payers gp > where gm.practice_id = '1' > and gp.location_id = '2

RE: SQL Query Question

2007-01-21 Thread Adam Bishop
Ah, that would work. Looks like I was making the problem too complex in my mind, thanks for your help. Adam Bishop -Original Message- From: Dan Nelson [mailto:[EMAIL PROTECTED] Sent: 22 January 2007 07:07 To: Adam Bishop Cc: mysql@lists.mysql.com Subject: Re: SQL Query Question In the

Re: SQL Query Question

2007-01-21 Thread Dan Nelson
In the last episode (Jan 22), Adam Bishop said: > If I have a dataset as below: > > Name, Age, Word > > Bob, 13, bill > Joe, 13, oxo > Alex, 14, thing > Jim, 14, blob > Phil, 14, whatsit > Ben, 15, doodah > Rodney, 15, thingy > > I want to select the first block where

Re: SQL syntax

2006-12-31 Thread Rhino
- Original Message - From: "Scott Yamahata" <[EMAIL PROTECTED]> To: Sent: Friday, December 29, 2006 1:29 AM Subject: SQL syntax Hi, I'm getting the following error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the

Re: SQL syntax

2006-12-29 Thread Joerg Bruehe
Hi Scott, all, Scott Yamahata wrote: Hi, I'm getting the following error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' enabled = '1'' at line 3INSERT INTO clf_cities SET cityname = 'Santa Barba

Re: SQL syntax

2006-12-28 Thread ViSolve DB Team
Hi Scott, at line 3INSERT INTO clf_cities SET cityname = 'Santa Barbara', countryid = , enabled = '1' The error is because you havent specified the value for the column "countryid". If you do not want to insert the value to the column "countryid" then use the following query.. do not leave

Re: SQL syntax

2006-12-28 Thread ViSolve DB Team
Hi, have you checked the 'enabled' field datatype or can you give the query. Thanks ViSolve DB Team. - Original Message - From: "Scott Yamahata" <[EMAIL PROTECTED]> To: Sent: Friday, December 29, 2006 11:59 AM Subject: SQL syntax Hi, I'm getting the following error message: You h

Re: SQL Crashed

2006-12-08 Thread Heikki Tuuri
David, please send the entire .err file to me, zipped. Please tell the exact MySQL version you are using. Best regards, Heikki Oracle Corp./Innobase Oy InnoDB - transactions, row level locking, and foreign keys for MySQL InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyI

Re: sql query

2006-10-17 Thread Peter
Rolando Edwards wrote: > Dan's is correct because Thank you ALL for your kind help !!! Send instant messages to your online friends http://uk.messenger.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PRO

Re: sql query

2006-10-17 Thread Rolando Edwards
; Cc: mysql@lists.mysql.com Sent: Tuesday, October 17, 2006 2:55:37 PM GMT-0500 US/Eastern Subject: Re: sql query Hi Peter - Something like this ought to work: SELECT t1.id_2 FROM mytable t1, mytable t2 WHERE t1.id_1 = t2.id_1 AND t1.id != t2.id AND ABS( UNIX_TIMESTAMP(t1.date_time) - UNIX_TIMES

Re: sql query

2006-10-17 Thread Peter Brawley
I want to find all id_2 that has same id_1 and time difference in records is no more than 5 minutes ... How about ... SELECT id_2 FROM tbl AS t1 JOIN tbl AS t2 ON t1.id_2 = t2.id_1 WHERE ABS(SEC_TO_TIME(t1.date_time)-SEC_TO_TIME(t2.date_time))<=300; PB - Peter wrote: Hello, Lets suppos

Re: sql query

2006-10-17 Thread Dan Buettner
Hi Peter - Something like this ought to work: SELECT t1.id_2 FROM mytable t1, mytable t2 WHERE t1.id_1 = t2.id_1 AND t1.id != t2.id AND ABS( UNIX_TIMESTAMP(t1.date_time) - UNIX_TIMESTAMP(t2.date_time) ) <= 300 Dan On 10/17/06, Peter <[EMAIL PROTECTED]> wrote: Hello, Lets suppose I have a tab

Re: SQL statement work in mysql4 but not mysql5

2006-10-10 Thread Peter Brawley
Jason following statement works in 4 but not 5 SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as cat_state, c.name as cat_name, c.description as cat_desc, c.image, c.url, m.member_name as mod_name, m.member_id as mod_id, m.is_group, m.group_id, m.group_name, m.mid

Re: SQL statement work in mysql4 but not mysql5

2006-10-10 Thread Jo�o C�ndido de Souza Neto
I had this problem here and i change my query to: SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as cat_state, c.name as cat_name, c.description as cat_desc, c.image, c.url, m.member_name as mod_name, m.member_id as mod_id, m.is_group, m.group_id, m.group_name, m.mid

Re: SQL subqueries and JOIN conditions

2006-09-06 Thread Philippe Poelvoorde
2006/9/4, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: Hello all, I need to perform an SQL statement over 5 different tables, with complex request. To do so, i'm using subqueries. SELECT ... FROM (SELECT .WHERE) as T1 LEFT JOIN (SELECT .WHERE) as T2 WHERE . The problem is that on

Re: SQL order by BUG?

2006-09-06 Thread Jørn Dahl-Stamnes
On Wednesday 06 September 2006 15:20, you wrote: > the "direction" (desc/asc) order qualifier is per-sortfield and > defaults to asc, so to get what you're after you'd want: > > order by avg_score desc, sum_score desc > > or > > order by avg_score desc, sum_score > > if you're after 'asc' on "s

Re: SQL order by BUG?

2006-09-06 Thread Philippe Poelvoorde
2006/9/6, Jørn Dahl-Stamnes <[EMAIL PROTECTED]>: I get the following query: select rt.team_id,count(p.race_id) as cnt,sum(p.points) as sum_score,sum(p.points) / count(p.race_id) as avg_score from group by rt.team_id order by avg_score desc; which gives: +-+--+---+--

Re: SQL order by BUG?

2006-09-06 Thread Jo�o C�ndido de Souza Neto
Try to use 'avg_score desc,sum_score desc' ""Jørn Dahl-Stamnes"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] I get the following query: select rt.team_id,count(p.race_id) as cnt,sum(p.points) as sum_score,sum(p.points) / count(p.race_id) as avg_score from group by rt.team_i

Re: SQL Plus (oracle) and SQL (mysql)

2006-07-31 Thread Josh Trutwin
On Mon, 31 Jul 2006 06:26:01 -0700 (PDT) Phong Nguyen <[EMAIL PROTECTED]> wrote: > My question is if we decide to switch server 1 to > server 2 (oracle database to mysql) or server 2 to > server1 (mysql to oracle). Then, what happen to > sqlplus (oracle) and sql (mysql) using with > application. Y

Re: SQL Plus (oracle) and SQL (mysql)

2006-07-31 Thread Chris White
On Monday 31 July 2006 06:26 am, Phong Nguyen wrote: > My question is if we decide to switch server 1 to > server 2 (oracle database to mysql) or server 2 to > server1 (mysql to oracle). Then, what happen to > sqlplus (oracle) and sql (mysql) using with > application. You can say what are # between

Re: Sql optimization

2006-06-20 Thread Pooly
2006/6/20, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: Hi All, I am using INNODB.I have a delete quetry something like this : delete from modnaptrrecord_zone where modnaptrrecord_zone.modnaptrrecord_id in (593536 ,593537 ,593538 ,593539 ,593540 ) and modnaptrrecord_zone.modnaptrrecord_i

Re: Sql optimization

2006-06-20 Thread Rhino
You're hard-coding ten thousand discrete values between the two IN clauses?? I'm not sure how MySQL processes a query like that but I can imagine that the performance would not be good. Frankly, I am: a) suprised that you had the patience to type in all of those values (and verify that you

Re: SQL naming convention?

2006-06-13 Thread Barry
wolverine my schrieb: Hi! When writting a SQL scripts, do you follow any standard SQL naming convention? Similar to what described in http://kurafire.net/articles/sql-convention Yes. Most of the time. Depends always on where you work and what conventions were used. Does MySQL provides such

Re: sql-99

2006-05-12 Thread sheeri kritzer
http://www.ncb.ernet.in/education/modules/dbms/SQL99/ -Sheeri On 5/10/06, Peng Yi-fan <[EMAIL PROTECTED]> wrote: hi, does anyone know where to download ISO-SQL-99? PDF is best. thanks Pang -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: SQL:2003 standard

2006-05-10 Thread Roland Volkmann
Hello Peng, please have a look at http://www.wiscorp.com/SQLStandards.html There you can download all you need. With best regards, Roland. Peter Brawley wrote on 10.05.2006 16:51: > Peng Yi-fan wrote: >> Hi, >> >> It seems that ISO do not support SQL:2003 standard for free but I really >>

Re: SQL:2003 standard

2006-05-10 Thread Peter Brawley
Peng Yi-fan wrote: Hi, It seems that ISO do not support SQL:2003 standard for free but I really need a copy. Does anyone know where I can download it? Or does anyone have it? Any type will be just OK. There is a 2002 draft at http://xml.coverpages.org/SQLX-5wd-14-xml-2002-08.pdf. PB

Re: SQL Question: alternative to crazy left joins?

2006-03-29 Thread eth1
Thanks Shawn, Believe you me, I share your reaction to this architecture...I had to spend 2 hours coding a ruby script to get the data into the kludgy form needed for the data import (though I do find that thing kind of fun...but it's not the best use of my time on the job). Fortunately the data

Re: SQL Question: alternative to crazy left joins?

2006-03-28 Thread SGreen
eth1 <[EMAIL PROTECTED]> wrote on 03/28/2006 03:04:13 PM: > > Hi All, > > I'm migrating to a contact relationship management system (CRM) for one of > my clients from a proprietary Access database. The CRM system can import > our donor's contact history, but only in a non-normalized format

Re: SQL Foreign Key

2006-03-12 Thread Andreas Krüger
Thanks Michael, that' s the problem. Syntactically my attempt was correct. Only I had the *value '1' in the only row that table `friends`contains, whereas table `category`was still empty*. (I was about creating the database for sample purposes.) When I tried to create the FOREIGN KEY out of fri

Re: SQL Foreign Key

2006-03-12 Thread Michael Stassen
Andreas Krüger wrote: 1) Sorry for not giving you the version: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. *mysql> SELECT VERSION(); +---+ | VERSION() | +---+ | 5.0.17-nt | +---+* 1 row in set (0.00 sec) InnoDB Status after failing i

Re: SQL Foreign Key

2006-03-12 Thread Martijn Tonies
Hello Andreas, You're not telling us what version of MySQL you're using, so I'll have to give it a shot in the dark ... > mysql> SHOW CREATE TABLE friends\G > *** 1. row *** >Table: friends > Create Table: CREATE TABLE `friends` ( > `id`

RE: sql command for exporting database

2006-01-13 Thread Martijn van den Burg
Tony, > Hi Is there any sql commands for dumping/exporing the content > of a database to a file ?? Thanks. Tony. SELECT ... INTO OUTFILE (http://dev.mysql.com/doc/refman/5.0/en/select.html), but that doesn't dump the entire database. From the commandline (i.e. it's not an SQL statement) you can

FW: Re: SQL Question

2006-01-06 Thread Gordon Bruce
. mysql> SELECT ABS(2); -> 2 mysql> SELECT ABS(-32); -> 32 This function is safe to use with BIGINT values. -Original Message- From: Rhino [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 12:19 PM To: Mester József; mysql Subject: [SPAM] - Re:

RE: [SPAM] - Re: SQL Question - Bayesian Filter detected spam

2006-01-06 Thread Gordon Bruce
. mysql> SELECT ABS(2); -> 2 mysql> SELECT ABS(-32); -> 32 This function is safe to use with BIGINT values. -Original Message- From: Rhino [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 12:19 PM To: Mester József; mysql Subject: [SPAM] - Re:

  1   2   3   4   5   6   7   8   >