Hello,
It's been a wile since I have had to do much in the way of SQL queries and
I need some help.
I have a table called installs that looks like this
HostName, iDate, Package
client1, 2007-06-01, Update1
client1, 2007-06-01, Update2
client1, 2007-06-01, Update3
client1, 2007-06-02, Update5
only. (syntax depends on your DB).
~Brad
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 10:16 PM
To: CF-Talk
Subject: SQL Help, please ...
Hello,
It's been a wile since I have had to do much in the way of SQL queries
and
I need some
[EMAIL PROTECTED] wrote:
HostName, iDate, Package
client1, 2007-06-01, Update1
client1, 2007-06-01, Update2
client1, 2007-06-01, Update3
client1, 2007-06-02, Update5
client1, 2007-06-02, NewApp
client2, 2007-06-01, Update1
client2, 2007-06-01, Update2
client2, 2007-06-01, Update3
I've got a query that I just can't get right.
select *
From companies
where companyhide = 0
and companyid = (select distinct companyid
From releases where date_entered = DATE_SUB(curdate
(),INTERVAL 8 day) and date_entered = DATE_SUB
and companyid in (select distinct companyid
Matthew Small
Web Developer
American City Business Journals
704-973-1045
[EMAIL PROTECTED]
-Original Message-
From: Jeff Fongemie [mailto:[EMAIL PROTECTED]
Sent: Friday, June 03, 2005 10:20 AM
To: CF-Talk
Subject: SQL Help Please
I've
I've got a query that I just can't get right.
select *
From companies
where companyhide = 0
and companyid = (select distinct companyid
From releases where date_entered = DATE_SUB(curdate
(),INTERVAL 8 day) and date_entered = DATE_SUB
: Friday, June 03, 2005 10:20 AM
To: CF-Talk
Subject: SQL Help Please
I've got a query that I just can't get right.
select *
From companies
where companyhide = 0
and companyid = (select distinct companyid
From releases where date_entered = DATE_SUB(curdate
Hi guys,
I hope this isn't too far off topic, but I'm stuck on an SQL issue and really need some help.
I have a table with these two fields:
UserID(int)
Referer (int)
UserID is obviously my user's ID number.Referer refers to the UserID of the person who referred them.
I need to run an SQL
Maybe I'm misunderstanding what you are trying to do, but try this
Select count(Referer) as refcount
From myTable
Where Referer = #myUserID#
Cutter
Dave Phillips wrote:
Hi guys,
I hope this isn't too far off topic, but I'm stuck on an SQL issue and
really need some help.
I have a
94% of it for you? -
http://honor.94percent.com
_
From: Cutter (CF-Talk) [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:31 PM
To: CF-Talk
Subject: Re: SQL Help Please?
Maybe I'm misunderstanding what you are trying to do, but try this
Select count(Referer) as refcount
From myTable
This is what you need ...
SELECT DISTINCT(referer), COUNT(referer)
FROM users
GROUP BY referer
-- Jeff
_
From: Dave Phillips [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:37 PM
To: CF-Talk
Subject: RE: SQL Help Please?
Unfortunately, that will only give me the number
% of it for you? -
http://honor.94percent.com
_
From: Jeff Chastain [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:39 PM
To: CF-Talk
Subject: RE: SQL Help Please?
This is what you need ...
SELECT DISTINCT(referer), COUNT(referer)
FROM users
GROUP BY referer
-- Jeff
_
From: Dave Phillips
PROTECTED]]
Sent: Thursday, March 14, 2002 11:06 AM
To: CF-Talk
Subject: Re: SQL help please
try
select employeeid, startdate, enddate, count(*), paycatid
from X
group by employeeid, startdate, enddate, paycatid
WWW:http://www.euservices.com
__
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 6:10 PM
To: CF-Talk
Subject: Re: SQL help please
Nope, that doesn't work
Yeah, I ended up using a cursor to do it. Thanks Bill.
-Original Message-
From: Bill Grover [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 6:01 AM
To: CF-Talk
Subject: RE: SQL help please
I'm not sure you can do it with a simple select statement. If I understand
what you
:
03/13/02 Subject: Re: SQL help please
04:51 PM
Please
Brain not working Must help...
Here's my data set:
employeeid startdate enddate paycatid
--- --- --- ---
936 2002-02-08 2002-02-08 1
936 2002-02-11 2002-02-11 1
936 2002-02-12 2002-02-12 1
936 2002-02-13 2002-02-13 11
936 2002-02-14 2002-02-14 1
936
Anyone?
Bueller? Bueller?
- Original Message -
From: [EMAIL PROTECTED]
Date: Wednesday, March 13, 2002 2:51 pm
Subject: SQL help please
Brain not working Must help...
Here's my data set:
employeeid startdate enddate paycatid
select ... count(paycatid) as samepaycatid group by paycatid
laszlo
[EMAIL PROTECTED] wrote:
Anyone?
Bueller? Bueller?
- Original Message -
From: [EMAIL PROTECTED]
Date: Wednesday, March 13, 2002 2:51 pm
Subject: SQL help please
Brain not working Must help
Nope, that doesn't work.
- Original Message -
From: laszlo [EMAIL PROTECTED]
Date: Wednesday, March 13, 2002 4:06 pm
Subject: Re: SQL help please
select ... count(paycatid) as samepaycatid group by paycatid
laszlo
[EMAIL PROTECTED] wrote:
Anyone?
Bueller? Bueller
: SQL help please
Nope, that doesn't work.
- Original Message -
From: laszlo [EMAIL PROTECTED]
Date: Wednesday, March 13, 2002 4:06 pm
Subject: Re: SQL help please
select ... count(paycatid) as samepaycatid group by paycatid
laszlo
[EMAIL PROTECTED] wrote:
Anyone
QUERY
===
cfquery name=getSurvey datasource=#application.dsn#
SELECT *
FROM surveys S, surveySub SB, categories C LEFT OUTER JOIN questions Q ON
(C.categoryID = Q.categoryID) LEFT OUTER JOIN questionsN QN ON (Q.questionID
Sorry for the OT but I'm at a loss on this one.
I've built an application for a Fire/Rescue service to log their calls,
meeting attendance, etc. (geared to small, volunteer agencies). One of the
things that's very important for them is a sum of the hours spent on calls.
Each call record has a
I've built an application for a Fire/Rescue service to log their calls,
meeting attendance, etc. (geared to small, volunteer agencies). One of the
things that's very important for them is a sum of the hours spent
on calls.
Each call record has a uniquely generated call number that is the
Philip,
Thanks for the help. Unfortunately, that didn't do the trick. The query
returns a -2. I've put in test records to this point, so I know that the
return should be 22.
Any other ideas?
Thanks,
Scott
Scott Brader
Prairie Software Development LLC
101 East Sadd Street
PO Box 235
North
Philip,
Upon further testing, your suggestion does work fine, however, I'm getting
the error whenever the times are on two different days; dispatch time was
23:25 and return to quarters time was 02:15. Will I have to change it from
short time format to a different date/time format?
Thanks,
Scott
, 2001 1:42 PM
To: CF-Talk
Subject: RE: SQL Help, Please
Philip,
Thanks for the help. Unfortunately, that didn't do the trick. The query
returns a -2. I've put in test records to this point, so I know that the
return should be 22.
Any other ideas?
Thanks,
Scott
Mobile: 262.490.1376
http://www.prairiesoftdev.com
Amateurs practice until they get it right,
Experts practice until they can't get it wrong.
-Original Message-
From: DeVoil, Nick [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 7:51 AM
To: CF-Talk
Subject: RE: SQL Help, Please
ok, I want to enter this character into a SQL table. '
but i get an error. how do I make it enter ' into the database?
INSERT INTO MyTABLE(Stuff)
VALUES = '''
~~
Structure your ColdFusion code with Fusebox. Get the official book at
One more '
INSERT INTO MyTABLE(Stuff)
VALUES =
-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 11:59 AM
To: CF-Talk
Subject: Single Quotes in SQL HELP PLEASE!
ok, I want to enter this character into a SQL table. '
but i get
you can use PreserveSingleQuoutes(#var#)
-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 10:59 AM
To: CF-Talk
Subject: Single Quotes in SQL HELP PLEASE!
ok, I want to enter this character into a SQL table. '
but i get an error. how do I
, 2001 8:59 AM
To: CF-Talk
Subject: Single Quotes in SQL HELP PLEASE!
ok, I want to enter this character into a SQL table. '
but i get an error. how do I make it enter ' into the database?
INSERT INTO MyTABLE(Stuff)
VALUES = '''
~~
Structure your
: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: January 22, 2001 11:59
To: CF-Talk
Subject: Single Quotes in SQL HELP PLEASE!
ok, I want to enter this character into a SQL table. '
but i get an error. how do I make it enter ' into the database?
INSERT INTO MyTABLE(Stuff)
VALUES
ok, I want to enter this character into a SQL table. '
but i get an error. how do I make it enter ' into the database?
INSERT INTO MyTABLE(Stuff)
VALUES = '''
You might want to look into PreserveSingleQuotes()
Also, your SQL probably won't work;
INSERT INTO myTable (stuff)
VALUES
you can use PreserveSingleQuoutes(#var#)
Actually, the preserve single quotes function should only be used when you
are writing whole the SQL expression (rather than just data values). If you
do this, you must take special care to escape all single quotes in your
single quoted value strings.
Ooops! I didn't read your query thoroughly enough. I just glanced at it and
escaped the single quote. My apologies. This is what you'll want to do:
INSERT INTO MyTABLE (
Stuff
)
VALUES (
)
Sorry about that. I'll have to pay more attention next time. :)
Benjamin S. Rogers
---Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 11:59 AM
To: CF-Talk
Subject: Single Quotes in SQL HELP PLEASE!
ok, I want to enter this character into a SQL table. '
but i get an error. how do I make it enter ' into the database?
INSE
Hi,
I have a table with client details ('clients') that is related to another
table with category info ('category').
Now, each client could have more than 1 category in there CategoryID Field.
the user will be clicking on a link which will have one CategoryID as a URL
variable, and the state
38 matches
Mail list logo