sql syntax error

2014-08-08 Thread florent larose
hello, i am working on my personal website wih php 5.4.16 / mysql 5.6.12 (my system : windows 7 / wampserver 2). i have a bug when i am running my connection to database webpage. My error message is the following : Erreur SQL : You have an error in your SQL syntax; check the manual

Re: sql syntax error

2014-08-08 Thread Johan De Meersman
- Original Message - From: florent larose florent.lar...@hotmail.com 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

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: [PHP] SQL Syntax

2010-06-16 Thread Nigel Wood
[ I have 2 tables. Table A containing 2 fields. A user ID and a picture ID = A(uid,pid) and another table B, containing 3 fields. The picture ID, an attribute ID and a value for that attribute = B(pid,aid,value). Table B contains several rows for a single PID with various AIDs and values.

Re: [PHP] SQL Syntax

2010-06-16 Thread Nigel Wood
On Wed, 2010-06-16 at 08:59 +0100, Nigel Wood wrote: I'd use: drop temporary table if exists AttSearchMatches; select pid as targetPid, count(*) as criteraMatched from B where userId=35 and ( (b.aid=1 and b.value 50) OR (b.aid=3 and b.value =4) ) group by pid having criteraMatched = 2; drop

Re: [PHP] SQL Syntax

2010-06-16 Thread Joerg Bruehe
Hi! Daniel Brown wrote: [Top-post.] You'll probably have much better luck on the MySQL General list. CC'ed on this email. On Tue, Jun 15, 2010 at 20:58, Jan Reiter the-fal...@gmx.net wrote: Hi folks! [[...]] I have 2 tables. Table A containing 2 fields. A user ID and a

Re: [PHP] SQL Syntax

2010-06-15 Thread Daniel Brown
[Top-post.] You'll probably have much better luck on the MySQL General list. CC'ed on this email. On Tue, Jun 15, 2010 at 20:58, Jan Reiter the-fal...@gmx.net wrote: Hi folks! I'm kind of ashamed to ask a question, as I haven't followed this list very much lately. This isn't

Re: Now() : SQL syntax error. But why?

2009-04-30 Thread Antonio PHP
Thanks, Scott. I thought I couldn't have missed ','(comma) before. But today somehow it works... ;; I wasted hours figuring this out, but you saved me! Maybe I'm still a complete newbie! Thanks, again. Have a great day. :) On Thu, Apr 30, 2009 at 12:52 PM, Scott Haneda talkli...@newgeo.com

Re: Now() : SQL syntax error. But why?

2009-04-30 Thread Scott Haneda
Always echo out your SQL string, it will make it a lot more obvious. You want to see the result. I php concatenated string can be confusing at times. Also, you are not escaping your data, so if you had a word of 'stops, here' that would break it as well. So in your case, you very well

Re: Now() : SQL syntax error. But why?

2009-04-29 Thread Antonio PHP
, and only one field can support that feature. Please supply more data. On Apr 28, 2009, at 2:18 PM, Antonio PHP wrote: 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 'Created = NOW(), Updated = NOW

Re: Now() : SQL syntax error. But why?

2009-04-29 Thread Scott Haneda
On Apr 29, 2009, at 11:29 AM, Antonio PHP wrote: This is MySQL data structure. - I underlined where it causes the error message. (datetime) `id_Company` smallint(6) unsigned NOT NULL AUTO_INCREMENT, `Name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL `Revenue` mediumint(6)

Now() : SQL syntax error. But why?

2009-04-28 Thread Antonio PHP
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 'Created = NOW(), Updated = NOW()' at line 8 'Created' and 'Updated' are set to datetime (InnoDB). The same syntax works for some newly created tables

Re: Now() : SQL syntax error. But why?

2009-04-28 Thread Martijn Engler
Can you please give the full table structure and query? On Tue, Apr 28, 2009 at 23:18, Antonio PHP php.anto...@gmail.com wrote: 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 'Created = NOW(), Updated = NOW

Re: Now() : SQL syntax error. But why?

2009-04-28 Thread Scott Haneda
We need to see your entire query and the table structure. timestamp fields can have options set to auto update them, where order matters, and only one field can support that feature. Please supply more data. On Apr 28, 2009, at 2:18 PM, Antonio PHP wrote: You have an error in your SQL

Re: SQL syntax

2006-12-31 Thread Rhino
- Original Message - From: Scott Yamahata [EMAIL PROTECTED] To: mysql@lists.mysql.com 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

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

SQL syntax

2006-12-28 Thread Scott Yamahata
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 Barbara', countryid = , enabled = '1

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: mysql@lists.mysql.com Sent: Friday, December 29, 2006 11:59 AM Subject: SQL syntax Hi, I'm getting the following

Re: SQL syntax

2006-12-28 Thread ViSolve DB Team
the value of column blank. INSERT INTO clf_cities SET cityname = 'Santa Barbara', countryid =NULL , enabled = '1' Thanks, ViSolve DB Team - Original Message - From: Scott Yamahata [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, December 29, 2006 11:59 AM Subject: SQL syntax

ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread Mark Sargent
)| as well as renaming it from |b| to |c|: ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20); for changing the name of a column, right? So, why doesn't the below work? mysql ALTER TABLE actors CHANGE director_id actor_id; I get this, ERROR 1064 (42000): You have an error in your SQL

Re: ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread Chris Sansom
At 0:09 +1000 8/6/06, Mark Sargent wrote: ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20); for changing the name of a column, right? So, why doesn't the below work? mysql ALTER TABLE actors CHANGE director_id actor_id; I'm no great expert myself, but off the top of my head,

re: ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread Rob Desbois
(42000): 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 '' at line 1 Sorry, little confused right about now, eh. Cheers. Mark Sargent. -- MySQL General Mailing List For list archives: http://lists.mysql.com

RE: ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread J.R. Bullington
: ERROR 1064 (42000): You have an error in your SQL syntax; Hi All, gee I really hate bugging you all for this. I looked at this page, http://dev.mysql.com/doc/refman/5.0/en/alter-table.html which has this, To change column |a| from |INTEGER| to |TINYINT NOT NULL| (leaving the name the same

re: ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread Chris Sansom
At 15:19 +0100 7/6/06, Rob Desbois wrote: With the CHANGE clause of ALTER TABLE statement, you must provide the column definition, so something like this is what you need: ALTER TABLE actors CHANGE director_id actor_id MEDIUMINT UNSIGNED NOT NULL; or whatever your original definition is.

SQL Syntax Errors

2005-06-29 Thread Siegfried Heintze
failed: 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 'WHERE dtSnapShot ='2005-06-26' AND fkJobPosting = 209689' at li at ./crawl-hot-jobs.pl line 686. Use of uninitialized value in concatenation (.) or string

Re: SQL Syntax Errors

2005-06-29 Thread SGreen
= 209689' select='SELECT cJobTitle FROM jobtitlecount WHERE fkJobPosting = 209689 AND dtSnapShot = '2005-06-26''Duplicate entry '209689-2005-06-26' for key 1 DBD::mysql::st execute failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version

(oops, corrections to that last email message) RE: SQL Syntax Errors

2005-06-29 Thread Siegfried Heintze
line 675. How could this be? Now here is another example where I detect a duplicate and delete the statement before trying to insert: DELETE jobtitlecount WHERE dtSnapShot ='2005-06-26' AND fkJobPosting = 211151 DBD::mysql::st execute failed: You have an error in your SQL syntax. Check the manual

Re: (oops, corrections to that last email message) RE: SQL Syntax Errors

2005-06-29 Thread Michael Stassen
code (not an edited version). Now here is another example where I detect a duplicate and delete the statement before trying to insert: DELETE jobtitlecount WHERE dtSnapShot ='2005-06-26' AND fkJobPosting = 211151 DBD::mysql::st execute failed: You have an error in your SQL syntax. Check

ERROR 1064: You have an error in your SQL syntax....

2005-04-08 Thread Chuzo Okuda
. The following caused the same error of: ERROR 1064: 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 'select max(length(testName)) from test)' at line 1 select testName from test where length(testName) = (select max

Re: ERROR 1064: You have an error in your SQL syntax....

2005-04-08 Thread Peter Brawley
. The following caused the same error of: ERROR 1064: 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 'select max(length(testName)) from test)' at line 1 select testName from test where length(testName) = (select max

SQL-Syntax Check

2005-03-15 Thread Christian Klinger
Hello Users does anyone know a tool or a way for validation sqlcode on the command_line??? For example ./sqlsyntaxchecker select * f test -- Error not valid sql syntax thx christian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

SQL syntax error: help a noob

2005-01-31 Thread Chris Kavanagh
Dear list, My ColdFusion server tells me I have an error in my query syntax, but I can't work out what it is - because I'm working with code that someone very kindly gave me and I only have a vague idea of what the first line's doing! Can anyone see the problem here? SELECT

Re: SQL syntax error: help a noob

2005-01-31 Thread Roger Baklund
Chris Kavanagh wrote: My ColdFusion server tells me I have an error in my query syntax, but I can't work out what it is - because I'm working with code that someone very kindly gave me and I only have a vague idea of what the first line's doing! Can anyone see the problem here? SELECT

RE: SQL syntax error: help a noob

2005-01-31 Thread Tom Crimmins
[snip] My ColdFusion server tells me I have an error in my query syntax, but I can't work out what it is - because I'm working with code that someone very kindly gave me and I only have a vague idea of what the first line's doing! Can anyone see the problem here? SELECT DATEDIFF(leadtime_type,

Re: SQL syntax error: help a noob

2005-01-31 Thread Chris Kavanagh
Thanks very much for the replies, guys. My version is 4.1.7-max. The error message I get is: -- Error Executing Database Query. Syntax error or access violation: 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

RE: SQL syntax error: help a noob

2005-01-31 Thread Tom Crimmins
I think datediff only takes two arguments and you have three listed. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- From: Chris Kavanagh Sent: Monday, January 31, 2005 5:33 PM To: mysql@lists.mysql.com Subject: Re: SQL syntax error: help a noob

SOLVED: SQL syntax error: help a noob

2005-01-31 Thread Chris Kavanagh
On 31 Jan 2005, at 11:39 pm, Tom Crimmins wrote: I think datediff only takes two arguments and you have three listed. Nailed it! Thanks, Tom. Best regards, CK. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

error in your SQL syntax

2005-01-26 Thread Daniel Sousa
I have a problem. 1064 - You have an error in your SQL syntax near '(((specials INNER JOIN (products_to_categories INNER JOIN categories ON products' at line 2 SELECT DISTINCT specials.specials_id, products_to_categories.products_id, categories.parent_id, products_description.products_name

Re: error in your SQL syntax

2005-01-26 Thread Rhino
. Are the different machines all running the exact same version of MySQL? Rhino - Original Message - From: Daniel Sousa [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Wednesday, January 26, 2005 6:45 AM Subject: error in your SQL syntax I have a problem. 1064 - You have an error

Re: error in your SQL syntax

2005-01-26 Thread SGreen
have an error in your SQL syntax near '(((specials INNER JOIN (products_to_categories INNER JOIN categories ON products' at line 2 SELECT DISTINCT specials.specials_id, products_to_categories. products_id, categories.parent_id, products_description. products_name, products.products_price

Re: error in your SQL syntax

2005-01-26 Thread Daniel Sousa
: error in your SQL syntax Here is your original query, reformatted merely so that we humans can read it better: SELECT DISTINCT specials.specials_id , products_to_categories.products_id , categories.parent_id , products_description.products_name

RE: error in your SQL syntax

2005-01-26 Thread Artem Koltsov
: error in your SQL syntax Thanks, works fines. I use access because i don´t know a GUI tool that make SQL querys more easy. Thanks all again, Daniel Sousa - Original Message - From: [EMAIL PROTECTED] To: Daniel Sousa Cc: mysql@lists.mysql.com Sent

SQL syntax error

2004-11-13 Thread Stuart Felenstein
VendorJobs.Industry = '2','3','4','5'Query failed: 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 '.Industry = '2','3','4','5'' at line 2 The first is the printout of my statement followed by the mysql_error . Here

Re: SQL syntax error

2004-11-13 Thread Jim Winstead
On Sat, Nov 13, 2004 at 12:30:43PM -0800, Stuart Felenstein wrote: $sql = SELECT PostStart, JobTitle, Industry, LocationState, VendorID FROM VendorJobs; echo $sql; //if ($Ind) $sql .= WHERE VendorJobs.Industry = $s_Ind; As you can see above s_ind is an array , comma delimited.

Re: SQL syntax error

2004-11-13 Thread Stuart Felenstein
--- Jim Winstead [EMAIL PROTECTED] wrote: You can't compare a column with a comma-delimited list of numbers like that... What should the seperator be then ? Thank you Stuart -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: SQL syntax error

2004-11-13 Thread Jim Winstead
On Sat, Nov 13, 2004 at 12:46:12PM -0800, Stuart Felenstein wrote: --- Jim Winstead [EMAIL PROTECTED] wrote: You can't compare a column with a comma-delimited list of numbers like that... What should the seperator be then ? My point was that you can't compare a column with an

Re:[SOLVED] SQL syntax error

2004-11-13 Thread Stuart Felenstein
--- Jim Winstead [EMAIL PROTECTED] wrote: My point was that you can't compare a column with an array of numbers using the '=' operator. You have to use the IN operator, as in the line of code I posted: Thank you Jim , it's working now! Stuart -- MySQL General Mailing List For list

RE: SQL Syntax Problem

2004-11-11 Thread Adams, Pat 006
-Original Message- From: David Blomstrom [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 4:08 PM To: [EMAIL PROTECTED] Subject: SQL Syntax Problem $sql = 'SELECT F.IDArea, C.IDArea, C.Name, C.Pop, C.Nationality, C.NationalityPlural, C.NationalityAdjective FROM

Re: SQL Syntax Problem

2004-11-11 Thread Ligaya Turmelle
Think I found it. I made the changes with explanations of what I did. If you have any further questions feel free to ask. Oh and this should be on the list for others to see and maybe learn from Respectfully, Ligaya Turmelle head[DATABASE CONNECTION]/head body div class=formdiv

Re: SQL Syntax Problem

2004-11-11 Thread David Blomstrom
--- Ligaya Turmelle [EMAIL PROTECTED] wrote: Think I found it. I made the changes with explanations of what I did. If you have any further questions feel free to ask. Oh and this should be on the list for others to see and maybe learn from Wow, thanks so much for going to all that

SQL Syntax Problem

2004-11-10 Thread David Blomstrom
This may be a purely PHP problem, but the error message says SQL syntax. Check the manual that corresponds to your MySQL server version... More important, I haven't been able to find a solution on any PHP forums. :) This is the complete error message: Failed to run SELECT F.IDArea, C.IDArea

Re: SQL Syntax Problem

2004-11-10 Thread Michael J. Pawlowsky
It's not translating your vars to their respective values. I didn't look to see why... But MySQL doesn't know what $_POST['order'] is. David Blomstrom wrote: This may be a purely PHP problem, but the error message says SQL syntax. Check the manual that corresponds to your MySQL server version

Re: SQL Syntax Problem

2004-11-10 Thread Ligaya Turmelle
to their respective values. I didn't look to see why... But MySQL doesn't know what $_POST['order'] is. David Blomstrom wrote: This may be a purely PHP problem, but the error message says SQL syntax. Check the manual that corresponds to your MySQL server version... Failed to run SELECT F.IDArea

Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread Eve Atley
administration. -- I can't decide if this is my code, or the SQL syntax. Would it be possible, based on this statement, to have pulled back duplicates from the same record? - Eve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread Michael Stassen
Over 10 years of HTML experience. 2 years networking administration. -- I can't decide if this is my code, or the SQL syntax. Would it be possible, based on this statement, to have pulled back duplicates from the same record? - Eve -- MySQL General Mailing List For list archives: http

RE: Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread Victor Pendleton
You have a cartesian join because you do not have join criteria between the resume and candidate tables. -Original Message- From: Eve Atley To: [EMAIL PROTECTED] Sent: 8/17/04 12:22 PM Subject: Assistance with SQL syntax: pulling duplicates back I think this is an easy question...I've

Re: Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread SGreen
network php Over 10 years of HTML experience. 2 years networking administration. -- I can't decide if this is my code, or the SQL syntax. Would it be possible, based on this statement, to have pulled back duplicates from the same record? - Eve -- MySQL

Re: Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread Michael Stassen
if this is my code, or the SQL syntax. Would it be possible, based on this statement, to have pulled back duplicates from the same record? - Eve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread Michael Stassen
Eve, Best to keep threads on the list. Others may have better ideas, and future readers may benefit. The comparison candidate.Location IN ('CA', 'California') will match 'CA' and 'California', but will not match 'Cupertino, CA' because it isn't either of those strings. To match that row as

RE: SQL Syntax Question

2004-08-04 Thread Karl-Heinz Schulz
-Heinz Schulz; [EMAIL PROTECTED] Subject: Re: SQL Syntax Question - Original Message - From: Karl-Heinz Schulz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 9:18 PM Subject: SQL Syntax Question I tried to get an answer on the PHP mailing list and I was told

Re: SQL Syntax Question

2004-08-04 Thread Philippe Poelvoorde
Karl-Heinz Schulz wrote: Thank you for trying to help me. The output is wrong I get either Event 1 Event 2 Details 1 for event 1 Details 2 for event 1 Details 3 for event 1 that query is wrong : $eventdetail_query = mysql_query(select informations, titles, file_name from eventdetail, event where

RE: SQL Syntax Question

2004-08-04 Thread Karl-Heinz Schulz
] Sent: Wednesday, August 04, 2004 5:52 AM To: Karl-Heinz Schulz Cc: [EMAIL PROTECTED] Subject: Re: SQL Syntax Question Karl-Heinz Schulz wrote: Thank you for trying to help me. The output is wrong I get either Event 1 Event 2 Details 1 for event 1 Details 2 for event 1 Details 3

Re: SQL Syntax Question

2004-08-04 Thread Rhino
- Original Message - From: Karl-Heinz Schulz [EMAIL PROTECTED] To: 'Philippe Poelvoorde' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 6:41 AM Subject: RE: SQL Syntax Question Philippe, I changed my to the following but the result is now (I deleted

SQL Syntax Question

2004-08-03 Thread Karl-Heinz Schulz
I tried to get an answer on the PHP mailing list and I was told that this list would be quicker to get me a solution. I have two tables Event and Eventdetails (structures dump can be found at the end of the message). I want to display all events and the related information from the eventdetails

Re: SQL Syntax Question

2004-08-03 Thread Rhino
- Original Message - From: Karl-Heinz Schulz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 9:18 PM Subject: SQL Syntax Question I tried to get an answer on the PHP mailing list and I was told that this list would be quicker to get me a solution. I have two

MySQL -- SQL syntax error.....

2004-06-16 Thread Scott Fletcher
When I use this SQL statement, ... --snip-- UPDATE BUSINESS_CATEGORY SET (BUSINESS_CATEGORY.BUS_CAT,BUSINESS_CATEGORY.BUS_DESC) = ('JUNKKK','JUNK123KK') WHERE BUSINESS_CATEGORY.BUS_CAT_ID = '733788' --snip-- I get the SQL syntax error saying, --snip-- You have an error in your SQL syntax

RE: MySQL -- SQL syntax error.....

2004-06-16 Thread Mike Johnson
From: Scott Fletcher [mailto:[EMAIL PROTECTED] When I use this SQL statement, ... --snip-- UPDATE BUSINESS_CATEGORY SET (BUSINESS_CATEGORY.BUS_CAT,BUSINESS_CATEGORY.BUS_DESC) = ('JUNKKK','JUNK123KK') WHERE BUSINESS_CATEGORY.BUS_CAT_ID = '733788' --snip-- I get the SQL syntax error

Re: MySQL -- SQL syntax error.....

2004-06-16 Thread SGreen
: Fax to: 06/16/2004 04:08 Subject: MySQL -- SQL syntax error

sql syntax error

2004-04-20 Thread Aaron P. Martinez
I'm using amavisd-new -20030616p9, RH 3.0 ES and mysql 3.23.58-1 trying to do sql lookups for user prefs. I've done this before and have compared my sql statements and can't figure out the problem. When i start amavisd-new with the debug switch, here's what i get: # /usr/local/sbin/amavisd

SQL syntax? [Select within Insert]

2004-01-04 Thread EP
Struggling to get an INSERT to work, can anyone help? Here's my scenario: Students[table] Student_ID [primary key, auto-increment] Student_name Student_sex Extra_Credit[table] EC_ID [primary key, auto-increment] Student_ID Points First: INSERT INTO

Re: SQL syntax? [Select within Insert]

2004-01-04 Thread Aleksandar Bradaric
Hi, Then: INSERT INTO Extra_Credit (Student_ID, Points) SELECT MAX(Student_ID) from Students, (1) ...VALUE ('25'); or (2) ... '25' as Points; I think this is your query: INSERT INTO Extra_Credit(Student_ID, Points) SELECT MAX(Student_ID), '25' from Students Take care, Aleksandar

Re: SQL syntax? [Select within Insert]

2004-01-04 Thread Michael Stassen
As I understand it, you don't really want the MAX(Student_ID), you want the actual Student_ID of the last insert. It is important to note that they are not necessarily the same. If you insert Student 24, then I insert Student 25, then you check MAX(Student_ID), you will get 25, not 24.

SQL syntax error

2004-01-01 Thread Asif Iqbal
Hi All I have been pushing my syslogs to the following mysql table However whenever it sees lines with a ' (apostrophe) it complains about SQL syntax Here are two lines with ' from my syslog: Jan 1 03:58:15 dal-svcs-02.inet.qwest.net 203: *Jan 1 08:58:13.926 UTC: %PFINIT-SP-5-CONFIG_SYNC

Re: SQL syntax error

2004-01-01 Thread Frederic Wenzel
Hi Asif, Asif Iqbal wrote: I have been pushing my syslogs to the following mysql table However whenever it sees lines with a ' (apostrophe) it complains about SQL syntax You need to escape those reserved characters, i.e. have ' replaced by \' because otherwise mysql will treat the apostrophe

sql syntax

2003-10-17 Thread Marlon
Hello, my name's Marlon. I have a question about sql and I need some help! How can I do something like it using mysql? update registre set (name='NewName' where lastname='OldLastName'), (name='OldName' where lastname='NewLastName'); Tank you Marlon

Re: sql syntax

2003-10-17 Thread Chris Boget
Hello, my name's Marlon. I have a question about sql and I need some help! How can I do something like it using mysql? update registre set (name='NewName' where lastname='OldLastName'), (name='OldName' where lastname='NewLastName'); I _believe_ you can do it this way. I'm sure someone

sql syntax problem with mysql 3.23.49

2003-10-09 Thread Frederik Himpe
ON onderneming.rubriek_ID_3 = r3.rubriek_ID WHERE 1 ORDER BY officiele_naam LIMIT 100 #1064 - You have an error in your SQL syntax near 'ON onderneming.bedrijfsnummer = vestiging.bedrijfsnummer LEFT JOIN rubrieken AS' at line 3 What exactly is the cause of this error here? Could it be that mysql3 does not support

SQL syntax on an UPDATE

2003-09-04 Thread Adam Hardy
Hi All, I'm programming a method to delete a parent record and all its children in a child table in one go. This is what I have: UPDATE item i, category_item ci SET i.date_deleted = ?, ci.date_deleted = ? WHERE ci.item_id = i.item_id AND ci.category_id = ? and it works. But then I realised that

SQL Syntax question

2003-08-27 Thread Roberts, Mark (Tulsa)
These are tables that I did not design (and would not have in this fashion), but I have to make do with them Table 1 structure: id_num number, descr1 varchar(30), descr2 varchar(30), descr3 varchr(30) Table 2 structure id_name varchar(15), ext_descr varchar(30) Table 2 is a child of table 1

SQL Syntax

2003-07-22 Thread Cory Lamle
Contents are Direct Alliance Corporation CONFIDENTIAL - How do you type check in mysql. I have a column of type varchar(20) with both floats and strings. Is there a way to check the type? Example: Select If(is_float(col1), 'is a float', 'not a float') as

Re: SQL Syntax

2003-07-22 Thread Paul DuBois
At 11:40 -0700 7/22/03, Cory Lamle wrote: Contents are Direct Alliance Corporation CONFIDENTIAL - How do you type check in mysql. I have a column of type varchar(20) with both floats and strings. Is there a way to check the type? In this case, the type of the column as far as MySQL is concerned

RE: SQL Syntax

2003-07-22 Thread Rob A. Brahier
Message- From: Cory Lamle [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2003 2:40 PM To: MySQL LIST Subject: SQL Syntax Contents are Direct Alliance Corporation CONFIDENTIAL - How do you type check in mysql. I have a column of type varchar(20) with both floats and strings

Re: SQL Syntax

2003-02-02 Thread Benjamin Pflugmann
On Sat 2003-02-01 at 10:35:46 -, [EMAIL PROTECTED] wrote: Hi Benjamin, Wow, that sure sorted that problem out... I had to rejig it slightly to get it to work, Oops... too much copypaste by me :-) but this is the final working version: Glad it worked out. Bye, Benjamin.

SQL Syntax (JOINS) Help

2003-02-01 Thread Kevin Smith
is the error message MySQL reports: ERROR 1064: You have an error in your SQL syntax near '(product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at line 9 Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the correct syntax? Just give you a better idea

RE: SQL Syntax

2003-02-01 Thread Sherzod Ruzmetov
)=4)); : : Here is the error message MySQL reports: : : ERROR 1064: You have an error in your SQL syntax near : '(product_options AS : product_options_1 RIGHT JOIN (basket_header INNER JOIN : baske' at line 9 : : Seems MySQL doesn't like the RIGHT JOIN syntax

Re: SQL Syntax

2003-02-01 Thread Benjamin Pflugmann
, basket.price, basket.quantity, total, basket_header.basket_id, products.options HAVING basket_header.basket_id=4; Here is the error message MySQL reports: ERROR 1064: You have an error in your SQL syntax near '(product_options AS product_options_1 RIGHT JOIN (basket_header INNER

Re: SQL Syntax Help

2003-02-01 Thread Bob Hall
On Fri, Jan 31, 2003 at 02:07:11PM -, Kevin Smith wrote: Hi All, Can anyone help me get this query working in MySQL, this was created using Access, but it doesn't port well for MySQL syntax: SELECT b.id, p.part_code, p.product_type, p.description, po1.options, b.price, b.quantity,

Re: SQL Syntax

2003-02-01 Thread Kevin Smith
work out why I couldn't do that so I can better understand it. Kevin - Original Message - From: Benjamin Pflugmann [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, February 01, 2003 4:32 AM Subject: Re: SQL Syntax Hi. On Fri 2003-01-31 at 15:46

SQL Syntax Help

2003-01-31 Thread Kevin Smith
, b.price*b.quantity, bh.basket_id, p.options HAVING (((bh.basket_id)=4)); Here is the error message MySQL reports: You have an error in your SQL syntax near '(product_options AS po1 RIGHT JOIN (basket_header AS bh INNER JOIN basket AS b O' at line 1 Any ideas to the correct syntax? Thanks, Kevin

SQL Syntax

2003-01-31 Thread Kevin Smith
MySQL reports: ERROR 1064: You have an error in your SQL syntax near '(product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at line 9 Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the correct syntax? Thanks, Kevin

Re: SQL Syntax

2003-01-31 Thread Kevin Smith
: Friday, January 31, 2003 3:46 PM Subject: SQL Syntax Hi All, Can anyone help me get this query working in MySQL, this was created using Access, but it doesn't port well for MySQL syntax: SELECT basket.id, products.part_code, products.product_type, products.description

Re: Thanks and SQL Syntax help

2003-01-13 Thread Diana Soares
I don't know if i understood you very well, but here's a try.. mysql select * from Classes; ++-+ | ID | Name| ++-+ | 1 | XO-312 | | 2 | PA-211a | | 3 | XUL-001 | ++-+ 3 rows in set (0.00 sec) mysql select * from Workshops order by ClassID,Date;

Replication halts with sql syntax error

2003-01-13 Thread markb
.com MySQL support: none Synopsis: Replication halts with sql syntax error Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.54 (Official MySQL RPM) Server: /usr/bin/mysqladmin Ver 8.23 Distrib 3.23.54, for pc-linux on i686

Thanks and SQL Syntax help

2003-01-11 Thread Steve Lefevre
First of, thanks to all who replied to my questions earlier! Now I have another problem. I have a table of Classes and Workshops. Each Class has a number of workshops. Each workshop has a date. I have a query that gives me the date range of a class - the min and max dates of its workshops.

Re: sql syntax help

2002-10-07 Thread Brent Baisley
You almost got it. Your syntax will be something like this: UPDATE Table SET address=REPLACE(address,'#','Number') WHERE column like%#% When I am trying to figure out the syntax for something, I always add a LIMIT 1 at the end so that only one record gets changed. On Saturday, October 5,

re: sql syntax help

2002-10-07 Thread Victoria Reznichenko
Scott, Saturday, October 05, 2002, 7:45:16 AM, you wrote: SJ I have a db with slightly over 614,000 records of names and addresses. In SJ the address column, there are quite a few records like SJ 123 any rd # 2 SJ 319 w. 1st st # B SJ 4321 test blvd # 42 SJ etc SJ I want to replace all the

sql syntax help

2002-10-04 Thread Scott Johnson
I have a db with slightly over 614,000 records of names and addresses. In the address column, there are quite a few records like 123 any rd # 2 319 w. 1st st # B 4321 test blvd # 42 etc I want to replace all the number signs with the actual word 'number'. Is there a SQL command I can use for

Unsure of SQL Syntax

2002-09-13 Thread Steven Kreuzer
the CLASS.UID field to the `GROUP`.ADMIN field (join them on CLASS.CLI=`GROUP`.GRID) if CLASS.UID=2 and `GROUP`.GRID1. What would that SQL syntax look like? Thanks SK - Before posting, please check: http://www.mysql.com/manual.php

Re: SQL Syntax

2002-08-26 Thread Dicky Wahyu Purnomo
Pada Sun, 25 Aug 2002 22:04:13 +0200 David Durham [EMAIL PROTECTED] menulis : update CompanyContacts set ByEmailAddress = '[EMAIL PROTECTED]' where Description like '%marve%' If I say: select * from CompanyContacts where Description like '%marve%' What was the error message displayed on

SQL Syntax

2002-08-25 Thread David Durham
This may be a truly dumb question, but could someone please tell me why this sql query/ statement does not work: update CompanyContacts set ByEmailAddress = '[EMAIL PROTECTED]' where Description like '%marve%' If I say: select * from CompanyContacts where Description like '%marve%' I get the

  1   2   >