I seem to recall a SQL select syntax along these lines:
SELECT col1, col2
WHERE col1 IN (set)
Is this or similar syntax in MySQL or is my dotage coming upon me
Thanks in advance,
Bruce
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
There is!
But I would definitely check the online doc for further and more complete
info.
Cheers!
Claudio
On Oct 12, 2009 9:47 PM, Bruce Ferrell bferr...@baywinds.org wrote:
I seem to recall a SQL select syntax along these lines:
SELECT col1, col2
WHERE col1 IN (set)
Is this or similar syntax
that's legal where set is a comma-delimited list of items of the same
datatype as col1
On Mon, Oct 12, 2009 at 2:41 PM, Bruce Ferrell bferr...@baywinds.orgwrote:
I seem to recall a SQL select syntax along these lines:
SELECT col1, col2
WHERE col1 IN (set)
Is this or similar syntax in MySQL
I have the following query...
SELECT c.NLCID, n.publishdate
FROM newsletter n
JOIN newslettersection s using (NLID)
JOIN newslettercontent c using(NLCID)
WHERE contenttype = 1 AND n.publishdate AND c.`timestamp` = '-00-00
00:00:00'
I want to run an update on newslettercontent and set its
Chris W schrieb:
I have the following query...
SELECT c.NLCID, n.publishdate
FROM newsletter n
JOIN newslettersection s using (NLID)
JOIN newslettercontent c using(NLCID)
WHERE contenttype = 1 AND n.publishdate AND c.`timestamp` = '-00-00
00:00:00'
I want to run an update on
update newslettercontent c set c.timestamp= (select n.publishdate from
newsletter n where
n.NLCID= c.NLCID);
This should work.
On 4/16/08, Chris W [EMAIL PROTECTED] wrote:
I have the following query...
SELECT c.NLCID, n.publishdate
FROM newsletter n
JOIN newslettersection s using (NLID)
table users
iduser_iduser_name
1 M11 Shirley
2 M12 Bruce
3 M13 Fred
4 M14 Albert
5 M15 Elizabeth
6 T11 Helen
7 T12 Tracy
8 T13 Charles
9 T14 Jack
10 T15 Ann
table
2008/2/18 King C. Kwok [EMAIL PROTECTED]:
table users
iduser_iduser_name
1 M11 Shirley
2 M12 Bruce
3 M13 Fred
4 M14 Albert
5 M15 Elizabeth
6 T11 Helen
7 T12 Tracy
8 T13 Charles
Hi Rob,
That is just what I need. I can't use 'join' very well yet.
Thank you very much.
--
King Kwok
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
I've got this statement to select the last two entries in my db:
SELECT top 2 *
FROM Content
ORDER BY ContentID desc
and it works fine because it selects the last two items entered into
the db. However, I only want to be able to select item 2 rather than
both 1 and 2. How do I do that?
Matthew Stuart schrieb:
I've got this statement to select the last two entries in my db:
SELECT top 2 *
FROM Content
ORDER BY ContentID desc
and it works fine because it selects the last two items entered into
the db. However, I only want to be able to select item 2 rather than
both 1
: Thursday, October 25, 2007 6:55 AM
To: MySQL email support
Subject: Select question
I've got this statement to select the last two entries in my db:
SELECT top 2 *
FROM Content
ORDER BY ContentID desc
and it works fine because it selects the last two items entered into
the db. However, I
I have three tables, all of which have a 'name' column.
If I do:
select table1.*, table2.*, table3.* from
I'll end up with a result set that has three 'name' fields, but no way
to distinguish which table the field belongs to.
I know I can select individual columns like:
select
Erich,
Is there a way to set a prefix for each table so that
the results come out like tablename.column?
Use a scripting or application language to automate parameterise query
generation. SQL is just a partial computing language.
PB
-
Erich C. Beyrent wrote:
I have three tables, all
Hi,
2006/6/29, Joerg Bruehe [EMAIL PROTECTED]:
Hi Pooly, all,
Pooly wrote:
Hi,
I stumbled on one issue yesterday which took me some time to figure out.
the table is :
create table tt ( PCname varchar(5) not null default '');
insert into tt values ('Centaure');
So, by mistake I
Hi,
I stumbled on one issue yesterday which took me some time to figure out.
the table is :
create table tt ( PCname varchar(5) not null default '');
insert into tt values ('Centaure');
So, by mistake I inserted names which were too long for the field, but
then I tried to do queries on this
On Thursday 29 June 2006 08:18 am, Pooly wrote:
Hi,
I stumbled on one issue yesterday which took me some time to figure out.
the table is :
create table tt ( PCname varchar(5) not null default '');
insert into tt values ('Centaure');
(5) indicates a display width.
So, by mistake I
Hi Pooly, all,
Pooly wrote:
Hi,
I stumbled on one issue yesterday which took me some time to figure out.
the table is :
create table tt ( PCname varchar(5) not null default '');
insert into tt values ('Centaure');
So, by mistake I inserted names which were too long for the field, but
then I
I think you might be one to something here... is there such a thing
as a while loop in MySQL? i.e. can I fill a table with data via a
MySQL query? I guess I could do it via PHP...
I could create a temp table with one column of dates for the range I
am looking for and then LEFT JOIN my
Dan Tappin wrote:
I think you might be one to something here... is there such a thing as
a while loop in MySQL? i.e. can I fill a table with data via a MySQL
query? I guess I could do it via PHP...
I could create a temp table with one column of dates for the range I am
looking for and
I have a table full of data... a log of sorts. Each row has a
timestamp.
I want to generate some reports based on this data.
For example I want a COUNT(*) of the rows for each day for the past
week, 30 days, 12 months etc.
I have no problem generating the query but I am stuck on a
Dan Tappin wrote:
I have a table full of data... a log of sorts. Each row has a
timestamp.
I want to generate some reports based on this data.
For example I want a COUNT(*) of the rows for each day for the past
week, 30 days, 12 months etc.
I have no problem generating the query but I
Dan Tappin wrote:
I have a table full of data... a log of sorts. Each row has a timestamp.
I want to generate some reports based on this data.
For example I want a COUNT(*) of the rows for each day for the past
week, 30 days, 12 months etc.
I have no problem generating the query but I am
Hi,
Look at select ... for update here :
http://dev.mysql.com/doc/mysql/en/innodb-locking-reads.html
Mathias
Selon $B2 9bJv(B [EMAIL PROTECTED]:
i use this mail first .
i have a problem in under sql program:
UPDATE
NGLDENHDT
SET
EDT_HUK_FLG = :EDT_HUK_FLG
WHERE
$B2+9bJv(B wrote:
(B i use this mail first .
(B
(B i have a problem in under sql program:
(B
(B
(B UPDATE
(B NGLDENHDT
(B SET
(B EDT_HUK_FLG = :EDT_HUK_FLG
(B WHERE
(B KAI_CDE = :KAI_CDE
(B AND EDT_NUM = (SELECT MAX(EDT_NUM)
(BFROM
From: "$B2+9bJv(B"
(B
(B UPDATE
(B NGLDENHDT
(B SET
(B EDT_HUK_FLG = :EDT_HUK_FLG
(B WHERE
(B KAI_CDE = :KAI_CDE
(B AND EDT_NUM = (SELECT MAX(EDT_NUM)
(BFROM NGLDENHDT
(BWHERE KAI_CDE = :KAI_CDE_T1
(B
i use this mail first .
(B
(Bi have a problem in under sql program:
(B
(B
(BUPDATE
(BNGLDENHDT
(BSET
(BEDT_HUK_FLG = :EDT_HUK_FLG
(BWHERE
(B KAI_CDE = :KAI_CDE
(B AND EDT_NUM = (SELECT MAX(EDT_NUM)
(B FROM NGLDENHDT
(B
(Bi use this mail first .
(B
(Bi have a problem in under sql program:
(B
(B
(BUPDATE
(BNGLDENHDT
(BSET
(BEDT_HUK_FLG = :EDT_HUK_FLG
(BWHERE
(B KAI_CDE = :KAI_CDE
(B AND EDT_NUM = (SELECT MAX(EDT_NUM)
(B FROM NGLDENHDT
(B
: Tuesday, April 26, 2005 11:26 PM
(BTo: mysql@lists.mysql.com
(BSubject: update and select question
(B
(B
(Bi use this mail first .
(B
(Bi have a problem in under sql program:
(B
(B
(BUPDATE
(BNGLDENHDT
(BSET
(BEDT_HUK_FLG = :EDT_HUK_FLG
(BWHERE
(B KAI_CDE = :KAI_CDE
(B
I know to most of you this will seem like a mundane
question, but I was hoping someone can tell me how to
select the last record in a table that meets certain
criteria. Like to see who hosted the last party in
CHicago.
SELECT host FROM PARTY
WHERE city=chicago;
PARTY
ID |host | city | st |
[snip]
I know to most of you this will seem like a mundane
question, but I was hoping someone can tell me how to
select the last record in a table that meets certain
criteria. Like to see who hosted the last party in
CHicago.
SELECT host FROM PARTY
WHERE city=chicago;
PARTY
ID |host | city |
ORDER BY host DESC LIMIT 1
On Wed, 29 Dec 2004 14:18:02 -0800 (PST), Richard Reina
[EMAIL PROTECTED] wrote:
I know to most of you this will seem like a mundane
question, but I was hoping someone can tell me how to
select the last record in a table that meets certain
criteria. Like to see who
Is there a way to convert the following result set:
id f2
--- ---
1 b
1 c
to:
id f2
-- --
1 b,c
Using a select or any other functions? Basically, I want to put f2 fields together
when ids are the
If you have mysql 4.1, you can use GROUP_CONCAT().
SELECT id, GROUP_CONCAT(f2) FROM yourtable GROUP BY id;
See the manual for details
http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html.
Michael
Feghhi, Jalil wrote:
Is there a way to convert the following result set:
id f2
Check out the GROUP_CONCAT() function, see if this help:
http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Feghhi, Jalil [EMAIL PROTECTED] wrote on 10/05/2004 11:20:21 AM:
Is there a way to convert the following
If your MySQL version is 4.1 or later,
you could try GROUP_CONCAT
the query should be ( not tested ):
select id,GROUP_CONCAT(f2) from tablename group by id
regards,
Giulio
Il giorno 05/ott/04, alle 17:20, Feghhi, Jalil ha scritto:
Is there a way to convert the following result set:
id
Hi Roger,
I took the suggestion from Brad Eacker and use BETWEEN and now works without
problem. However, I decided to do a couple more tests and what I found was
that the problem occurs on MySQL version 4.0.18-standard using InnoDB on
Linux but does not occur on Mac OS X using the same MySQL
Hi List,
I am performing a SELECT and I am getting 0 rows when I run the SELECT
direct in the MySQL database and getting 1 when I run using PHP. This is my
select:
SELECT * FROM scan WHERE TimePointID = 3 AND ScanQCResult = 'n' AND
(ScanStatusID 90 OR ScanStatusID 98);
I realized latter
* Andre Matos
I am performing a SELECT and I am getting 0 rows when I run the SELECT
direct in the MySQL database and getting 1 when I run using PHP.
This is my
select:
SELECT * FROM scan WHERE TimePointID = 3 AND ScanQCResult = 'n' AND
(ScanStatusID 90 OR ScanStatusID 98);
Looks ok.
I
Andre Matos writes:
SELECT * FROM scan WHERE TimePointID = 3 AND ScanQCResult = 'n' AND
(ScanStatusID 90 OR ScanStatusID 98);
I realized latter analyzing this select that I made a mistake using OR at
this point: (ScanStatusID 90 OR ScanStatusID 98), it should be AND.
The second rendition
hi...
a basic select question/issue that should work
mysql select * from instructorTBL;
++--++-+---++
| name | universityID | deptID | email | phone | ID
Possibly because, if there is no typo, your table's name field is:
dr. smith1 (note the period after dr)
But your query is looking for
dr smith1
Does that fix it for you?
Wes
On Jul 5, 2004, at 4:18 PM, bruce wrote:
hi...
a basic select question/issue that should work
mysql select * from
I have a table with just about 100 columns, and I would like to duplicate a
row exactly, except for one column, which is the AUTO_INCREMENT column.
Using 'INSERT INTO tbl_name SELECT * FROM tbl_name WHERE id_col = 1' doesn't
work, because it produces the following error: 'ERROR 1062: Duplicate
, col2, col3:
INSERT INTO table (col2, col3)
SELECT col2, col3 FROM table2 WHERE id_col=1;
Regards,
Matt
-Original Message-
From: Eric J. Janus [mailto:[EMAIL PROTECTED]
Sent: 29 March 2004 19:37
To: MySQL
Subject: INSERT ... SELECT question
I have a table with just about 100 columns
was hoping that MySQL had
something built in to make this easier.
Thanks,
Eric
-Original Message-
From: Matt Chatterley [mailto:[EMAIL PROTECTED]
Sent: Monday, March 29, 2004 2:11 PM
To: 'Eric J. Janus'; 'MySQL'
Subject: RE: INSERT ... SELECT question
Importance: Low
Can you
: INSERT ... SELECT question
There is only 1 table. I want to replicate a record in a table except the
AUTO_INCREMENT column.
Your solution would work, but I'd prefer to not have to maintain a list of
columns in the application. Worst case I'll have the application generate
the query based
, March 29, 2004 2:25 PM
To: 'Eric J. Janus'; 'MySQL'
Subject: RE: INSERT ... SELECT question
Importance: Low
Oh, if only there were views!! That would make this easy. Maybe soon
(*please*). :)
Another approach (more cumbersome) might be to insert the rows you need to
duplicate into a temporary
an appropriate
where-clause to the above statement.
/Henrik
-Original Message-
From: Eric J. Janus [mailto:[EMAIL PROTECTED]
Sent: den 29 mars 2004 21:28
To: Matt Chatterley; 'MySQL'
Subject: RE: INSERT ... SELECT question
Views would be nice. :)
That idea sounds like it would work
the application everytime I change the
table, which I don't always want to do.
-Original Message-
From: Henrik Schröder [mailto:[EMAIL PROTECTED]
Sent: Monday, March 29, 2004 3:07 PM
To: 'Eric J. Janus'; 'MySQL'
Subject: RE: INSERT ... SELECT question
Importance: Low
Jason Joines [EMAIL PROTECTED] wrote:
Table employees:
| idnumber | email | phone | address |
Table webusers:
-
| idnumber | userid | website |
-
Egor Egorov wrote:
Jason Joines [EMAIL PROTECTED] wrote:
Table employees:
| idnumber | email | phone | address |
Table webusers:
-
| idnumber | userid | website |
-
I have a table called employees on a 3.23.48 server. One of it's
fields is an email address (email) and one is the userid. The primary
key is idnumber. I need to populate the userid field from the email
address field. I can get the userid using:
SELECT
update employees set userid=substring(.
Jason Joines wrote:
I have a table called employees on a 3.23.48 server. One of it's
fields is an email address (email) and one is the userid. The primary
key is idnumber. I need to populate the userid field from the email
address field. I can
To: [EMAIL PROTECTED]
Subject: an update select question
I have a table called employees on a 3.23.48 server. One of it's
fields is an email address (email) and one is the userid. The primary
key is idnumber. I need to populate the userid field from the email
address field. I can get the userid
gerald_clark wrote:
update employees set userid=substring(.
Jason Joines wrote:
I have a table called employees on a 3.23.48 server. One of it's
fields is an email address (email) and one is the userid. The primary
key is idnumber. I need to populate the userid field from the email
ideas?
Thanks,
Jason
===
Turns out I need UPDATE SET
UPDATE employees SET userid=substring(email,1,instr(email,'@')-1);
Solution provided to me in the an update select question thread.
Jason
===
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Table employees:
| idnumber | email | phone | address |
Table webusers:
-
| idnumber | userid | website |
-
Table employees is completely populated. Table
I use this syntax but I have privilege problem.
Thenk you anyway
- Original Message -
From: Nitin [EMAIL PROTECTED]
To: IEEIO AAOOCO [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, October 27, 2003 5:20 PM
Subject: Re: Insert ... Select question
of course, the syntax is:
insert
Hello list
I want to insert ... select data from table1 of db1 to table2 of db3.
Is that possible?
Thank in advance
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
27, 2003 8:28 PM
Subject: Insert ... Select question
Hello list
I want to insert ... select data from table1 of db1 to table2 of db3.
Is that possible?
Thank in advance
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com
... Select question
Hello list
I want to insert ... select data from table1 of db1 to table2 of db3.
Is that possible?
Thank in advance
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General
-Original Message-
From: Jean-Pierre Schwickerath [mailto:[EMAIL PROTECTED]
Hello Mumba, Hello Barry,
How do I select out and filter only rows that match
both 16 and 62 in the KEYW_ID col? IE. The query
would return only 119 and 108?
I'm sure this could be done more
Hi,
I've been given a table to work with, and I'm not
meant to change it:
-
| TABLE_NAME| TBL_IDX | KEYW_ID |
-
| PROPERTIES| 108 | 16 |
-
| PROPERTIES| 119 | 16
-Original Message-
From: Mumba Chucks [mailto:[EMAIL PROTECTED]
I've been given a table to work with, and I'm not
meant to change it:
-
| TABLE_NAME | TBL_IDX | KEYW_ID |
-
| PROPERTIES | 108 | 16
Hello Mumba, Hello Barry,
How do I select out and filter only rows that match
both 16 and 62 in the KEYW_ID col? IE. The query
would return only 119 and 108?
I'm sure this could be done more effeciently other ways, possibly with
a sub select if available, but something like this
Hi,
I have a table containing page referral URLs gleaned from users browsing my website.
Is there a way for me to use SELECT based on a portion record's contents?
eg
table contents:
http://www.yahoo.com/adirectory/apage.htm
http://google.net/adirectory/anotherpage.php
I wish to return only
Could look at instr?
-Original Message-
From: Graham Nichols [mailto:[EMAIL PROTECTED]
Sent: 01 October 2003 14:54
To: [EMAIL PROTECTED]
Subject: newbie SELECT question
Hi,
I have a table containing page referral URLs gleaned from users
browsing
my website. Is there a way
How about this?
SELECT
SUBSTRING_INDEX(SUBSTRING(url, LOCATE(//, url) + 2), '/', 1) AS domain
FROM referals
Michael
On Wed, 1 Oct 2003 14:54:24 +0100, Graham Nichols
[EMAIL PROTECTED] wrote:
Hi,
I have a table containing page referral URLs gleaned from users browsing
my website. Is there a
We are having problems with what we think is a simple select statement:
select ENTITY from ATTRIBUTE
where (NAME='FavoriteSport' and VALUE='Soccer')
and (NAME='FavoriteFood' and VALUE='CornDogs');
First, we are running an older version of MySQL:
mysql select version();
+--+
Steve Cote wrote:
We are having problems with what we think is a simple select statement:
select ENTITY from ATTRIBUTE
where (NAME='FavoriteSport' and VALUE='Soccer')
and (NAME='FavoriteFood' and VALUE='CornDogs');
You are trying to find a row with a NAME value of 'FavoriteSport' and
Steve select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and
Steve VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs');
Steve Empty set (0.00 sec)
Just analyze the query. You asked for a record in which
name = 'FavoriteSport' AND name = 'FavoriteFood' which is always false
I have a question on how to substitute a subselect in mysql.
For example lets say i have 3 tables Cars, Options and CarOptions
Cars consists of: uid, make
Options consists of: uid, option
CarOption consists of: uid, Caruid, Optionsuid
I want to select all Cars that have ALL of requested
I need a little help querying 2 tables in MySQL;
Table User
User_Id // Id = 2
User_Name // John
Table History
User_Id // 2
User_History // John has born in 58
SELECT User_History FROM History WHERE User_Id = 2; // return John has
born in 58
But what my SELECT should look if i don't know
:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 10:41 AM
To: [EMAIL PROTECTED]
Subject: Simple SELECT question
I need a little help querying 2 tables in MySQL;
Table User
User_Id // Id = 2
User_Name // John
Table History
User_Id // 2
User_History // John has born in 58
SELECT User_History
[EMAIL PROTECTED] wrote:
I need a little help querying 2 tables in MySQL;
Table User
User_Id // Id = 2
User_Name // John
Table History
User_Id // 2
User_History // John has born in 58
SELECT User_History FROM History WHERE User_Id = 2; // return John has
born in 58
But what my SELECT
--- [EMAIL PROTECTED] wrote:
I need a little help querying 2 tables in MySQL;
Table User
User_Id // Id = 2
User_Name // John
Table History
User_Id // 2
User_History // John has born in 58
SELECT User_History FROM History WHERE User_Id = 2; // return John has
born in 58
But
C,
After some struggling, I have managed to get the problem below 99% working,
the problem now is that I can't get them in descending order. Here is my
select statement.
$query = select manager.name, position, MAX(goals) from roster join
reference join manager where
want:
Fred 87
Bill 70
John 48
TIA
- Original Message -
From: C. Reeve [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 1:57 PM
Subject: Select question
Hi,
I have a database with 3 names in it. In each of these names is 5
Hi,
I have a database with 3 names in it. In each of these names is 5
categories that have numbers in them. I want to be able to do a select and
get the top number from each category for each name and display them from
most to least. I have checked all the docs on the select statement, but
PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 1:57 PM
Subject: Select question
Hi,
I have a database with 3 names in it. In each of these names is 5
categories that have numbers in them. I want to be able to do a select
and
get the top number from each category
Use the CONCAT function
Adolfo
-Original Message-
From: tag [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 3:57 AM
To: [EMAIL PROTECTED]
Subject: select question
HI,
I need to do a select query that can do the following:
select * from table where col1 like hex
HI,
I need to do a select query that can do the following:
select * from table where col1 like hex(somestring);
My problem is HOW do I get the % in there???
The Mysql Server is 4.0.4 and the table has a blob field with hex stored in
it
Thanks
Tonino
* tag
I need to do a select query that can do the following:
select * from table where col1 like hex(somestring);
This was a bit confusing... :)
hex(somestring) will always return 0, unless the string is a numerical
value:
mysql select hex('65'),hex(65),hex(A);
* Tonino Greco
Thanks - but I got it working :
select * from table where col1 like concat(%, hex(somestring), %);
the hex(somestring) - returns :736F6D65737472696E67
* me
hex(somestring) will always return 0, unless the string is
a numerical value
Sorry for that, this was changed in 4.0.1,
by now, i hope, you've gotten answers from the
sql gurus on the list, so i won't clutter with my
humble attempts.
your comment about problems with joins indicates
that corereader might be of some help to you if
you have a windows box for a front end. it will
let you do quick
Eric,
Friday, November 15, 2002, 1:36:54 AM, you wrote:
EA Assume two tables:
EA CREATE TABLE block_ip (
EA datestamp int(11) NOT NULL default '0',
EA remote_addr char(15) NOT NULL default '',
EA PRIMARY KEY (remote_addr),
EA KEY datestamp (datestamp)
EA ) TYPE=MyISAM;
EA CREATE TABLE
Hello,
I recently stumbled upon the INSERT INTO..SELECT abilities. Basically
what I'm doing is archiving records into another table before deleting
them (inventory information). However, I'd like to have the archive
table to have one more field than the original table: a date_archived
function.
Well, amazingly enough, it works great! I found a test box to try it on
first before implementing this on the production box. This will
definitely make life easier...
On Thu, 2002-11-14 at 10:14, gerald_clark wrote:
Did you try it?
Did it work?
Greg Macek wrote:
Hello,
I recently
Assessment
University of Washington
- Original Message -
From: Greg Macek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 8:06 AM
Subject: INSERT INTO ... SELECT question
Hello,
I recently stumbled upon the INSERT INTO..SELECT abilities. Basically
what I'm
, Office of Educational Assessment
University of Washington
- Original Message -
From: Greg Macek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 8:06 AM
Subject: INSERT INTO ... SELECT question
Hello,
I recently stumbled upon the INSERT
At 11:15 -0600 11/14/02, Greg Macek wrote:
Thanks for the tip! Looks like I can change my date_archived field to
timestamp(8), since all I care about for this is the date information
(actual time is useless to me). My sql query all of a sudden got a lot
simpler. Thanks again for the help!
Assume two tables:
CREATE TABLE block_ip (
datestamp int(11) NOT NULL default '0',
remote_addr char(15) NOT NULL default '',
PRIMARY KEY (remote_addr),
KEY datestamp (datestamp)
) TYPE=MyISAM;
CREATE TABLE brute_force (
datestamp int(11) NOT NULL default '0',
remote_addr char(15)
Hi,
I have a table called users with the columns firstname and lastname. I would
like to do a search on the fullname and have tried:
select * from users where (firstname + ' ' + lastname) = John Smith
which returns all rows for some reason and not only the rows with users
named John Smith
Elin,
Tuesday, September 10, 2002, 12:03:21 PM, you wrote:
ER I have a table called users with the columns firstname and lastname. I would
ER like to do a search on the fullname and have tried:
ER select * from users where (firstname + ' ' + lastname) = John Smith
ER which returns all rows for
You would have to do something like:
SELECT * FROM users WHERE CONCAT(firstname, , lastname) = John Smith
That should get you what you want.
If your taking your DB from MS SQL to MySQL only a few queries will port
directly over. You have to be careful that you follow the MySQL syntax and
My SQL query problem:
I met a strange problem:
For example, I have the following table:
Mytable:
No Name Date Project
1 Bob 2002-05-27Bob's project
2 John -00-00 John's project
When I use select * from
At 01:22 AM 3/3/2002 , you wrote:
I need to pull a variable number of fields from a table from the last
inputted fields. For example, instead of doing something like
SELECT * FROM table
I am looking for a way to do something like this(hypothetical, I don't
really know what I should do).
At 8:44 PM -0500 9/9/01, Marcus Young wrote:
Hi,
I'm fairly new to MySQL. I'm trying to insert data into a table
where one field is derived from a SELECT on another table (a key)
and the other fields are defined directly (eg field_01=abcd) .
The formats I have been trying don't appear to be
PROTECTED]
Date: Sun, 09 Sep 2001 20:44:23 -0500
Subject: INSERT SELECT QUESTION
Hi,
I'm fairly new to MySQL. I'm trying to insert data into a table where
one field is derived from a SELECT on another table (a key) and the
other fields are defined directly (eg field_01=abcd) . The formats I
On 30 May 2001, at 10:14, Paul DuBois wrote:
At 9:41 AM -0700 5/30/01, Richard Reina wrote:
I am stuck on a select query and was wondering if someone could help.
I have I've written a database app. that helps me run my business
(trucking). I need however to write a query that shows me all
1 - 100 of 123 matches
Mail list logo