Re: Altering column syntax help/and repare

2006-01-18 Thread Martijn Tonies
> I think I really misunderstood the directions for alter table, an I'm > not sure how to fix this. I was trying to allow certain columns to be > null in an existing table. > I used the following syntax: > ALTER TABLE users ALTER COLUMN title SET DEFAULT NULL; > Now 'describe users;' shows ex

Altering column syntax help/and repare

2006-01-18 Thread John Stile
I think I really misunderstood the directions for alter table, an I'm not sure how to fix this. I was trying to allow certain columns to be null in an existing table. I used the following syntax: ALTER TABLE users ALTER COLUMN title SET DEFAULT NULL; Now 'describe users;' shows extra columns wit

RE: Advanced SELECT Syntax Help Needed!

2004-11-06 Thread Monique
anced SELECT Syntax Help Needed! On Fri, 5 Nov 2004 17:49:29 -0500, Rhino <[EMAIL PROTECTED]> wrote: > I'm not sure why you want to use a subquery; if MySQL is anything like DB2, > a join usually performs better than a subquery and the optimizer converts a > subquery to

Re: Advanced SELECT Syntax Help Needed!

2004-11-06 Thread Frederic Wenzel
On Fri, 5 Nov 2004 17:49:29 -0500, Rhino <[EMAIL PROTECTED]> wrote: > I'm not sure why you want to use a subquery; if MySQL is anything like DB2, > a join usually performs better than a subquery and the optimizer converts a > subquery to a join ("under the covers") whenever it can anyway. Therefore

Re: Advanced SELECT Syntax Help Needed!

2004-11-05 Thread Rhino
05, 2004 4:59 PM Subject: Advanced SELECT Syntax Help Needed! Hi! I would love some help with my syntax (or another strategy). I keep bombing. I've simplified it. Here is the deal: Three files: Main: id, name Links1: id, linkname1 (a record may or may not exist for each record in Main)

Advanced SELECT Syntax Help Needed!

2004-11-05 Thread Monique
Hi! I would love some help with my syntax (or another strategy). I keep bombing. I've simplified it. Here is the deal: Three files: Main: id, name Links1: id, linkname1 (a record may or may not exist for each record in Main) Links2: id, linkname2 (a record may or may not exist for each re

Re: newbie ALTER syntax help

2004-09-23 Thread leegold
On Thu, 23 Sep 2004 15:51:56 -0500, "Paul DuBois" <[EMAIL PROTECTED]> said: > At 12:12 -0400 9/23/04, leegold wrote: > > alter table keywords change key_id page_id int(10) unsigned NOT NULL PK > > auto_increment; > >ERROR 1064 (42000): You have an error in your SQL syntax; check the > >manual th

Re: newbie ALTER syntax help

2004-09-23 Thread Paul DuBois
At 12:12 -0400 9/23/04, leegold wrote: alter table keywords change key_id page_id int(10) unsigned NOT NULL PK auto_increment; 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 'PK auto_increme

newbie ALTER syntax help

2004-09-23 Thread leegold
alter table keywords change key_id page_id int(10) unsigned NOT NULL PK auto_increment; 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 'PK auto_increment' at line 1 I'm trying to change the

Re: query syntax help

2004-01-20 Thread Mike Blezien
Thx's Fred... as soon as I sent the email and re-read it again... I spotted the 'as' alias table reference to the table, was actual a reserved word,..causing the error :) thx's again. -- MikeBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solu

Re: query syntax help

2004-01-20 Thread Jochem van Dieten
Mike Blezien said: > > I've been looking at this SQL query a dozen times or more, but keep > getting a syntax error message, Query: > > SELECT ai.affilid,ai.create_date,CONCAT(ai.fname,' ',ai.lname) AS > name,aw.siteid,ai.email,as.username,as.status > FROM affiliate_info ai,affiliate_signup as,aff

Re: query syntax help

2004-01-20 Thread Fred van Engen
On Tue, Jan 20, 2004 at 04:10:44PM -0600, Mike Blezien wrote: > I've been looking at this SQL query a dozen times or more, but keep getting > a syntax error message, Query: > > SELECT ai.affilid,ai.create_date,CONCAT(ai.fname,' ',ai.lname) AS > name,aw.siteid,ai.email,as.username,as.status > FRO

query syntax help

2004-01-20 Thread Mike Blezien
Hello all, I've been looking at this SQL query a dozen times or more, but keep getting a syntax error message, Query: SELECT ai.affilid,ai.create_date,CONCAT(ai.fname,' ',ai.lname) AS name,aw.siteid,ai.email,as.username,as.status FROM affiliate_info ai,affiliate_signup as,affiliate_website aw W

Re: select query syntax help

2003-10-30 Thread Thomas Spahni
Dan, SELECT ResourceTable.* FROM ResourceTable LEFT JOIN ResourceLinkTable ON ResourceTable.ResourceID = ResourceLinkTable.ResourceID WHERE ResourceLinkTable.ResourceID IS NULL; Regards, Thomas On Thu, 30 Oct 2003, Dan Lamb wrote: > Hello All, > > I have two table the look like thi

RE: select query syntax help [ANSWER]

2003-10-30 Thread Fortuno, Adam
Adam -Original Message- From: Dan Lamb [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 9:39 AM To: [EMAIL PROTECTED] Subject: select query syntax help Hello All, I have two table the look like this (greatly simplified): ResourceTable - int ResourceID var Resourc

select query syntax help

2003-10-30 Thread Dan Lamb
Hello All, I have two table the look like this (greatly simplified): ResourceTable - int ResourceID var ResourceName ResourceLinkTable - int ResourceLinkID int ResourceID var Text I need to find all rows in ResourceTable for which there is NO entry in ResourceLin

SHA literal String Syntax Help

2003-09-22 Thread Stout, Jeff
I need help with the proper syntax of my INSERT Statement. I have spoken to the support staff of my RADIUS Vendor they stated that enable to support SHA The Coolum for password has to have the encrypted password prefixed with {SHA} not just the hash I need to include the literal string of {SHA} p

Idea: Syntax help on command line

2003-03-27 Thread Christian Hammers
Hello I use the mysql command line tool quite often and always wondered why there's no feature that lets me quickly see the syntax of a "FOREIGN KEY" or "GRANT" command. Now while browsing the source I found the new "syntax" command in 4.0.12 and got the idea

RE: UPDATE syntax help

2003-03-23 Thread Doug Thompson
table. > >Regards, > >Sal > > >> -Original Message- >> From: MySQL [mailto:[EMAIL PROTECTED] >> Sent: 12 March 2003 22:33 >> To: MySQL >> Subject: UPDATE syntax help >> >> >> Hi all, I am having a little UPDATE synt

RE: UPDATE syntax help

2003-03-22 Thread [EMAIL PROTECTED]
Hi I may be way off base here but - why do you reference IMPORT_USERS in your UPDATE statement? You aren't updating any columns in that table. Regards, Sal > -Original Message- > From: MySQL [mailto:[EMAIL PROTECTED] > Sent: 12 March 2003 22:33 > To: MySQL > Su

Re: UPDATE syntax help

2003-03-12 Thread JJ
"Andy Eastham" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED] Mysql. Com" <[EMAIL PROTECTED]> Sent: Thursday, March 13, 2003 10:14 AM Subject: RE: UPDATE syntax help > Paul, > > You have to use the results of one select to generate lots of update > statements.

RE: UPDATE syntax help

2003-03-12 Thread Andy Eastham
cript file with your code (or directly from SQL if you're a martyr) and then run it. I've used both methods successfully, Andy > -Original Message- > From: JJ [mailto:[EMAIL PROTECTED] > Sent: 12 March 2003 23:45 > To: MySQL > Cc: Paul DuBois > Subject: Re: UPD

Re: UPDATE syntax help

2003-03-12 Thread Paul DuBois
s" <[EMAIL PROTECTED]> To: "MySQL" <[EMAIL PROTECTED]>; "MySQL" <[EMAIL PROTECTED]> Sent: Thursday, March 13, 2003 9:02 AM Subject: Re: UPDATE syntax help At 8:33 +1000 3/13/03, MySQL wrote: >Hi all, I am having a little UPDATE syntax issue. According to th

Re: UPDATE syntax help

2003-03-12 Thread JJ
That explains it then D'OH Is there a workaround? Thanks :-) - Original Message - From: "Paul DuBois" <[EMAIL PROTECTED]> To: "MySQL" <[EMAIL PROTECTED]>; "MySQL" <[EMAIL PROTECTED]> Sent: Thursday, March 13, 2003 9:02 AM Subj

Re: UPDATE syntax help

2003-03-12 Thread Paul DuBois
At 8:33 +1000 3/13/03, MySQL wrote: Hi all, I am having a little UPDATE syntax issue. According to the manual According to the manual, this won't work until MySQL 4.x UPDATE EBA_USERS, IMPORT_USERS SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID, EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_

UPDATE syntax help

2003-03-12 Thread MySQL
Hi all, I am having a little UPDATE syntax issue. According to the manual UPDATE EBA_USERS, IMPORT_USERS SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID, EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID, EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME, EBA_USERS.REP_LAST_NAME = IMPORT_

Re: Query syntax help?

2003-02-22 Thread Tore Bostrup
BY F.saveorder (another column) in this case, unless you include it (F.saveorder) in the SELECT and GROUP BY list. HTH, Tore. - Original Message - From: "Scott Brown" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 22, 2003 1:57 PM Subject: Query s

Query syntax help?

2003-02-22 Thread Scott Brown
OK, I am having a bit of trouble designing a MySQL query that returns what I want. Here is the query as I have it thus far: SELECT DISTINCT regformfields.name AS thename, regformfields.label AS thelabel, regfields.name AS fieldsname FROM regformfie

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

SQL Syntax Help

2003-01-31 Thread Kevin Smith
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, b.price*b.quantity AS total FROM (products AS p LEFT JOIN product_option

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

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: http://www.mysql.co

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

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

Re: Conditional join SQL syntax help?

2002-07-23 Thread Benjamin Pflugmann
Hi. On Mon 2002-07-08 at 22:54:09 -0700, [EMAIL PROTECTED] wrote: > I'm trying to get the name of a booth or tradeshow depending on the > customer_link_type (which is an ENUM) combined with the > customer_link_table_id which tells me the index/id of the correct table > to look in. I've tried this

Conditional join SQL syntax help?

2002-07-08 Thread Daevid Vincent
I'm trying to get the name of a booth or tradeshow depending on the customer_link_type (which is an ENUM) combined with the customer_link_table_id which tells me the index/id of the correct table to look in. I've tried this SQL command, but it doesn't work right. I get multiple permutations still.

RE: Query syntax help

2002-03-21 Thread Daren Cotter
dget) Subject: Query syntax help I'm trying to figure out a query that will tell me the total number of people in our house email file that physically opted out in the last week. I'm a bit of a mysql newbie as you can tell... This is the general concept, though it doesn't seem to

RE: Query syntax help

2002-03-21 Thread Roger Baklund
> I'm trying to figure out a query that will tell me the total number of > people in our house email file that physically opted out in the last > week. I'm a bit of a mysql newbie as you can tell... > > This is the general concept, though it doesn't seem to work: > > select count(id) from conta

RE: Query syntax help

2002-03-21 Thread Rick Emery
AND date >= "2002-03-17"; -Original Message- From: rory oconnor [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 10:49 AM To: mysql "list (choose midget) Subject: Query syntax help I'm trying to figure out a query that will tell me the total number of pe

Query syntax help

2002-03-21 Thread rory oconnor
I'm trying to figure out a query that will tell me the total number of people in our house email file that physically opted out in the last week. I'm a bit of a mysql newbie as you can tell... This is the general concept, though it doesn't seem to work: select count(id) from contact # my

Syntax Help - CANCEL

2001-09-16 Thread mickalo
Cancel this, I spotted the problem, forgot the format(..,2); This query works as expected: select format(sum(p.badcheck)+ (count(p.badcheck)*-15),2) as Badcheck from payout p,payhistory ph where ph.paydate between '2001-09-20' and '2001-09-30' and (p.payid = ph.payid and p.badcheck != '0.

Syntax Help

2001-09-16 Thread mickalo
I've been trying to figure out where I might be going wrong with this SQL syntax: select format(sum(p.badcheck)+ (count(p.badcheck)*-15)) as Badcheck from payout p,payhistory ph where ph.paydate between '2001-09-20' and '2001-09-30' and (p.payid = ph.payid and p.badcheck != '0.00') MySQL said: