SQL query needed

2003-10-20 Thread Reto Baumann
Hi all I'm working on a book database with some special requirements. Each book is associated with some keywords and put into a category. Category 0 is special, as this is Unsorted, i.e. not associated with a category (which most books are at the moment). For thei query, let's simplify the

Re: SQL query needed

2003-10-20 Thread Roger Baklund
* Reto Baumann I'm working on a book database with some special requirements. Each book is associated with some keywords and put into a category. Category 0 is special, as this is Unsorted, i.e. not associated with a category (which most books are at the moment). For thei query, let's

SQL query help

2003-10-02 Thread Svein E. Seldal
Hi, I have this table where the columns and rows are organized like this: +--+--+ | a| b| +--+--+ |1 |1 | |2 |1 | |2 |2 | |2 |3 | |2 |4 | |3 |1 | |3 |2 | +--+--+ I want to run a select that gives me one row

Re: SQL query help

2003-10-02 Thread Svein E. Seldal
Hi, I forgot to mention that the table contains more information, it has more columns than just a and b. These extra columns contains the actual information that I'm looking for. I.e. the mentioned table could be looking like this: +--+--+--+--+-+--- | a| b|

SQL query crashes MySQL

2003-09-12 Thread Irwin Boutboul
Here it is: select floor(avg(selection.bandwidth))*8000 as avgbandwidth from (select avg(bandwidth) as bandwidth from FEEDBACK_DOWNLOADS where servername= ? and ( bytesdownloaded 50 or timeduration 3000 ) group by id order by starttime desc limit 20) as selection; This complex (?)

Re: SQL query crashes MySQL

2003-09-12 Thread Sergei Golubchik
Hi! On Sep 12, Irwin Boutboul wrote: Here it is: select floor(avg(selection.bandwidth))*8000 as avgbandwidth from (select avg(bandwidth) as bandwidth from FEEDBACK_DOWNLOADS where servername= ? and ( bytesdownloaded 50 or timeduration 3000 ) group by id order by starttime desc

RE: SQL query crashes MySQL

2003-09-12 Thread Irwin Boutboul
RE: SQL query crashes MySQL Does that crash the server in command-line mode (via mysql) or just in MySQLcc? I've seen similar crashes (actual full server crashes) in similar queries but only under mysqlcc. It seems that the results come back but the server dies just after that point

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

Re: Re[2]: A little SQL query help

2003-07-27 Thread Nils Valentin
Hi Ivan, depending on mark's needs (orginal poster of the question), you might be right. So far I have not so much experience with PHP. Best regards Nils Valentin Tokyo/Japan 2003 7 27 15:43Ivan Cukic : Nils How about LIKE \$%searchdata%\ ? The % sign should be in front of $ LIKE

Re: A little SQL query help

2003-07-27 Thread Obantec Support
- Original Message - From: Nils Valentin [EMAIL PROTECTED] To: Obantec Support [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, July 27, 2003 2:05 AM Subject: Re: A little SQL query help Hi Mark, 2003 7 27 06:09Obantec Support : Hi I have a database supplied to me

Re: A little SQL query help

2003-07-27 Thread Nils Valentin
: Sunday, July 27, 2003 2:05 AM Subject: Re: A little SQL query help Hi Mark, 2003 7 27 06:09Obantec Support : Hi I have a database supplied to me that was excel but now uploaded to mysql. (the data is out of my hands.) i need to search for 1 of 2 categories against 3 fields

A little SQL query help

2003-07-26 Thread Obantec Support
Hi I have a database supplied to me that was excel but now uploaded to mysql. (the data is out of my hands.) i need to search for 1 of 2 categories against 3 fields with user inputted data. example Categories=Lessor , searchtype = BusinessCity searchdata = (user input) $sql = SELECT * FROM

Re: A little SQL query help

2003-07-26 Thread Nils Valentin
Hi Mark, 2003 7 27 06:09Obantec Support : Hi I have a database supplied to me that was excel but now uploaded to mysql. (the data is out of my hands.) i need to search for 1 of 2 categories against 3 fields with user inputted data. example Categories=Lessor , searchtype = BusinessCity

SQL Query Syntax Error

2003-07-08 Thread Trevor Sather
Hello The following query used to work when I was using an Access database, but now that I've moved to MySQL I get a syntax error when I try and run it: SELECT *, (SELECT COUNT (*) FROM Links WHERE Links.CAT_ID = Categories.CAT_ID AND LINK_APPROVED = 'Yes') AS LINK_COUNT FROM Categories ORDER

RE: SQL Query Syntax Error

2003-07-08 Thread Tab Alleman
Trevor Sather wrote: Hello The following query used to work when I was using an Access database, but now that I've moved to MySQL I get a syntax error when I try and run it: SELECT *, (SELECT COUNT (*) FROM Links WHERE Links.CAT_ID = Categories.CAT_ID AND LINK_APPROVED = 'Yes') AS

SQL Query

2003-06-24 Thread Grégory Verret
Hi all, I just looked at the mysql doc and I didnt find an answer to my question. does mysql has the minus statement ? or is there something similar ? SELECT something FROM somewhere MINUS SELECT something_else FROM somewhere; Or this one could do the job but mysql doesnt seems to accept it

Re: SQL Query

2003-06-24 Thread Becoming Digital
www.becomingdigital.com Did I help you? Want to show your thanks? www.amazon.com/o/registry/EGDXEBBWTYUU - Original Message - From: Grégory Verret [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 25 June, 2003 00:31 Subject: SQL Query Hi all, I just looked at the mysql doc and I didnt

SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread vernon
I have a SQL query that needs to reference three different tables. I'm creating an online buddy list of members who are online. I have all of this functioning but am trying to also reference another table where the user is being blocked, in which case I do not what the user's name to be shown

RE: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread Mike Hillyer
= useronline.uname AND penpals_fav.user_id = $colname AND penpals.privmsgs_block.something IS NULL Regards, Mike Hillyer www.vbmysql.com -Original Message- From: vernon [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 8:42 AM To: [EMAIL PROTECTED] Subject: SQL query - 3 tables - 3rd one

RE: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread vernon
OK so now I have something like this: SELECT distinct useronline.uname, penpals_fav.fav_user_id, penpals_fav.ID, penpals_privmsgs_block.user_id, penpals_privmsgs_block.blocked_id FROM useronline, penpals_privmsgs_block left join penpals_fav on penpals_privmsgs_block.user_id WHERE

RE: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread Mike Hillyer
PROTECTED] Subject: RE: SQL query - 3 tables - 3rd one conatins records to not display OK so now I have something like this: SELECT distinct useronline.uname, penpals_fav.fav_user_id, penpals_fav.ID, penpals_privmsgs_block.user_id, penpals_privmsgs_block.blocked_id FROM useronline

RE: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread vernon
OK so now I have: SELECT distinct useronline.uname, penpals_fav.fav_user_id, penpals_fav.ID, penpals_privmsgs_block.user_id, penpals_privmsgs_block.blocked_id FROM useronline, penpals_fav LEFT JOIN penpals_privmsgs_block ON penpals_fav.user_id = penpals_privmsgs_block.user_id WHERE

Re: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread gerald_clark
And what happens if you leave off the 'distinct' ? vernon wrote: OK so now I have: SELECT distinct useronline.uname, penpals_fav.fav_user_id, penpals_fav.ID, penpals_privmsgs_block.user_id, penpals_privmsgs_block.blocked_id FROM useronline, penpals_fav LEFT JOIN penpals_privmsgs_block ON

Re: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread vernon
--- From: gerald_clark [EMAIL PROTECTED] To: vernon [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Mon, 23 Jun 2003 11:13:53 -0500 Subject: Re: SQL query - 3 tables - 3rd one conatins records to not display And what happens if you leave off the 'distinct' ? -- MySQL General Mailing List

RE: SQL query question

2003-06-20 Thread TheMechE
% Etc Etc That would be proper programming form... Did that make sense? -Original Message- From: Rolf C [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 4:57 PM To: [EMAIL PROTECTED] Subject: SQL query question Hello all, I am a totally newby to MYSQL but here i go. I want

SQL query question

2003-06-19 Thread Rolf C
Hello all, I am a totally newby to MYSQL but here i go. I want to create an ASP page that shows an image (screendump of game) a game name a game description and an url. I created a database with the following table: filename, urldesc, desc Now i have to create an SQL query that will put

RE: SQL query question

2003-06-19 Thread Mike Hillyer
Well, from what limited info I have, it looks like your image tag is not closed properly. Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Rolf C [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 2:57 PM To: [EMAIL PROTECTED] Subject: SQL query question

Need to cron an sql query

2003-06-17 Thread Michael Cortes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello. I am a new member to this list. I would like to run an sql query as a cron job and can't figure out how. Here is some background. I have mysql loaded on several of our linux servers. I currently use mysqldump in a cron job in conjuction

Re: Need to cron an sql query

2003-06-17 Thread Kittiphum Worachat
At 01:54 PM 6/17/2003 -0400, Michael Cortes wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello. I am a new member to this list. I would like to run an sql query as a cron job and can't figure out how. Here is some background. I have mysql loaded on several of our linux servers. I

sql Query problem?

2003-06-12 Thread Nishant
Hi, I have a sql query problem... user points table, which I am sorting(order by) points. Now if I want to have some 5 records above and below a certain member, how could I write the sql query for the same? say I want 5 records above and below NICKNAME_14! thanks and regards, point nickname

Nested SQL QUERY

2003-03-29 Thread Eric Leupold
I hope someone can help me with a syntax error I'm getting with a nested query. I'm a newbie. Here is the statement: SELECT * FROM tblmarkets WHERE MarketID IN (SELECT MarketID FROM tblmarketproducts, tblproducts WHERE tblmarketproducts.ProductID = tblproducts.ProductID AND

RE: Nested SQL QUERY

2003-03-29 Thread Wynne Crisman
VALUES(2, 2); INSERT INTO tblmarketproducts VALUES(2, 3); INSERT INTO tblmarketproducts VALUES(4, 2); commit; ~Wynne Crisman -Original Message- From: Eric Leupold [mailto:[EMAIL PROTECTED] Sent: Saturday, March 29, 2003 7:43 AM To: [EMAIL PROTECTED] Subject: Nested SQL QUERY I hope someone

RE: Nested SQL QUERY

2003-03-29 Thread Peter Lovatt
HI MySQL does not support sub selects/nested queries :( Peter -Original Message- From: Eric Leupold [mailto:[EMAIL PROTECTED] Sent: 29 March 2003 16:43 To: [EMAIL PROTECTED] Subject: Nested SQL QUERY I hope someone can help me with a syntax error I'm getting with a nested query. I'm

sql,query

2003-03-21 Thread Karl James
sql,query You have written the following: My code: http://nopaste.php-q.net/8594 My site: http://66.12.3.67/webdb/webdb13/assignment_1a.php My goal: http://66.12.3.67/webdb/webdb19/assign01/index.php == Can anyone help me get this resolved please

RE: sql,query

2003-03-21 Thread Roger Davis
] Subject: sql,query sql,query You have written the following: My code: http://nopaste.php-q.net/8594 My site: http://66.12.3.67/webdb/webdb13/assignment_1a.php My goal: http://66.12.3.67/webdb/webdb19/assign01/index.php == Can anyone help me get

SQL QUERY

2003-03-17 Thread maze . schaller
Problem with the following SQL Query: How do I combine DISTINCT with the SELECT * ? Is it SELECT DISTINCT * FROM...? This doesn´t work in my project. Best regards, Martin Schaller -- +++ GMX - Mail, Messaging more http://www.gmx.net +++ Bitte lächeln! Fotogalerie online mit GMX ohne

Re: SQL QUERY

2003-03-17 Thread Paul DuBois
At 14:40 +0100 3/17/03, [EMAIL PROTECTED] wrote: Problem with the following SQL Query: How do I combine DISTINCT with the SELECT * ? Is it SELECT DISTINCT * FROM...? This doesn´t work in my project. SELECT DISTINCT * FROM ... should work. What is your exact query, and what error message do you

I want sql query result with userid 1st col followed by 1colum for each date all corresp numbers

2003-03-13 Thread DANIEL GADDIS
I have 1 table with 3 fields: date, userid, and a number. I would like an sql query result with the userid for the first column followed by 1 column for each date and all corresponding numbers displayed for that userid for that date. Is there a way to do this using just sql and not php or some

re: FW: mySQL 4.1 sql,query,queries,smallint

2003-03-12 Thread Egor Egorov
On Tuesday 11 March 2003 19:06, Luc Bui (PAC) wrote: when can I get the binariesfor 4.1? Probably in 2-3 weeks .. do 4.0.11a support views? Nope. important for my choice for my community. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is

FW: mySQL 4.1 sql,query,queries,smallint

2003-03-11 Thread Luc Bui (PAC)
or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: sql,query,queries,smallint If you just reply to this message, and include the entire text of it in the reply, your reply will go through. However, you should first review the text

Re[2]: MySQL sql query help

2003-03-09 Thread Ben Balbo
Hi Bruce, Thanks for your reply. I just got the time to take a look at it, and it makes sense. However, for the first test: SELECT distinct t.name FROM Teacher t INNER JOIN (TeacherClass tc2 INNER JOIN Class c2 ON tc2.classid = c2.id AND c2.name = 'English') ON t.teacherid =

Re: MySQL sql query help

2003-03-09 Thread Bruce Feist
Ben Balbo wrote: Seems MySQL doesn't much like having nested joins in joins... Oops! Sorry about that. (Curse me for a MySQL novice! g) However, your principles led me to my result. As the search page will pass the class ids in anyway, I don't need to read these from the table. I.E. I pass

MySQL sql query help

2003-03-07 Thread Ben Balbo
Apologies if you now get this three times now, but I haven't received any copies through the mailing list yet, and the first 2 were sent 3 and 4 hours ago. I know email can go walkies for a few hours, but I've not been experiencing any other mail problems, either personally or in receiving MySQL

MySQL sql query help

2003-03-07 Thread Ben Balbo
Hi all, I've been trying to wrap my head round this problem for a few days now, and have plenty of pieces of scrap paper with lines and arrows and numbers to prove it. Anyway, here's the scenario: I have a table of teachers, and a table of classes. Any teacher can have taught any class, and any

MySQL sql query help

2003-03-07 Thread Ben Balbo
Hi all, I've been trying to wrap my head round this problem for a few days now, and have plenty of pieces of scrap paper with lines and arrows and numbers to prove it. Anyway, here's the scenario: I have a table of teachers, and a table of classes. Any teacher can have taught any class, and any

Re: MySQL sql query help

2003-03-07 Thread Bruce Feist
Ben Balbo wrote: Teacher (id, name, ...) TeacherClass (teacherid, classid, timestamp) Class (id, name, ...) Now, what I'd really like to do it find all teachers who, for example, taught Engligh and Math, but not Biology, Here's a general, recursive, untested solution for you to play with. We

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

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

Re: varchar and java string in sql query ?

2003-02-21 Thread Max Morawski
Jianping Zhu wrote: I and using mysql-jdbc to do some program. I can insert record to my db by following code: - stmt.executeUpdate(insert into apidbusers values('id', 'jp','zhu','em1','jian180'));

varchar and java string in sql query ?

2003-02-19 Thread Jianping Zhu
I and using mysql-jdbc to do some program. I can insert record to my db by following code: - stmt.executeUpdate(insert into apidbusers values('id', 'jp','zhu','em1','jian180')); --- but if

Re: varchar and java string in sql query ?

2003-02-19 Thread KH Chiu
Hi, I am not fimilar with jdbc. But as a general prinple, you should quote your string expl. and it is nearly a must for all language to handle SQL query. May be you should try str='id' instead of str=id. In some language, you must use str = \'id\'. Please check jdbc docs. Regards, I

RE: sql query using select and row functions

2003-01-29 Thread Christopher Lyon
Thank you all for your help. I think that is all I need to do is select it by row. -Original Message- From: R. Hannes Niedner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 2:02 PM To: Christopher Lyon; MySQL Mailinglist Subject: Re: sql query using select and row

sql query using select and row functions

2003-01-28 Thread Christopher Lyon
I am trying to do an sql query and am trying to select the last x rows from the database. I see the limit function but that seems like that is from the first row down. I want to start from the last row to the first row. So, selecting the last 5 rows for instance? Can this be done

RE: sql query using select and row functions

2003-01-28 Thread Mike Hillyer
Why not just reverse your order by clause and use Limit 5? Mike Hillyer -Original Message- From: Christopher Lyon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 9:26 AM To: [EMAIL PROTECTED] Subject: sql query using select and row functions I am trying to do an sql query

Re: sql query using select and row functions

2003-01-28 Thread R. Hannes Niedner
On 1/28/03 8:26 AM, Christopher Lyon [EMAIL PROTECTED] wrote: I am trying to do an sql query and am trying to select the last x rows from the database. I see the limit function but that seems like that is from the first row down. I want to start from the last row to the first row. So

RE: sql query using select and row functions

2003-01-28 Thread Fernando Grijalba
Try ordering the records backwards, e.g ORDER BY id DESC and then limit 0, 5 HTH JFernando * sql * -Original Message- From: Christopher Lyon [mailto:[EMAIL PROTECTED]] Sent: January 28, 2003 11:26 To: [EMAIL PROTECTED] Subject: sql query using select and row functions I am trying

RE: sql query using select and row functions

2003-01-28 Thread Victor Pendleton
AM To: [EMAIL PROTECTED] Subject: sql query using select and row functions I am trying to do an sql query and am trying to select the last x rows from the database. I see the limit function but that seems like that is from the first row down. I want to start from the last row to the first row

RE: sql query using select and row functions

2003-01-28 Thread Christopher Lyon
I would think they would be the same no? It turns out in the database that they are the same. -Original Message- From: Victor Pendleton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 12:23 PM To: Christopher Lyon; [EMAIL PROTECTED] Subject: RE: sql query using select

RE: sql query using select and row functions

2003-01-28 Thread Victor Pendleton
Pendleton; [EMAIL PROTECTED] Subject: RE: sql query using select and row functions I would think they would be the same no? It turns out in the database that they are the same. -Original Message- From: Victor Pendleton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 12:23

Re: sql query using select and row functions

2003-01-28 Thread R. Hannes Niedner
! http://www.mysql.com/doc/en/DATETIME.html http://www.mysql.com/doc/en/Date_and_time_functions.html After reading through the excellent documentation it should be rather straight forward how to do it. Hth/h SQL, QUERY, TABLE P.s. I also strongly recommend to keep the discussion on the list

Re: sql query using select and row functions

2003-01-28 Thread Adolfo Bello
On Tue, 2003-01-28 at 12:26, Christopher Lyon wrote: I am trying to do an sql query and am trying to select the last x rows from the database. I see the limit function but that seems like that is from the first row down. I want to start from the last row to the first row. So, selecting

Normal or strange behaviour of SQL query?

2003-01-14 Thread Peter van der Kamp
Hello, I'm working with mySQL 3.23.32 under Solaris. I have a database with two tables 'bron' and 'topic'. Those tables are related via 'naam_bron'. Lets say that table 'bron' contains 100 records where column 'media' = 'Book' and table 'topic' contains 30 records where column 'topic_code' =

Re: Normal or strange behaviour of SQL query?

2003-01-14 Thread Keith C. Ivey
On 14 Jan 2003, at 15:28, Peter van der Kamp wrote: What should be the result when I issue the following query: select naam_bron from bron, topic where (bron.media=Book) or (topic.naam_bron = bron.naam_bron and topic.topic_code = 5.1); Before posting my results I'll wait for your

Re: Normal or strange behaviour of SQL query?

2003-01-14 Thread Peter van der Kamp
I won't say you need to go back to high school, but maybe you need to review how SQL works. You have no criterion for joining your two At least my knowledge of SQL needs an update. Although there are criteria for joining the two tables I realize that the way I specified them is wrong.

sql query LOAD DATA INFILE question

2002-12-17 Thread moka
sql,query Hi, I am looking at the following situation: I am reading some files arriving every minute and parsing them and creating a set of files ready to be inserted into tables. on the fly. While I am waiting for the next burst of files, I want to insert

re: sql query LOAD DATA INFILE question

2002-12-17 Thread Victoria Reznichenko
On Tuesday 17 December 2002 11:08, moka at hol dot gr wrote: I am looking at the following situation: I am reading some files arriving every minute and parsing them and creating a set of files ready to be inserted into tables. on the fly. While I am waiting for the next

help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal
Hello all, I need to run query like (in mysql ver.4): select * from table1 as t1 where not exists (select NULL from table2 as t2 where t1.field1 = t2.field1) I know you can emulate an 'exists' subquery with a join. but I just can't think of a way to emulate a 'not exists' without a subquery.

RE: help on NOT EXISTS SQL query

2002-12-09 Thread Adolfo Bello
SELECT * FROM table1 t1 LEFT OUTER JOIN table2 t2 ON t1.field1=t2.field2 WHERE t2.field2 IS NULL -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal Sent: Monday, December 09, 2002 11:38 AM To: MySQL List Subject: help on NOT EXISTS SQL

Re: help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal
ON t1.field1=t2.field2 WHERE t2.field2 IS NULL -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal Sent: Monday, December 09, 2002 11:38 AM To: MySQL List Subject: help on NOT EXISTS SQL query Hello all, I need to run query

Re: help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal
Hello Stefan, thanks for the feedback. I think I probably misstated my problem. I just emailed a more explicit example of the sort of thing I am trying to do. for the sake of completeness I'll reproduce it here: table id customer purchase 1 c1 microwave 2 c1 car 3 c1

Re: help on NOT EXISTS SQL query

2002-12-09 Thread Stefan Hinz, iConnect \(Berlin\)
30 7970948-3 - Original Message - From: Murad Nayal [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Monday, December 09, 2002 4:37 PM Subject: help on NOT EXISTS SQL query Hello all, I need to run query like (in mysql ver.4): select * from table1 as t1 where not exists

Re: help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal
t1 LEFT OUTER JOIN table2 t2 ON t1.field1=t2.field2 WHERE t2.field2 IS NULL -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal Sent: Monday, December 09, 2002 11:38 AM To: MySQL List Subject: help on NOT EXISTS SQL query

This is just a test: sql,query,

2002-11-26 Thread Cem Yagli
sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL

RE: SQL Query

2002-11-18 Thread John W Higgins
While not pretty the following would do it SUBSTRING_INDEX(SUBSTRING_INDEX(value, ',', 3), ',', -1) John W Higgins [EMAIL PROTECTED] -Original Message- From: Paul van Brouwershaven [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 5:46 AM To: [EMAIL PROTECTED] Subject: SQL

Re: SQL Query

2002-11-18 Thread Richard Clarke
van Brouwershaven [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, November 16, 2002 4:50 PM Subject: Re: SQL Query First of all, don't do this in mysql . If you got a dump of the database, using cut utility u can easily extract the second field in the delimited by the comma

SQL Query

2002-11-16 Thread Paul van Brouwershaven
Hi, I have a colum with this values : ,1,4,5,66,247,7, ,1,3,5,62,767,6, ,1,5,5,11 ,1,9,5,36,7677,9, ,1,40,55,66,444,3, I want to get whis values : (second field) 4 3 5 9 40 I have tried this : REPLACE(SUBSTRING_INDEX(value, ',', 3), ',','') But the following is returned : 14

RE: SQL Query

2002-11-16 Thread Thoenen, Peter Mr. EPS
Why not just split that field up into multiple fields. Seems ridiculous to have multiple values in a single field in a RDMS -Peter -Original Message- From: Paul van Brouwershaven [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 14:46 To: [EMAIL PROTECTED] Subject: SQL

RE: SQL Query

2002-11-16 Thread Paul van Brouwershaven
I'ts a dump of an other database with more than 4 million records -Original Message- From: Thoenen, Peter Mr. EPS [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 2:54 PM To: 'Paul van Brouwershaven'; [EMAIL PROTECTED] Subject: RE: SQL Query Why not just split

Re: SQL Query

2002-11-16 Thread Dennis Salguero
- Original Message - From: Paul van Brouwershaven [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, November 16, 2002 8:58 AM Subject: RE: SQL Query I'ts a dump of an other database with more than 4 million records Yeah, but that still doesn't mean that you can't use the earlier

RE: SQL Query

2002-11-16 Thread Paul van Brouwershaven
The number of values is also not the same, this can be 1 till +/-30 values -Original Message- From: Dennis Salguero [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 1:46 PM To: Paul van Brouwershaven; [EMAIL PROTECTED] Subject: Re: SQL Query - Original Message

RE: SQL Query

2002-11-16 Thread Paul van Brouwershaven - Networking4all
Sorry it's default -Original Message- From: Peter Brawley [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 5:23 PM To: Paul van Brouwershaven Subject: Re: SQL Query Please do NOT mark posted messages 'request reply'. - - Original Message - From

Re: SQL Query

2002-11-16 Thread Gurhan Ozen
First of all, don't do this in mysql . If you got a dump of the database, using cut utility u can easily extract the second field in the delimited by the comma.. and then split them into different columns in the table when you want to insert them into the mysql database. If you are still

Re: SQL Query

2002-11-16 Thread Gelu Gogancea
address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Paul van Brouwershaven [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, November 16, 2002 3:45 PM Subject: SQL Query Hi, I have a colum with this values

Re: Newbie to the list ...no [MYSQL] in the subject sql query not problem.???

2002-11-12 Thread working4aliving
filter. To bypass the filter you must include one of the following words in your message: sql,query If you just reply to this message, and include the entire text of it in the reply, your reply will go through. However, you should first review the text of the message to make sure it has

SQL Query

2002-11-07 Thread Sam4Software
Hi, I have the following SQL query, that returns the correct records on Access, but when I use it with MySQL, it returns duplicate records, and it skips the required records. SearchSQL=select MarketData.CustID,Contacts.ContactID,Contacts.CustID,MarketData.Nickname,Marke tData.Occupation

RE: SQL Query

2002-11-07 Thread Fernando Grijalba
] Sent: November 7, 2002 16:18 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: SQL Query Hi, I have the following SQL query, that returns the correct records on Access, but when I use it with MySQL, it returns duplicate records, and it skips the required records. SearchSQL=select MarketData.CustID

Re: SQL Query

2002-11-07 Thread John Coder
On Thu, 2002-11-07 at 16:17, [EMAIL PROTECTED] wrote: Hi, I have the following SQL query, that returns the correct records on Access, but when I use it with MySQL, it returns duplicate records, and it skips the required records. SearchSQL=select MarketData.CustID,Contacts.ContactID

Re: syntax help , sql,query

2002-10-08 Thread Roger Baklund
* Dragos Madalin Popa I am trying to run this update statement, but I got an error syntax...near offsetCould You please point out what is wrong? Update TIMEZONE_INFO set ABBREVIATION = 'GMT' || to_char(OFFSET) where ABBREVIATION is null; Use the CONCAT function: URL:

re: syntax help , sql,query

2002-10-08 Thread Victoria Reznichenko
Dragos, Monday, October 07, 2002, 7:30:47 PM, you wrote: DMP I am trying to run this update statement, but I got an error syntax...near DMP offsetCould You please point out what is wrong? DMP Update TIMEZONE_INFO set ABBREVIATION = 'GMT' || to_char(OFFSET) where DMP ABBREVIATION is null;

syntax help , sql,query

2002-10-07 Thread Dragos Madalin Popa
sql,query Hi, I am trying to run this update statement, but I got an error syntax...near offsetCould You please point out what is wrong? Update TIMEZONE_INFO set ABBREVIATION = 'GMT' || to_char(OFFSET) where ABBREVIATION is null; Thank You, Best Regards, Madalin

SQL Query Help

2002-10-04 Thread David McInnis
a sql query that will allow me to pull get the tax amount on all orders where product id is 1, 2 or 3 for example. The problem that I have is when I do a straight join on select tax from orders, orderdetail where orders.id = orderdetail.orderid and (productid = 1 or productid = 2 or productid

Re: SQL Query Help

2002-10-04 Thread Shane Allen
and an orderdetail table with ordered, itemid and qty. What I need to do is form a sql query that will allow me to pull get the tax amount on all orders where product id is 1, 2 or 3 for example. The problem that I have is when I do a straight join on select tax from orders, orderdetail where

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

RE: Complex SQL query problem...

2002-09-23 Thread Richard Bolen
is not NULL) or (colors.parent_id is not NULL)) I need to do some more testing to be sure. Rich -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 08:46 To: Richard Bolen Subject: RE: Complex SQL query problem... After I sent this it hit me

RE: Complex SQL query problem...

2002-09-23 Thread Edward Peloke
great! hope it works ! -Original Message- From: Richard Bolen [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 9:17 AM To: MySQL Mailing List (E-mail) Cc: Edward Peloke Subject: RE: Complex SQL query problem... FYI - this query seemed to work. select * from nodes left join

Complex SQL query problem...

2002-09-20 Thread Richard Bolen
I'm trying to use a sql query to determine if an ID exists in any of 3 different tables in the database. I need to do this in one SQL query (ideally only using the ID once in the query). I'm using mysql 3.23.47. Here's an example of a query I came up with: select count(*) from jobs

RE: Complex SQL query problem...

2002-09-20 Thread Edward Peloke
, September 20, 2002 2:37 PM To: MySQL Mailing List (E-mail) Subject: Complex SQL query problem... I'm trying to use a sql query to determine if an ID exists in any of 3 different tables in the database. I need to do this in one SQL query (ideally only using the ID once in the query). I'm using mysql

RE: Complex SQL query problem...

2002-09-20 Thread Richard Bolen
(E-mail) Subject: RE: Complex SQL query problem... try a left join select count(*) from jobs left join submissions on jobs.standard_id=submissions.color_id where jobs.standard_id=ID_VALUE and submissions.color_id is null Eddie -Original Message- From: Richard

Re: table creation error with innodb/ sql,query

2002-09-17 Thread kayamboo
PROTECTED] To: "kayamboo" [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 5:35 PM Subject: Re: table creation error with innodb/ sql,query InnoDB requires that you have an index on both ends of a foreign key constraint. Thus, you need to index the "type" field of the pers

<    1   2   3   4   5   >