2013/02/02 12:58 -0600, Peter Brawley
On 2013-02-01 10:18 PM, h...@tbbs.net wrote:
2013/01/31 22:24 -0600, Peter Brawley
Is this what you mean?
Select,
pricelist
If( !IsNull(specialprice) And specialprice unitprice And CurDate() Between
startingDate And endingDate,
specialprice,
unitprice
)
2013/01/31 22:24 -0600, Peter Brawley
Is this what you mean?
Select,
pricelist
If( !IsNull(specialprice) And specialprice unitprice And CurDate() Between
startingDate And endingDate,
specialprice,
unitprice
) as used_price
From catalog
Where itemid='WB314';
PB
Maybe this is gilding the
On 2013-02-01 10:18 PM, h...@tbbs.net wrote:
2013/01/31 22:24 -0600, Peter Brawley
Is this what you mean?
Select,
pricelist
If( !IsNull(specialprice) And specialprice unitprice And CurDate() Between
startingDate And endingDate,
specialprice,
unitprice
) as used_price
From catalog
Where
Hello,
I'm trying to write a select query that grabs two prices from my db and
displays them on a web page. I want it to grab the `listprice`, and either the
`unitprice` or the `specialprice` depending on the following criteria:
if the `specialprice` is not empty,
AND it's less than
On 2013-01-31 8:13 PM, Angela Barone wrote:
Hello,
I'm trying to write a select query that grabs two prices from my db and
displays them on a web page. I want it to grab the `listprice`, and either the
`unitprice` or the `specialprice` depending on the following criteria:
if the
Hi,
On Jan 18, 2008 2:59 PM, RoryGRen [EMAIL PROTECTED] wrote:
Hi all
I am quite new to mySQL and have the following question I hope someone can
help me with:
I have a database table imported directly from MS Access with two of the
field names having brackets - F(1) and S(1). I don't want
the database needs
updating.
How can I select these fields from the table? - SELECT F(1), S(1) doesn't
work, SELECT F(1) , S(1) doesn't work and neither does SELECT [F(1)],
[S(1)]
Thanks, in anticipation!
Rory
--
View this message in context:
http://www.nabble.com/Select-statement-help
.
With best wishes
Ch
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: 14 December 2005 19:22
To: Jesse
Cc: mysql@lists.mysql.com
Subject: Re: SQL Statement Help
Jesse [EMAIL PROTECTED] wrote on 12/14/2005 02:03:22 PM:
Hello,
I need
Hello,
I need help building a SQL Statement. I'm currently using MySQL
5.something. This one is kind of strange, and I can't seem to figure out
how to do it.
I have a table named Participants. Each Participant is allowed to bring up
to 5 Guests. Instead of putting the names in a separate
Hello,
I need help building a SQL Statement. I'm currently using MySQL
5.something. This one is kind of strange, and I can't seem to figure out
how to do it.
I have a table named Participants. Each Participant is allowed to bring up
to 5 Guests. Instead of putting the names in a
Jesse [EMAIL PROTECTED] wrote on 12/14/2005 02:03:22 PM:
Hello,
I need help building a SQL Statement. I'm currently using MySQL
5.something. This one is kind of strange, and I can't seem to figure
out
how to do it.
I have a table named Participants. Each Participant is allowed to
it for you.
UPDATE table_one t1, table_two t2 SET t1.ID = t2.ID WHERE t2.num =
t1.num
AND t1.ID = 0
J.R.
-Original Message-
From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED] Sent:
Sunday, October 16, 2005 1:45 PM
To: mysql@lists.mysql.com
Subject: SQL statement help
Importance
PROTECTED]
Sent: Sunday, October 16, 2005 1:45 PM
To: mysql@lists.mysql.com
Subject: SQL statement help
Importance: High
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is
set to
zero. The second one has ID fields and filenames.
I need a single SQL
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is
set to zero. The second one has ID fields and filenames.
I need a single SQL statement to set the ID from table 1 to the ID from
table 2 ONLY IF the ID on one is zero.
That is, if the ID on table one is not set
To: mysql@lists.mysql.com
Subject: SQL statement help
Importance: High
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is set to
zero. The second one has ID fields and filenames.
I need a single SQL statement to set the ID from table 1 to the ID from
table 2 ONLY
statement help
Importance: High
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is set to
zero. The second one has ID fields and filenames.
I need a single SQL statement to set the ID from table 1 to the ID from
table 2 ONLY IF the ID on one is zero.
That is, if the ID
PROTECTED] Sent:
Sunday, October 16, 2005 1:45 PM
To: mysql@lists.mysql.com
Subject: SQL statement help
Importance: High
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is
set to
zero. The second one has ID fields and filenames.
I need a single SQL statement to set
I have data in a table listed as
44:22:22
333:33:33
It stands for hhh:mm:ss
I want to break each part of the data into different parts based on the ':' to
separate them. Then I want to take that data and sum it. I wrote an if
statement to parse through this table but I can't get it to work.
On Wednesday, March 30, 2005 09:49, Christopher Vaughan wrote:
I have data in a table listed as
44:22:22
333:33:33
It stands for hhh:mm:ss
If you convert it to a time field you can use mysql built-in functions
to do what you want. You are limited to the range -838:59:59 to
838:59:59
On Wednesday, March 30, 2005 10:24, Christopher Vaughan wrote:
Tom Crimmins on Wednesday, March 30, 2005 at 11:10 AM -0500 wrote:
If you convert it to a time field you can use mysql built-in
functions to do what you want. You are limited to the range
-838:59:59 to 838:59:59 though.
I think I remember a match_at(:) or pat_index(:) UDF which would
return the position of the first : for you, but I can't find it if it
does exist.
On Wed, 30 Mar 2005, Christopher Vaughan wrote:
I have data in a table listed as
44:22:22
333:33:33
It stands for hhh:mm:ss
I want to break each
Christopher Vaughan [EMAIL PROTECTED] wrote on 30/03/2005 16:48:47:
I have data in a table listed as
44:22:22
333:33:33
It stands for hhh:mm:ss
I want to break each part of the data into different parts based on
the ':' to separate them. Then I want to take that data and sum it.
I wrote
Just forwarding this to the list.
On Wednesday, March 30, 2005 10:43, Christopher Vaughan wrote:
Tom Crimmins on Wednesday, March 30, 2005 at 11:31 AM -0500 wrote:
Look at the functions HOUR(time), MINUTE(time), SECOND(time). These
will give you interger output for each part of the time
Hi There,
I have web form where a user can search certain fields and then have
them displayed aggregated. For example, find all the routes I climbed
with partner A in area(s) ALL (% - wildcard) between date1 and date2 --
so on. See below for the complete query.
I'm using pull down menu's and
Craig Hoffman [EMAIL PROTECTED] wrote on 01/18/2005 04:17:30 PM:
Hi There,
I have web form where a user can search certain fields and then have
them displayed aggregated. For example, find all the routes I climbed
with partner A in area(s) ALL (% - wildcard) between date1 and date2 --
so
Hi Rhino
I had pretty much already suggested doing that, but I have been told that
I'm not allowed to redesign the database as there is already lots other code
working on it already that would need changing as well. I personally think
the database design is terrible, but I have to work with what
Andrew Dixon [EMAIL PROTECTED] wrote:
Hi Everyone.
I require some help with an IN statement I'm trying to get working. I have
inherited a database from someone else in which there is a table with
project information and a field containing which geographic regions the
projects relate. As a single
Hi.
Thanks Stephen, the works like a dream... Unlike this database which is more
like a nightmare!!!
Best Regards
Andrew.
-Original Message-
From: Stephen E. Bacher [mailto:[EMAIL PROTECTED]
Sent: 03 August 2004 12:16
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: In Statement
://archives.postgresql.org/pgsql-performance/2002-12/msg00185.php
HTH,
Martin Gainty
From: Andrew Dixon [EMAIL PROTECTED]
To: 'Stephen E. Bacher' [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: In Statement Help
Date: Tue, 3 Aug 2004 12:27:25 +0100
MIME-Version: 1.0
Received: from lists.mysql.com
: Stephen E. Bacher [mailto:[EMAIL PROTECTED]
Sent: 03 August 2004 12:16
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: In Statement Help
Andrew Dixon [EMAIL PROTECTED] wrote:
Hi Everyone.
I require some help with an IN statement I'm trying to get working. I
have inherited a database from someone
Martin Gainty wrote:
Andrew et al-
Keep in mind that when you use LIKE you will NOT use an index but you
will use a full table scan instead.
Agreed.
Also instead of using IN EXISTS uses Indexes on the master table
query..if you have master-heavy or parent-heavy query use EXISTS/NOT
EXISTS vs
On Tue, 03 Aug 2004 06:50:46 -0600, Martin Gainty wrote:
Keep in mind that when you use LIKE you will NOT use an index but you will
use a full table scan instead
Also instead of using IN EXISTS uses Indexes on the master table query..if
you have master-heavy or parent-heavy query use
is Indexed-
Martin Gainty
From: Michael Stassen [EMAIL PROTECTED]
To: Martin Gainty [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: In Statement Help
Date: Tue, 03 Aug 2004 10:26:29 -0400
MIME-Version: 1.0
Received: from out011.verizon.net
Hi Everyone.
I require some help with an IN statement I'm trying to get working. I have
inherited a database from someone else in which there is a table with
project information and a field containing which geographic regions the
projects relate. As a single project can relate to multiple
- Original Message -
From: Andrew Dixon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 02, 2004 9:44 AM
Subject: In Statement Help
Hi Everyone.
I require some help with an IN statement I'm trying to get working. I have
inherited a database from someone else in which
)
AND NOT EXISTS
(
SELECT *
FROM load_cntl AS B
WHERE B.LOAD_DATE = DATEADD(A.LOAD_DATE, 1)
)
Good Luck!
Charlie [EMAIL PROTECTED]/Shield/Michigan
From: Mark Marshall Date: December 10 2003 6:01pm
Subject: SQL Statement Help - Is this possible?
I have a database table that has one
I have a database table that has one row entered every day by the user.
If the user skips a day, it throws off our monthly totals. Assume a
table with four columns:
id (which is the key), date (-mm-dd), data1 (int), data2 (int)
Is there a way to say Select the first missing date in the
The people who run our mysql server are using version 3.23.51, so I don't
have access to some of version 4's features like sub selectes.
I have a table with data like this:
firm firm_rank time time_rank student
A 1 10 1 jones
A 1 10 1 smith
A 1 10 1 alvin
A 2 10 1 bob
A 2 10 2 charlie
This might help.
http://www.mysql.com/doc/en/example-Maximum-column-group-row.html
I had the same problem. Before I found the webpage above, I went with a less
efficient but simpler way. I wanted the highest revision (revision) for each news
article (id).
$SQL = CREATE TEMPORARY TABLE
I want to extract data into a temporary table such that unique records with
the same primary key (in this case an invoice number) are written to one
record, with each of the unique fields extracted being written to a
separate field in the temporary table record. I have created my temporary
At 21:21 -0700 9/21/02, Des Dougan wrote:
I want to extract data into a temporary table such that unique
records with the same primary key (in this case an invoice number)
are written to one record, with each of the unique fields extracted
being written to a separate field in the temporary
Hello,
I've been trying to figure this out but I feel like I'm just banging my head
on the wall.
I hope this is the right forum to pose this question.
I have a table of flights which has several fields
Table: flights
Fields: depart, depart_time, arrive, arrive_time, flight_no, flight_group
Hello,
I've been trying to figure this out but I feel like I'm just
banging my head
on the wall.
That must be quite painful...
I hope this is the right forum to pose this question.
It's certainly one of the better ones, yes.
I have a table of flights which has several fields
Table:
On Sat, 12 Jan 2002, Tom Jones wrote:
Table: flights
Fields: depart, depart_time, arrive, arrive_time, flight_no, flight_group
I'm trying to do a search on depart and arrive and show only the records
which have matching flight_group
SELECT depart, arrive
FROM flights
WHERE flight_group
Hi Roger,
Thanks for your reply and I apologize for my lack of specificity on my
previous email, thanks for your patience :).
I have a people object that has 4 entities. name, pword, user_id, picurl
This data is stored in the people table. Each user is identified by
a unique user_id. I would
* David V. Edelstein
I would like to create a mySQL query that will find the max
user_id, use this value to calculate a random value of the
user_id from [1 thru max], then return the entire row for
that person(user_id) filled in with that persons(row) four
entities, which I can use to
Easier method:
SELECT * FROM people ORDER BY RAND() LIMIT 1;
-Original Message-
From: David V. Edelstein [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 1:08 PM
To: 'Roger Baklund'
Cc: '[EMAIL PROTECTED]'
Subject: Random Select Statement - help please
Hi Roger,
Thanks
47 matches
Mail list logo