> 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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
"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.
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
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
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
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_
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_
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
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
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
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
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;
++
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
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;
* 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
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.
--
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
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
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
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
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.
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
> 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
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
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
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.
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:
46 matches
Mail list logo