IN works the other way round I think - say you have a list of values and you
want to pull all records with any of those values:
WHERE name IN (will,john,ray)
-Original Message-
From: Mark Fuqua [mailto:[EMAIL PROTECTED]
Sent: 09 January 2008 16:57
To: CF-Talk
Subject: SOT sql question
On Jan 9, 2008 8:56 AM, Mark Fuqua [EMAIL PROTECTED] wrote:
I think I need to be using 'IN' within my WHERE clause but I can't seem to
get it to work. I have a column with a comma delimited list. This is the
latest attempt and it craps out too.
SELECT..
...WHERE JobFileJob =
Mark,
I'll like to suggest you to use DataMgr. DataMgr is a great time saver tool
and could be the answer to your needs.
http://datamgr.riaforge.org/
Cheers
Marco Antonio C. Santos
On Jan 9, 2008 2:56 PM, Mark Fuqua [EMAIL PROTECTED] wrote:
I think I need to be using 'IN' within my WHERE
level which is stored in #session.PlumUserRoles#
Any idea how I might do that?
Thanks,
Mark
-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 09, 2008 12:11 PM
To: CF-Talk
Subject: Re: SOT sql question
On Jan 9, 2008 8:56 AM, Mark Fuqua [EMAIL
Mark Fuqua wrote:
I know I could do a another table with JobFileId's and Access levels, instead
of a
list of access levels, but it seems cleaner this way.
It is not. You have denormalized your data in such away that doing the
type of select you want to do is very difficult. If you had
Nuf said. I'll do it the right way.
-Original Message-
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 09, 2008 1:12 PM
To: CF-Talk
Subject: Re: SOT sql question
Mark Fuqua wrote:
I know I could do a another table with JobFileId's and Access levels,
instead
: Re: SOT: SQL Question
select t.order_num, t.product_name, t.datetime_created
from test t,
(
select order_num, max(datetime_created) maxdt
from test
group by order_num
) t2
where t2.order_num = t.order_num
and t2.maxdt = t.datetime_created
1 query, but 2 selects = gets what you want
why do you have to use a single select statement? Thats pretty limiting there..
On 9/28/07, Brad Wood [EMAIL PROTECTED] wrote:
This one's been bugging me for a day now. I don't think this is
possible, but before I gave up I thought I would ask. (Yes Rick, I
googled it first)
As usual, the
select t.order_num, t.product_name, t.datetime_created
from test t,
(
select order_num, max(datetime_created) maxdt
from test
group by order_num
) t2
where t2.order_num = t.order_num
and t2.maxdt = t.datetime_created
1 query, but 2 selects = gets what you want
On 9/28/07, Greg Morphis
how about something that looks at the right 4 characters, and if the
first of those 4 is a period, then get the right 3. I don't have SQL
Server on this box, but it would be something like:
select case left(right(path,4),1) when '.' then right(path,3) else '' end
Again, don't have it in front of
Kris Jones wrote:
select case left(right(path,4),1) when '.' then right(path,3) else '' end
This will work on SQL Server (assuming all of your extensions are three
characters), and possibly on Oracle(I think it now supports CASE). In
your message you wanted a T-SQL solution, but said your
[64.118.74.249] by mail.bizbreeze.com with
SMTP;
Sat, 10 Feb 2007 14:30:57 -0500
Received: from LOCALHOST by LOCALHOST
with ESMTP id 4A591C6C01270B47B496A2614E792BB1
Sat, 10 Feb 2007 14:34:57 -0500
Subject: Re: SOT: SQL Question
From: Jim Wright [EMAIL PROTECTED]
Content-Type: text/plain
Precedence: bulk
Actually you can write an anonymous PL/SQL block inside a cfquery tag.
There's a bug wherein line returns will cause an error in the JDBC
driver, so the block must be all on one line, but it will work.
Anyway, SUBSTR() will work like a right() function when -1 is used as
the starting position:
Cutter,
On 2/23/2004 at 14:07, you wrote:
CCT Ok, I'm back to this. Have an ISP who is using the outdated MySQL
CCT 3.23, which does not support Union statements in it's syntax. I
CCT need to combine the data of two separate but similar statements
CCT so that I may sort on a certain field. These
I've tried a query of query situation, but it is not returning all
records from both tables, and I believe it may be because both tables
have a key value that match. Here are my queries and the end results:
**qHoliday**
select h.intHolidayPlusID as ID,
h.txtHolidayPlusTitle as Title,
Cutter,
On 2/23/2004 at 14:50, you wrote:
CCT **qEventList QofQ**
CCT select *
CCT fromqHoliday,
CCT qHoliday2
CCT order bySDate
maybe try this in your QoQ:
select * from qHoliday
union
select * from qHoliday2
order by SDate
~ Ubqtous ~
[Todays Threads]
[This Message]
[Subscription]
As listed in the original post, my ISP is using MySQL 3.23 (which has no
support for union)...
Cutter
Ubqtous wrote:
Cutter,
On 2/23/2004 at 14:50, you wrote:
CCT **qEventList QofQ**
CCT select *
CCT fromqHoliday,
CCT qHoliday2
CCT order bySDate
maybe try this in your QoQ:
Yes but Query of queries DOES support the union key word.
-Mark
-Original Message-
From: Cutter (CF-Talk) [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 2:01 PM
To: CF-Talk
Subject: Re: SOT: SQL question
As listed in the original post, my ISP is using MySQL 3.23 (which
Cutter,
On 2/23/2004 at 15:01, you wrote:
CCT As listed in the original post, my ISP is using MySQL 3.23 (which
CCT has no support for union)...
The QoQ doesn't touch the database, rather it's using the record sets
from the queries you run before hand. The query results are still in
server
To: CF-Talk
Subject: Re: SOT: SQL question
As listed in the original post, my ISP is using MySQL 3.23 (which has no
support for union)...
Cutter
Ubqtous wrote:
Cutter,
On 2/23/2004 at 14:50, you wrote:
CCT **qEventList QofQ**
CCT select *
CCT fromqHoliday,
CCT qHoliday2
CCT order
Cutter (CF-Talk) wrote:
How do I get the ID of the last record in a table (mySQL db)?
Define 'last'.
Jochem
--
I don't get it
immigrants don't work
and steal our jobs
- Loesje
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
'last' = the last/most recent/highest autonumbered ID in the primary key
of the table.
Cutter
Jochem van Dieten wrote:
Cutter (CF-Talk) wrote:
How do I get the ID of the last record in a table (mySQL db)?
Define 'last'.
Jochem
--
I don't get it
immigrants don't work
and steal
Cutter (CF-Talk) wrote:
'last' = the last/most recent/highest autonumbered ID in the primary key
of the table.
http://www.mysql.com/doc/en/Getting_unique_ID.html
Jochem
--
I don't get it
immigrants don't work
and steal our jobs
- Loesje
[Todays Threads]
[This Message]
[Subscription]
Cutter (CF-Talk) wrote:
I have four (4) tables. One table holds IDs that reference info in the
other three (3) tables by ID. I am trying to pull the information for an
item, and pull the info specific to that item from the three tables.
What's wrong with this picture?
select
You can do it easier with SQL by using NOT IN
... WHERE Description NOT IN ('ANISE', 'APPLES',.)
HTH
Dick
On Wednesday, June 11, 2003, at 11:37 AM, Jillian Carroll wrote:
I am creating a drop-down list of items, but I want to keep several
items
from appearing in the drop-down.
Is
25 matches
Mail list logo