ou get the idea :-p
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2003 14:38
To: CF-Talk
Subject: Simple Query Help
I need to parse a query to a calendar database that returns just the current
month's events, and I'm hung up on the Where pa
I need to parse a query to a calendar database that returns just the current month's
events, and I'm hung up on the Where part of the query (I'm obiously also getting very
confused between CF and SQL functions).
SELECT Title, Details, EventDate, StartHour, StartMin
FROMEvents
WHERE Da
query help
Quoting Josh Trefethen <[EMAIL PROTECTED]>:
>
> Sounds like a job for a stored procI don't think a simple query will
> do it for you.
Simple was not a requirement. I just hope performance is not a requirement
either ;-)
SELECT
MIN(t1id) AS mini
Quoting Josh Trefethen <[EMAIL PROTECTED]>:
>
> Sounds like a job for a stored procI don't think a simple query will
> do it for you.
Simple was not a requirement. I just hope performance is not a requirement
either ;-)
SELECT
MIN(t1id) AS minimum,
t2id AS maximum,
M
ssage-
From: Jeff Beer [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 02, 2003 2:22 AM
To: CF-Talk
Subject: FW: 2nd try: SQL query help
Anyone have any ideas?
-Original Message-
From: Jeff Beer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 11:00 AM
To: CF-Talk
Subject: OT
Anyone have any ideas?
-Original Message-
From: Jeff Beer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 11:00 AM
To: CF-Talk
Subject: OT: SQL query help
Using SQL Server, how would I define a query to return ranges of ID's
(primary key) where a tinyint field was not
Thanks! This worked great with a couple small modifications.
Cedric
- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 9:42 PM
Subject: RE: QUERY Help
> You may have to put Select Max(ThreadID) AS
That was a "bit" short !! [sic]
E.g.
select *
Where cast(column as bit) = 1
Wg
> -Original Message-
> From: webguy [mailto:[EMAIL PROTECTED]]
> Sent: 30 January 2003 16:14
> To: CF-Talk
> Subject: RE: SQL query help
>
>
> Use the cast function
Use the cast function
WG
> -Original Message-
> From: Jeff Beer [mailto:[EMAIL PROTECTED]]
> Sent: 30 January 2003 16:00
> To: CF-Talk
> Subject: OT: SQL query help
>
>
> Using SQL Server, how would I define a query to return ranges of ID's
> (primary ke
Using SQL Server, how would I define a query to return ranges of ID's
(primary key) where a tinyint field was not true?
I'm looking for any ranges (eg; 12202 - 12249 and 14477 - 15225) where that
tinyint field is 0. I'd like to specify a minimum number of records in that
range, but it's not absol
Villat [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 09:20 PM
To: CF-Talk
Subject: Re: QUERY Help
Thanks for the help, but I'm getting an error.
[MySQL][ODBC 3.51 Driver][mysqld-3.23.49-log]You have an error in your SQL
syntax near 'SELECT Max(threadID) AS threa
suooprt Query of
Queries? Any other ideas?
Cedric
- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 6:39 PM
Subject: RE: QUERY Help
> This got cut out...sorry!
>
> SELECT Th.sentBy,T.ti
T.priority desc, T.ticketID
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 08:35 PM
To: CF-Talk
Subject: RE: QUERY Help
Why are you doing a max on the sentby table as well?
You also may try doing an inner join as well.
Also, If subject
Why are you doing a max on the sentby table as well?
You also may try doing an inner join as well.
Also, If subject and priority could be different, you may want to get rid of
them otherwise you are not going to get what you want.
The easiest for this may be another approach if you must have those
I'm having a bit of trouble with my query. What I have is a table with
Tickets. I want to select all the tickets, which works great. Each Ticket
has accompanying Threads, so each Ticket can have multiple threads (like a
conversation). What I also need to grab along with the Tickets, is the
NEWEST T
> I have a table with columns named q1,q2,q3, through q19. Each
> question can have a value of 1, 2, or 3. How can I generate a
> query/cfcode that will tell me how many people answered 1, 2, and 3
> for question 1 through question 19 without having a ton of queries?
> I know it needs to loop someh
select q1, q2, from table
At 03:49 PM 1/29/2003 -0500, you wrote:
>Hi all,
>
>I have a table with columns named q1,q2,q3, through q19. Each question can
>have a value of 1, 2, or 3. How can I generate a query/cfcode that will
>tell me how many people answered 1, 2, and 3 for question
Hi all,
I have a table with columns named q1,q2,q3, through q19. Each question can have a
value of 1, 2, or 3. How can I generate a query/cfcode that will tell me how many
people answered 1, 2, and 3 for question 1 through question 19 without having a ton of
queries? I know it needs to loop som
Jochem van Dieten writes:
> Scott Wilhelm wrote:
>> Can someone tell me what's wrong with this query? I've verified that
>> everything between this query & the database matches up, I've printed
>> out the SQL statement, and that was verified through my database that
>> it's good...
>>
>>
>> I
Scott Wilhelm wrote:
> Can someone tell me what's wrong with this query? I've verified that
> everything between this query & the database matches up, I've printed
> out the SQL statement, and that was verified through my database that
> it's good...
>
>
> INSERT INTO Links(Text, URL, SBName, S
- Original Message -
From: "Scott Wilhelm" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, January 14, 2003 8:09 AM
Subject: Query Help Again...
> Can someone tell me what's wrong with this query? I've verified that
&
Single quotes around the text values.
Jerry Johnson
>>> [EMAIL PROTECTED] 01/14/03 10:09AM >>>
Can someone tell me what's wrong with this query? I've verified that
everything between this query & the database matches up, I've printed
out the SQL statement, and that was verified through my databa
Can someone tell me what's wrong with this query? I've verified that
everything between this query & the database matches up, I've printed
out the SQL statement, and that was verified through my database that
it's good...
INSERT INTO Links(Text, URL, SBName, SBEmail, SBSchool, Category)
VALUES(
SELECT * FROM Events WHERE eDate <
-Original Message-
From: Samuel R. Neff [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 10:21 AM
To: CF-Talk
Subject: Re: Query help!
Please look at the help docs for cfqueryparam. It takes at least two
params, one for value
Please look at the help docs for cfqueryparam. It takes at least two
params, one for value and another for type. You should specify the
type. Also note that you don't have to format the date when passing to
cfqueryparam.
Best regards,
Sam
BTW, a lot of people don't use cfqueryparam until t
Assuming that your running from a SQLServer or access DB (although it should
work with mysql) try
SELECT * FROM Events WHERE eDate <
HTH
-Original Message-
From: Scott Wilhelm [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 18:02
To: CF-Talk
Subject: Query h
Instead of dateformat try createodbcdate(now())
Cutter
Scott Wilhelm wrote:
>Can someone tell me what's wrong with this line:
>
>
> SELECT * FROM Events WHERE eDate < value=#formatdate(now(),"mm-dd-yy")#>
>
>
>I can't figure out how to get a date query to work right...
>
>Thanks,
>
>Scott
>
try
SELECT *
FROM events
WHERE eDate < ;
(assuming your eDate field is a date/time datatype...i don't think you'd
need a dateFormat() function)
hth,
charlie
Scott Wilhelm writes:
> Can someone tell me what's wrong with this line:
>
>
> SELECT * FROM Events WHERE eDate < value=#f
I got it...I've gotta figure out a way to get ASP out of my head...lol
Scott
-Original Message-
From: Scott Wilhelm
Sent: Mon 01/13/2003 01:02 PM
To: CF-Talk
Cc:
Subject: Query help!
Can someone te
Can someone tell me what's wrong with this line:
SELECT * FROM Events WHERE eDate <
I can't figure out how to get a date query to work right...
Thanks,
Scott
-Original Message-
From: Costas Piliotis
Sent: Mon 01/13/2003 01:01 PM
To: CF-Talk
look at it for
you. You'll have to email me at [EMAIL PROTECTED]
Fregas
- Original Message -
From: "Jason Miller" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 7:03 PM
Subject: SQL Query Help - Access Lookup tab
Short Version - I realize that is VERY long - but I jsut supplied alot
of information -
Temporary link online -
http://64.234.202.15/dbindex.cfm
LookUp existing tables - need to be altered on cfquery end efficiently -
8: within 2 -
8 in Table ApplicationModules = Medical Records
2 in Table Appl
Hello List -
I can not get this query down for the life of me. After a wasted
afternoon - I am hoping ( I know you can) someone will assist me.
I have an access table I am grabbing my information from - table -
ModuleFeatures
ModuleFeatures contains Column iModule -WHICH is a lookup to a
Applic
Works great! Thanks.
Thanks,
Mark
-Original Message-
From: Everett, Al [mailto:AEverett@;askallied.com]
Sent: Tuesday, November 05, 2002 1:58 PM
To: CF-Talk
Subject: RE: Query Help
Try ordering by date descending and limiting to five rows.
SELECT eID, city, state, country
Not sure you can but you might.
However instead of the WHERE clause ADD a ORDER BY Clause
and have it = DateStamp
Then on the OUTPUT QUERY TAG set Maxrows = 5
Sure there maybe another way but that is one.
>>> [EMAIL PROTECTED] 11/05/02 01:41PM >>>
Hi All,
In a query, pulled from MS Access, I
Try ordering by date descending and limiting to five rows.
SELECT eID, city, state, country, datestamp
ORDER BY datestamp DESC
> -Original Message-
> From: Mark Leder [mailto:mel@;markleder.com]
> Sent: Tuesday, November 05, 2002 1:42 PM
> To: CF-Talk
> Subj
Hi All,
In a query, pulled from MS Access, I want to retrieve the five most
recent postings (they are datestamped when inputted). I know how to do
this in SQL, using top, but I can't figure out in Access.
SELECT eID, city, state, country, datestamp
WHERE datestamp = [five most recent]
T
e off) you're saying "get all
the cars and sort them by rating, then just return the first one ("top
1").
Hope this helps,
Jim Davis
> -Original Message-
> From: Chad [mailto:cgray@;careyweb.com]
> Sent: Sunday, November 03, 2002 10:54 AM
> To: CF-Talk
&
Thanks guys...
These queries did the trick!
> -Original Message-
> From: Jeff [mailto:jeff@;hawkandheron.com]
> Sent: Sunday, November 03, 2002 11:01 AM
> To: CF-Talk
> Subject: RE: Query help
>
> Try this...
>
> SELECT Image1, Description
> FROM car
Try this...
SELECT Image1, Description
FROM cars
WHERE rating = (SELECT MAX(rating) FROM cars)
HTH,
Jeff Garza
-Original Message-
From: Chad [mailto:cgray@;careyweb.com]
Sent: Sunday, November 03, 2002 8:54 AM
To: CF-Talk
Subject: Query help
I know I have done this in the past, but
@;careyweb.com]
Sent: Sunday, November 03, 2002 8:54 AM
To: CF-Talk
Subject: Query help
I know I have done this in the past, but I cannot figure it out for some
reason.
I want to grab out of a database the record with the highest value for
the field RATING (it is an INT). I also want to grab all the data
I know I have done this in the past, but I cannot figure it out for some
reason.
I want to grab out of a database the record with the highest value for
the field RATING (it is an INT). I also want to grab all the data for
the record like Image1, Description etc
SELECT MAX(RATING), Image1,
;07/01/00' with the CF variables name. Try staying away from
CreateODBCDate().
HTH,
Dave.
- Original Message -
From: "Kris Pilles" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 15, 2002 03:53 PM
Subject: Oracle query help
Generally, I think "all" is used as a qualifier to a subquery, much like you
would use "IN" or "BETWEEN." So, if you did:
select * FROM mytable WHERE mycolumn = ALL(1,2,3)
This would select everything where myid was equal to 1, 2 and 3.
-d
Deanna Schneider
Interactive Media Developer
[EMAIL PRO
N., Ste. C
Clearwater, FL 33761
www.trxi.com
> -Original Message-
> From: Kris Pilles [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 15, 2002 3:54 PM
> To: CF-Talk
> Subject: Oracle query help
>
>
> Heres the query:
>
> SELECT ALL STUDENT.STUDENT
I got it... Fogot to remove one of my dummy variables xstart... Duh...
-Original Message-
From: Kris Pilles
Sent: Tuesday, October 15, 2002 3:54 PM
To: CF-Talk
Subject: Oracle query help
Heres the query:
SELECT ALL STUDENT.STUDENT_NUM,
STUDENT.LASTNAME, STUDENT.FIRSTNAME
are you connected to the correct schema
On Tue, 15 Oct 2002, Kris Pilles wrote:
> Heres the query:
>
> SELECT ALL STUDENT.STUDENT_NUM,
> STUDENT.LASTNAME, STUDENT.FIRSTNAME, STUDENT.BIRTHDATE, STUDENT.SEX,
> STUDENT.SSNUM,
> STSERVICE.DATE_BEGIN, STSERVICE.DATE_END, STSERVICE.LOCATION,
> STSERVI
Remove "ALL"?
> Heres the query:
>
> SELECT ALL STUDENT.STUDENT_NUM,
> STUDENT.LASTNAME, STUDENT.FIRSTNAME, STUDENT.BIRTHDATE, STUDENT.SEX,
> STUDENT.SSNUM,
> STSERVICE.DATE_BEGIN, STSERVICE.DATE_END, STSERVICE.LOCATION,
> STSERVICE.HANDICAP,
> STSERVICE.CSIZE_RATIO, STSERVICE.ST_CLASS, STSERVICE
Heres the query:
SELECT ALL STUDENT.STUDENT_NUM,
STUDENT.LASTNAME, STUDENT.FIRSTNAME, STUDENT.BIRTHDATE, STUDENT.SEX,
STUDENT.SSNUM,
STSERVICE.DATE_BEGIN, STSERVICE.DATE_END, STSERVICE.LOCATION,
STSERVICE.HANDICAP,
STSERVICE.CSIZE_RATIO, STSERVICE.ST_CLASS, STSERVICE.FUND,
STSERVICE.SERVICE, CUST
WHERE last < #DateAdd("n", "-1", now())#
Adam.
> -Original Message-
> From: Kris Pilles [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 12:12 PM
> To: CF-Talk
> Subject: Query Help?
>
>
> I need to write some SQL that says
&
I need to write some SQL that says
Delete from session where Last is 1 minute ago
Delete
>From Session
Where Last < __
???
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www
AIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Sunday, June 02, 2002 4:01 PM
>Subject: Re: Date query help
>
>
> > All my Date of Births come out like this now:
> >
> > 1978-02-03 00:00:00
>
>
___
Use the DateFormat() function.
#DateFormat(myquery.dob, "mm/dd/")#
or another format of your choosing.
Jim
- Original Message -
From: "Brian Simpson" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, June 02, 2002 4:01
gt;To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Sunday, June 02, 2002 2:06 PM
>Subject: Re: Date query help
>
>
> > - Original Message -
> > From: "Brian Simpson" <[EMAIL PROTECTED]>
> > I just had a look, The Access f
Thank you very much. It works perfectly. I made a copy of the database,
changed the DOB field to a Date/Time type and I didn't loose anything.
The search I'm using is:
WHERE
DOB <= #CreateODBCDate(DateAdd("", -Form.StartAge, Now ()))#
and
DOB >= #CreateODBCDate(DateAdd("", -Form.EndAge,
(or rename) the old
field and rename the new one with the old name.
Jim
- Original Message -
From: "Gyrus" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, June 02, 2002 2:06 PM
Subject: Re: Date query help
> - Original Message --
- Original Message -
From: "Brian Simpson" <[EMAIL PROTECTED]>
I just had a look, The Access field type is TEXT. can I just change it
to
time/date and be ok? or will I loose all the data that's in that field?
---
Is there much data? I reckon you may well lose the c
I just had a look, The Access field type is TEXT. can I just change it to
time/date and be ok? or will I loose all the data that's in that field?
Thanks for your help.
Brian
At 01:53 PM 6/2/2002, you wrote:
>- Original Message -
>From: "Brian Simpson" <[EMAIL PROTEC
- Original Message -
From: "Brian Simpson" <[EMAIL PROTECTED]>
--snip--
SELECT ItemId, ImageA, FirstName, DOB
FROM Profiles
WHERE DOB < '#dateformat(Startage, "mm/dd/")#'
--snip--
This filter should return all records where DOB is over 20 years ago:
WH
Since I'm still very new to CF, I'm back at the trough for some more help.
First I'm like to say thinks to all that have help in the past and any help
I can get on this one, since I've been beating my head for three days on at.
I have a database that has the Date Of Birth (DOB) stored in mm/dd/
Hello,
I am having a little trouble constructing this query
because I need a count of a " distinct composite
column combo - Date and CMid"..for example..here is
the table and the columns in it:
DateCMid value rate
- -- -- --
02/021 3 6
02/021
-Talk
Subject: RE: Query help
If you're using SQL Server, it's not always good practice to use @@IDENTITY.
Instead, use SCOPE_IDENTITY(). SCOPE_IDENTITY() is the same as @@IDENTITY,
except it limits the scope. For example, if you insert a row into TableA,
but that table has an insert tr
> Also, SCOPE_IDENTITY() may have been recently added. It may
> be a SQL Server 2000 feature so if you're using anything
> prior, you may be out of luck. Anybody else know if this
> is new to SQL Server 2000?
Yes, it's new to SQL Server 2000.
Dave Watts, CTO, Fig Leaf Software
http://www.figl
If you're using SQL Server, it's not always good practice to use @@IDENTITY.
Instead, use SCOPE_IDENTITY(). SCOPE_IDENTITY() is the same as @@IDENTITY,
except it limits the scope. For example, if you insert a row into TableA,
but that table has an insert trigger that does some processing and ins
oever started this thread is paying attention to my ramblings at this
point anyway.
-Original Message-
From: Won Lee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 11:50 AM
To: CF-Talk
Subject: RE: Query help
I agree with you, 99% of the time it will be Access or SQL Server.
I just
I agree with you, 99% of the time it will be Access or SQL Server.
I just gave another possible answer because I wanted to shed another view.
Access also has a date/time field which one can create a CF variable and
then insert that in and then check against the cf variable.
Works well.
At 11:41
autonumber field it sounds like he's using MS Access, in which case I don't
believe there even exists a datetimestamp column type.
-Original Message-
From: Won Lee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 11:23 AM
To: CF-Talk
Subject: RE: Query help
Almost all
Almost all the answers are MS SQL-centric.
Not sure what type of development house you work in, but MS-SQL centric
answers are not a valid solution for some of us.
Both Oracle and MS SQL have several methods to retrieve the last primary
key in a particular table.
I won't bore you with my opinion
Access. Yeah autonumber field... I've never done this before seems like
it would be a simple task
-Original Message-
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 10:29 AM
To: CF-Talk
Subject: Re: Query help
What database? What are you using as a primary key (
What database? What are you using as a primary key (an ID number)?
On Tue, 21 May 2002, Kris Pilles wrote:
> How can Insert a record into a table (that I know how to do) but after
> the insert, I want to be able to know what the primary key for the
> record I just inserted...
>
_
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:06 AM
To: CF-Talk
Subject: Query help
How can Insert a record into a table (that I know how to do) but after
the insert, I want to be able to know what the primary key for t
PROTECTED]>
Sent: Tuesday, May 21, 2002 8:05 AM
Subject: Query help
> How can Insert a record into a table (that I know how to do) but after
> the insert, I want to be able to know what the primary key for the
> record I just inserted...
>
s.com
-Original Message-
From: Stephen Galligan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 10:14 AM
To: CF-Talk
Subject: RE: Query help
Kris,
In your Stored Proc you can use one of SQL's own variables @@identity to get
the row id for the record you have just inserted. Simply assign
ssage-
From: Kris Pilles [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:06 AM
To: CF-Talk
Subject: Query help
How can Insert a record into a table (that I know how to do) but after
the insert, I want to be able to know what the primary key for the
record I just ins
Just keeping you on your toes Boss!
-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 15:18
To: CF-Talk
Subject: RE: Query help
almost!
instead of SELECT @@identity = @id you need SELECT @id = @@identity
-Original Message-
From
almost!
instead of SELECT @@identity = @id you need SELECT @id = @@identity
-Original Message-
From: Stephen Galligan [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 15:14
To: CF-Talk
Subject: RE: Query help
Kris,
In your Stored Proc you can use one of SQL's own vari
= @id
SELECT @id
-Original Message-
From: Kris Pilles [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2002 14:06
To: CF-Talk
Subject: Query help
How can Insert a record into a table (that I know how to do) but after
the insert, I want to be able to know what the primary key for the
record I
How can Insert a record into a table (that I know how to do) but after
the insert, I want to be able to know what the primary key for the
record I just inserted...
__
This list and all House of Fusion resources hosted by CFHosti
: Query help
select top 2 * from table
where number in
(select distinct number from table)
- Matt Small
-Original Message-
From: stas [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:32 PM
To: CF-Talk
Subject: Re: Query help
What I am looking to do would be
Wow, it works!. Are you a witch? :D
Would you please unwind this query for me?
- Original Message -
From: "Marian Dumitrascu" <[EMAIL PROTECTED]>
try this , (but you'll need an unique id):
select * from table t1
where
t1.id in (select top 1 id from table t2 where t2.number = t1.numb
Nice one Marian.
Adam.
> -Original Message-
> From: Marian Dumitrascu [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 05, 2002 3:49 PM
> To: CF-Talk
> Subject: RE: Query help
>
>
> try this , (but you'll need an unique id):
>
> select * from tabl
le t2 where t2.number = t4.number))
order by number
-Marian :)
> -Original Message-
> From: stas [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 05, 2002 4:26 PM
> To: CF-Talk
> Subject: Re: Query help
>
>
> Andrew - the query you posted using UNION SOLUTION
t; -Original Message-
> From: Matthew R. Small [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 05, 2002 2:53 PM
> To: CF-Talk
> Subject: RE: Query help
>
>
> select top 2 * from table
> where number in
> (
Hmmm... good catch. It certainly is Friday.
-Original Message-
From: Cantrell, Adam [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:46 PM
To: CF-Talk
Subject: RE: Query help
Hehe, I was going to post the same thing, but I caught myself. That will
only return two records
t: RE: Query help
select top 2 * from table
where number in
(select distinct number from table)
- Matt Small
-Original Message-
From: stas [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:32 PM
To: CF-Talk
Subject: Re: Query help
What I am looking to do would be like
Adam.
> -Original Message-
> From: Matthew R. Small [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 05, 2002 2:53 PM
> To: CF-Talk
> Subject: RE: Query help
>
>
> select top 2 * from table
> where number in
> (select distinct number from table)
>
> - Matt S
select top 2 * from table
where number in
(select distinct number from table)
- Matt Small
-Original Message-
From: stas [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:32 PM
To: CF-Talk
Subject: Re: Query help
What I am looking to do would be like this
What I am looking to do would be like this in CF:
SELECT DISTINCT number FROM table
SELECT TOP 2 *
FROM table
WHERE number = #getNums.number#
Is there anyway to combine this into one query?
T-SQL maybe?
- Original Message -
From: "C
.
> -Original Message-
> From: Cantrell, Adam [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 05, 2002 1:24 PM
> To: CF-Talk
> Subject: RE: Query help
>
>
> Output two rows or two columns?
>
> I don't know about rows, but columns would be fairly easy:
>
> S
> To: CF-Talk
> Subject: Query help
>
>
> Hello,
>
> I have a table one column of which is a foreign key. For each
> unique value
> in this column I'd like to output 2 rows containing this
> value. Obviously,
> that would be pretty easy in CF, but I need
Hello,
I have a table one column of which is a foreign key. For each unique value
in this column I'd like to output 2 rows containing this value. Obviously,
that would be pretty easy in CF, but I need it to be completely in SQL.
Thanks for any tips!
___
Nice. Thank you.
- Original Message -
From: "BEN MORRIS" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 9:45 AM
Subject: Re: Delete Query Help
> If you want 10 records deleted...
>
> DELETE
> FROM tablen
If you want 10 records deleted...
DELETE
FROM tablename a
WHERE a.ID IN
( SELECT TOP 10 b.ID
FROM tablename b
WHERE ... [criteria]
)
>>> "Frank Mamone" <[EMAIL PROTECTED]> 04/01/02 09:35AM >>>
Hi,
I want to delete a specific amount of records matching a criteria.
I may have many records
Hi,
I want to delete a specific amount of records matching a criteria.
I may have many records matching the crteria but I want to delete a specified amount.
Is it possible to do this directly with SQL?
Thank you,
Frank Mamone
__
AIL PROTECTED]]
Sent: Tuesday, January 29, 2002 7:11 AM
To: CF-Talk
Subject: RE: SQL query help
select * from main_table
where datestamp > #dateformat(date,"dd/mm/")#
This is really all I want to do. The Access field is in date format.
This does not seem to work and I know
age-
From: Chris Sinkwitz [mailto:[EMAIL PROTECTED]]
Sent: 28 January 2002 17:25
To: CF-Talk
Subject: RE: SQL query help
Darren, since you are using an Access db go into your Access program.
Start
to create a query to return the value you want. Then look at the SQL
of
this query you crea
track of
what
your SQL statement should look like.
-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 9:56 AM
To: CF-Talk
Subject: RE: SQL query help
I think it was just that id didnt like the value in quotes !!
-Original Message-
I think it was just that id didnt like the value in quotes !!
-Original Message-
From: Michael Blair [mailto:[EMAIL PROTECTED]]
Sent: 28 January 2002 16:54
To: CF-Talk
Subject: RE: SQL query help
Try reversing the mm/dd/yy into the db and see.
-Original Message-
From: Darren
Try reversing the mm/dd/yy into the db and see.
-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 10:44 AM
To: CF-Talk
Subject: RE: SQL query help
Even though the datestamp field is a date/time field in access I still
get
this error message
rom: Douglas Brown [mailto:[EMAIL PROTECTED]]
Sent: 28 January 2002 16:44
To: CF-Talk
Subject: Re: SQL query help
What error do you get?
There are two major products that come out of Berkeley: LSD and [Unix]
BSD. We don't believe this to be a coincidence.
Doug Brown
- Original Messa
301 - 400 of 506 matches
Mail list logo