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,
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
the current users access
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:
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 c
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 = #sessio
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
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 = #session.jobId# AND '#session.UserRole#' IN
(JobFileAccessLevel)
Job
alk
Subject: 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 wh
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 <[EM
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
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 real scenario is much more complicated, but this is a
simple example that shows the concept.
Let's say I had a table with multiple
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:
ht
on.com [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/p
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
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
Hey, I'm wondering if anyone would know T-SQL I could use to accomplish the
following (I don't have the luxury of writing an SQL function for this,
unfortunately):
I have a column called 'path' in a database (Oracle) that has the following
types of values in it:
Example 1: c:\foldername\documen
Given the following:
SELECT
R.TEAMING_AGREEMENT_ID,
R.ROUTE_GROUP_ID,
B.BUSINESS_NAME,
T.OPPORTUNITY_ID,
D.DOCUMENT_NAME,
D.DOCUMENT_EXTENSION
FROM
TEAMING_AGREEMENT_ROUTING R
INNER JOIN TEAMING_AGREEMENT T
ON (R.TEAMING_AGREEMENT_ID = T.TEAMING_AGREEMENT_ID)
INNER JOIN COMMUNITY_BUS
SQL SERVER 2000
CFMX 6.1
I have three tables called: OPPORTUNITY, OPPORTUNITY_TEXT, TEXT_TYPE
OPPORTUNITY_TEXT has two columns making the PK: TEXT_TYPE_ID and
OPPORTUNITY_ID. In addition there is a column called OPPORTUNITY_TEXT_DATA
which holds the actual text I am after [varchar(6000)]. What I
ent: 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 has no
> support for union)...
>
> Cutter
>
> Ubqtous wrote:
>
> > Cutter,
>
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 mem
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
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
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 ~
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,
h
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. Th
Ok, I'm back to this. Have an ISP who is using the outdated MySQL 3.23,
which does not support Union statements in it's syntax. I need to
combine the data of two separate but similar statements so that I may
sort on a certain field. These two tables are not Joined by any keys,
though it could b
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]
[Subscript
'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 wor
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]
How do I get the ID of the last record in a table (mySQL db)?
Cutter
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
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 i.intB
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 i.intBoutItemID as ID,
c.txtBoutCat as C
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.
>
I am creating a drop-down list of items, but I want to keep several items
from appearing in the drop-down.
Is there a more efficient way to accomplish this (there will be several more
exclusions):
SELECT DISTINCT
Description
FROMVCT
ORDER BY
Description
WHERE descriptio
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
In a table something like this:
userid, course
john ethics
john english
mary english
mary math
mary bio
I need to find
a) which user has taken the most courses in total
b) which course was taken the most often
Ideas?
c
-
35 matches
Mail list logo