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

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 that

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 wrote: >> Hi folks! >> >> [[...]] >> >> I have 2 tables. Table A containing 2 fields. A user ID and a pictu

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

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 value

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 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 exactly a PHP

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 m

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 wrote: > > On Apr 29,

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) NO

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

2009-04-29 Thread Antonio PHP
e 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

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

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 so

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 MyS

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_cit

Re: SQL syntax

2006-12-28 Thread ViSolve DB Team
n use the following query.. do not leave 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]>

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 th

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',

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. Wo

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

2006-06-07 Thread J.R. Bullington
bject: 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

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

2006-06-07 Thread Rob Desbois
ERROR 1064 (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: h

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, may

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

2006-06-07 Thread Mark Sargent
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

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

2005-06-29 Thread Michael Stassen
uld help if you would show us your real 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

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

2005-06-29 Thread Siegfried Heintze
7; for key 1 at ./crawl-hot-jobs.pl 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 a

Re: SQL Syntax Errors

2005-06-29 Thread SGreen
t; fine. > > Thanks, > Siegfried > --- > > > > 683 insert failed: INSERT INTO jobtitlecount (fkJobPosting, dtSnapShot, > cJobTitle) VALUES (209689,'2005-06-26',1) /try delete: 'DELETE jobtit

SQL Syntax Errors

2005-06-29 Thread Siegfried Heintze
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 for the right syntax to

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)

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

2005-04-08 Thread Chuzo Okuda
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) = (s

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 unsu

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]

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

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 syn

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, GET

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 DATEDIFF

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 DATEDIFF(leadtime_t

RE: error in your SQL syntax

2005-01-26 Thread Artem Koltsov
lists.mysql.com > Subject: Re: 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:

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 SGreen
ROTECTED]> wrote on 01/26/2005 06:45:32 AM: > 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, prod

Re: error in your SQL syntax

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

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.pro

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 li

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 colum

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:http://li

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

SQL syntax error

2004-11-13 Thread Stuart Felenstein
WHERE 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'

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 th

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 [DATABASE CONNECTION] Country

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.Nation

Re: SQL Syntax Problem

2004-11-10 Thread Ligaya Turmelle
l J. Pawlowsky wrote: 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 m

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 correspond

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.I

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 w

Re: Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread Michael Stassen
entry, I get duplicates when printing out the field to the screen: -- html unix network php Over 10 years of HTML experience. 2 years networking administration. html unix 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 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 SGreen
E '%CA%' OR 'California' > > -- > And where 'html' should come up in 1 entry, I get duplicates when printing > out the field to the screen: > > -- > html unix network php Over 10 years of HTML experience. 2 years netw

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&#x

Re: Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread Michael Stassen
f HTML experience. 2 years networking administration. html unix 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 fro

Assistance with SQL syntax: pulling duplicates back

2004-08-17 Thread Eve Atley
hp 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 ar

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, > &g

RE: SQL Syntax Question

2004-08-04 Thread Karl-Heinz Schulz
Event 2 Details 1 for event 2 Details 2 for event 2 Details 3 for event 2 Is this even possible? TIA -Original Message- From: Philippe Poelvoorde [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 5:52 AM To: Karl-Heinz Schulz Cc: [EMAIL PROTECTED] Subject: Re: SQL Syntax

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

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

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 eventdetai

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

2004-06-16 Thread SGreen
com> cc: Fax to: 06/16/200

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 = '73

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 ha

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 debu

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. Hence

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, Aleksan

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 St

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 th

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

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

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 ___

sql syntax problem with mysql 3.23.49

2003-10-09 Thread Frederik Himpe
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 n

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

RE: SQL Syntax

2003-07-22 Thread Rob A. Brahier
--Original 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-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

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 typ

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 copy&paste by me :-) > but this is the final working version: Glad it worked out. Bye, Benjamin.

Re: SQL Syntax

2003-02-01 Thread Kevin Smith
27;ll 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

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.quantit

Re: SQL Syntax

2003-02-01 Thread Benjamin Pflugmann
roducts.part_code, products.product_type, products.description, product_options_1.options, 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

RE: SQL Syntax

2003-02-01 Thread Sherzod Ruzmetov
ce*basket.quantity, : 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

SQL Syntax (JOINS) Help

2003-02-01 Thread Kevin Smith
re 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 gi

Re: SQL Syntax

2003-01-31 Thread Kevin Smith
To: <[EMAIL PROTECTED]> Sent: 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_

SQL Syntax

2003-01-31 Thread Kevin Smith
ssage 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 syn

SQL Syntax Help

2003-01-31 Thread Kevin Smith
ntity, 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?

Replication halts with sql syntax error

2003-01-13 Thread markb
on: Server101.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

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; ++

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. "sele

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 replac

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, 200

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

Unsure of SQL Syntax

2002-09-13 Thread Steven Kreuzer
default ''); Now I need to update the class table: set the CLASS.UID field to the `GROUP`.ADMIN field (join them on CLASS.CLI=`GROUP`.GRID) if CLASS.UID=2 and `GROUP`.GRID<>1. What would that SQL syntax look like? Thanks SK --

Re: SQL Syntax

2002-08-25 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 disp

Re: SQL Syntax

2002-08-25 Thread David Lloyd
David [ mysql,query ] > update CompanyContacts > set ByEmailAddress = '[EMAIL PROTECTED]' > where Description like '%marve%' Can you show us the output of: describe CompanyContacts ...and also what is the exact error message? Are you connected as a user who is allowed to update the CompanyC

  1   2   >