That works too. Thanks Dave.
Thanks,
Mark
-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 16, 2006 11:56 AM
To: CF-Talk
Subject: RE: SQL Problem
> I'm stumped on this. How to I retrieve records that do not match (I'm
> wa
Jim,
Thank you, that worked perfectly. Admittedly, I get confused by the LEFT/ON
attribs in queries.
Thanks,
Mark
-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 16, 2006 11:56 AM
To: CF-Talk
Subject: Re: SQL Problem
Mark Leder wrote:
>
You could use the GROUP BY and count() function. See
http://www.petefreitag.com/item/169.cfm
HTH,
Aaron
On 11/16/06, Mark Leder <[EMAIL PROTECTED]> wrote:
> I'm stumped on this. How to I retrieve records that do not match (I'm
> wanting to display orphaned Companies that are not associated with
>
Try this:
SELECT company, companyID, companyCity, companyState, companyZip,
FROM dbTable_Clients_Companies_List
WHERE companyID Not in (Select companyID From dbtable_Clients_Projects_List)
ORDER BY company ASC
this sould do...
Greetings / Grüsse
Gert Franz
Customer Care
Railo Technologies GmbH
Mark Leder wrote:
> I'm stumped on this. How to I retrieve records that do not match (I'm
> wanting to display orphaned Companies that are not associated with
> Projects). Tried <> and using NOT and NOT IN() without success.
>
> SELECT C.company, C.companyID, C.companyCity, C.companyState, C.com
> I'm stumped on this. How to I retrieve records that do not
> match (I'm wanting to display orphaned Companies that are not
> associated with Projects). Tried <> and using NOT and NOT
> IN() without success.
>
> SELECT C.company, C.companyID, C.companyCity, C.companyState,
> C.companyZip,
>
Thanks everyone.
It worked w/o the ( ) in the select statement.
Thanks,
Mark
-Original Message-
From: Michael T. Tangorre [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 09, 2006 1:45 PM
To: CF-Talk
Subject: RE: SQL Problem
> From: Mark Leder [mailto:[EMAIL PROTECTED]
>SELECT
> From: Mark Leder [mailto:[EMAIL PROTECTED]
>SELECT TOP 1 (controlID, memberID, memberSubmitDate)
>FROM tblList
>WHERE memberSubmitDate ???
SELECT
TOP 1
controlID,
memberID,
memberSubmitDate
FROM
tblList
ORDER BY
memberSubmitDate DESC
Try this:
SELECT TOP 1 (controlID, memberID, memberSubmitDate)
FROM tblList
ORDER BY memberSubmitDate DESC
--Jeff
On 3/9/2006 1:36 PM, Mark Leder wrote:
> How do I do a single record select only choosing the most recent record
> based on a SQL timestamp (date/time)? For example, I could have tw
Mark,
I'd try this:
SELECT TOP 1 (controlID, memberID, memberSubmitDate)
FROM tblList
ORDER BY memberSubmitDate DESC
HTH,
Matthieu
~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234884
Archives: http://www.houseof
Could just add an order by membersubmitdate desc and strip out the where
clause.
On 3/9/06, Mark Leder <[EMAIL PROTECTED]> wrote:
>
> How do I do a single record select only choosing the most recent record
> based on a SQL timestamp (date/time)? For example, I could have two
> records, one posted
maybe...
SELECT TOP 1 (controlID, memberID, memberSubmitDate)
FROM tblList
ORDER BY memberSubmitDate DESC
-Original Message-
From: Mark Leder [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 09, 2006 1:36 PM
To: CF-Talk
Subject: SQL Problem
How do I do a single
SELECT TOP 1 (controlID, memberID, memberSubmitDate)
FROM tblList
order by membersubmitdate desc
On 3/9/06, Mark Leder <[EMAIL PROTECTED]> wrote:
>
> How do I do a single record select only choosing the most recent record
> based on a SQL timestamp (date/time)? For exampl
I am curious, is session.division an actual column name within the doc
table? Just seems a little odd is why I ask.
On Tue, 22 Feb 2005 14:08:22 -, Ian Vaughan
<[EMAIL PROTECTED]> wrote:
> Hi
>
> Can anybody help on why the following query is returning the error
> "missing expression
"session.division" should not be a field name in your databaseif it is
you should change it ;-)
Oh ya...and it's standard practice to store user names broken out into
first/last/initial fields (you can add suffix and prefix as well for Dr. and
Charles III).
Cheers
Bryan Stevenson B.Comm.
The problem is you have session.division='ss'do you mean
division='ss'?? What is the database field name, not the session variable name?
>Hi
>
>Can anybody help on why the following query is returning the error
>"missing expression shown below ?
>
>If I remove the AND session.divisi
looks kinda like you may have some cf logic in your sql code...
SELECT docid, doctitle, docdate
FROM doc
WHERE username ='#Session.Fname# #Session.Lname#'
AND
directorate='team'
AND
session.division='ss'
ORDER BY docid desc, docdate desc
and session.division = 'ss' looks like cf code, not sql.
Session is most likely I reserved word. Try [session].division and better
yet renaming the table if you can.
-Original Message-
From: Ian Vaughan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 22, 2005 9:08 AM
To: CF-Talk
Subject: SQL Problem
Hi
Can anybody help on why the following
[mailto:[EMAIL PROTECTED]
Sent: Friday, March 26, 2004 12:27 PM
To: CF-Talk
Subject: RE: SQL problem/Question
> From: Eric Creese
>
> How come when I issue this statement
>
> select * from persondemographic(nolock)
> where demographicgroupid =3
> and demographic
demographicgroupid =3
and demographicitemid = 4
CASE
WHEN isdate(demographicvaluedesc) =1 THEN cast(demographicvaluedesc as datetime) > getdate()
ELSE
END
-Original Message-
From: Philip Arnold [mailto:[EMAIL PROTECTED]
Sent: Friday, March 26, 2004 12:27 PM
To: CF-Talk
Subject: RE:
> From: Eric Creese
>
> How come when I issue this statement
>
> select * from persondemographic(nolock)
> where demographicgroupid =3
> and demographicitemid = 4
> and cast(demographicvaluedesc as datetime) > getdate()-1
>
> I get a result set, but all the fields and when I issue this statement
Brother thank you! That was it!
I'm going to have to read up on this.
Gil
-Original Message-
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Monday, February 16, 2004 9:27 AM
To: CF-Talk
Subject: RE: sql, problem with
You can use grouped output, but unless your tit
You can use grouped output, but unless your title is unique you will
have to order classes by ID
Select c.classId, c.classTexts, c.classDescription,
cc.classCodeSection, cc.classDate, cc.classTime,
cc.classLocation, cc.classInstructor
FROM CLASSES c, CLASSCODES cc
WHERE c.classId = "">
AND ...
Stephen
Thanks a lot that did it. I can now stop banging my head against the wall
- Original Message -
From: Stephen Hait
To: CF-Talk
Sent: Tuesday, December 16, 2003 2:39 PM
Subject: Re: SQL Problem
> Update IssueRegister
> SET Issue
> Update IssueRegister
> SET IssueStatus = '#form.IssueStatus#',
> Response = '#form.Response#',
> ResponseUserId = '#session.activeuser.USER_NAME#',
> DateofResponse = #CreateODBCdate(now())#
> Where IssueNumber = #form.
net> cc:
Subject: Re: SQL Problem
But it is not the date field that is causing the issue, it the what I am using as the issue number
- Original Message -
From: Dwayne Cole
To: CF-Talk
Sent: Tuesday, December 16, 2003 1:18 PM
Subject: RE: SQL Problem
Try putting "#" signs around the date field.
To: CF-Talk
Sent: Tuesday, December 16, 2003 12:55 PM
Subject: RE: SQL Problem
Try Trimming your vars especially since they were text before you
converted them. If it was char type text there might be some padding that
you don't see..
-Original Message-
From: Mick
>
>
>-Original Message-
>From: Mickael [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 16, 2003 12:56 PM
>To: CF-Talk
>Subject: Re: SQL Problem
>
>
>Hi Michael,
>
>Sorry for the double post but I thought there was something up with the
>list, I posted th
o: CF-Talk
Sent: Tuesday, December 16, 2003 12:48 PM
Subject: RE: SQL Problem
No need to post your question twice.. be patient, someone will respond if
they know the answer. :-)
-Original Message-
From: Mickael [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:42 P
Sent: Tuesday, December 16, 2003 12:48 PM
Subject: RE: SQL Problem
No need to post your question twice.. be patient, someone will respond if
they know the answer. :-)
-Original Message-
From: Mickael [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:42 PM
To: CF
No need to post your question twice.. be patient, someone will respond if
they know the answer. :-)
-Original Message-
From: Mickael [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 12:42 PM
To: CF-Talk
Subject: SQL Problem
Hello All,
I am having problems with an update state
Brian:
You probably want o be using wildcard matching instead of the IN operator.
Your query should be changed to something like:
WHERE (
Emonth LIKE '%,#frmEMonth#,%'
OR Emonth LIKE '#frmEMonth#,%'
OR Emonth LIKE '%
Thank you Mosh. Your code works perfectly.
I thought there might be a way to convert column data
from a string into a comma-separated list using
whatever token you needed. So if a column row
contained "1,2,3" (1 element) it would be converted to
"1","2","3" (3 seperate elements). It was just a
th
SELECT *
FROM TABLE
ORDER BY year DESC
#CountryName#, #Value#, #Year#
regards
badal Tyagi
HCL Perot Systems
Noida, India
-Original Message-
From: Hugo Ahlenius [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 2:19 PM
To: CF-Talk
Subject: OT: SQL problem
Hi,
Anyone with
The "optional feature not implemented" message iirc occurs when sql server
receives a string instead of a datetime value ... also, afaik, a timestamp
is supposed to be a uniquely identifying variable, so you shouldn't use them
unless the plan is to use it as the or a unique id for the table... I
r
--Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: 15 August 2002 13:25
To: CF-Talk
Subject: RE: SQL Problem
select name+', '+id as Name_Concat from MyTable
is this what u where looking for?
.tony
Tony Weeg
Senior Web Developer
Information System Design
select name+', '+id as Name_Concat from MyTable
is this what u where looking for?
..tony
Tony Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337
-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sen
How about ValueList(QueryName.FieldName)
-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 7:28 AM
To: CF-Talk
Subject: SQL Problem
For you SQL guys out there. Do you know if there is an easy way to combine
values from multiple rows? e.g
Try changing the protocol used in the server and in
the ODBC entry or review the TCP/IP settings.
I think the last is the best
regards
Mario
--- [EMAIL PROTECTED] escribió: > my advice.
whenever you have SQL server errors that
> are really weird, go to
> http://groups.google.com and do a search
my advice. whenever you have SQL server errors that are really weird, go to
http://groups.google.com and do a search in there. It will hit a search in
alot of SQL Server newsgroups
Anthony Petruzzi
Webmaster
954-321-4703
http://www.sheriff.org
-Original Message-
From: Ian Lurie [mailto:
> I am building a dynamic query, if a certain form field is selected it adds
> the following statement to the end of the where clause: and table_field in
> ('url.variable')
>
> The table field houses a comma delimited list of numbers and the url
> variable is a comma delimited list as well.
>
> Th
You'd have to break it up for each value of table_field:
where
or
#index_name# in ('url.variable')
-Original Message-
From: Harold Brauer [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 06:18
To: CF-Talk
Subject: SQL Problem
I am building a dynamic query,
Steve
> SELECT type_id, type_id & ' (' & description & ')' AS temp
> FROM CallTypes
> WHERE new
> ORDER BY sequence
Is this a literal excerpt?
"WHERE new" doesn't make sense to me. It should be WHERE something =
something else.
"ORDER BY sequence" doesn't either - "seque
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
As usual, I managed to answer the question myself by looking around
properly. This thread
(http://forums.allaire.com/devconf/Thread.cfm?&&Message_ID=556006&_#Me
ssage556006) at the forums tells all.
Sorry for bandwidth-wasting.
Steve
-BEGIN PG
vPath, =size ?
what are you trying to do here???
>From Scope() ?? what is that???
Please specify a straight forward query!!!
SELECT FileName, DocTitle, DocSubject, DocCreatedTM, DocAuthor, vPath, =
Size, Characterization FROM SCOPE() WHERE Characterization LIKE =
('""strText""') AND P
I think those equal signs are just the wrap character for the listserv...
Maybe try replacing "Path NOT LIKE" with "NOT Path LIKE" ?
-Original Message-
From: Troy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 23, 2000 6:31 PM
To: '[EMAIL PROTECTED]&
can't have "like ="
use like for strings and = for numeric comparisons (i.e. like "rabbit" or
= 2333
can't have =Size in your select statement. I'm not sure what you're trying
to do with that part.
-Original Message-
From: MichaelFox [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 23,
48 matches
Mail list logo