RE: Simple Query Help

2003-02-05 Thread Robertson-Ravo, Neil (RX)
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

Simple Query Help

2003-02-05 Thread rick
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

RE: 2nd try: SQL query help

2003-02-02 Thread Jeff Beer
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

RE: 2nd try: SQL query help

2003-02-02 Thread Jochem van Dieten
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

RE: 2nd try: SQL query help

2003-02-02 Thread Josh Trefethen
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

FW: 2nd try: SQL query help

2003-02-02 Thread Jeff Beer
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

Re: QUERY Help

2003-01-30 Thread Cedric Villat
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

RE: SQL query help

2003-01-30 Thread webguy
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

RE: SQL query help

2003-01-30 Thread webguy
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

OT: SQL query help

2003-01-30 Thread Jeff Beer
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

RE: QUERY Help

2003-01-29 Thread CWatt
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

Re: QUERY Help

2003-01-29 Thread Cedric Villat
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

RE: QUERY Help

2003-01-29 Thread CWatt
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

RE: QUERY Help

2003-01-29 Thread CWatt
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

QUERY Help

2003-01-29 Thread Cedric Villat
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

Re: query help...

2003-01-29 Thread Stephen Hait
> 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

Re: query help...

2003-01-29 Thread Steve Robison, Jr.
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

query help...

2003-01-29 Thread Houk, Gary
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

Re: Query Help Again...

2003-01-14 Thread charlie griefer
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

Re: Query Help Again...

2003-01-14 Thread Jochem van Dieten
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

Re: Query Help Again...

2003-01-14 Thread Charlie Griefer
- 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 &

Re: Query Help Again...

2003-01-14 Thread Jerry Johnson
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

Query Help Again...

2003-01-14 Thread Scott Wilhelm
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(

RE: Query help!

2003-01-13 Thread Costas Piliotis
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

Re: Query help!

2003-01-13 Thread Samuel R. Neff
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

RE: Query help!

2003-01-13 Thread Mike Townend
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

Re: Query help!

2003-01-13 Thread Cutter (CF_Talk)
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 >

Re: Query help!

2003-01-13 Thread charlie griefer
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

RE: Query help!

2003-01-13 Thread Scott Wilhelm
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

Query help!

2003-01-13 Thread Scott Wilhelm
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

Re: SQL Query Help - Access Lookup tables and query output not accurate - not working

2003-01-10 Thread Fregas
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

Re: SQL Query Help - Access Lookup tables and query output not accurate - not working

2003-01-10 Thread Jason Miller
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

SQL Query Help - Access Lookup tables and query output not accurate - not working

2003-01-10 Thread Jason Miller
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

RE: Query Help

2002-11-05 Thread Mark Leder
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

Re: Query Help

2002-11-05 Thread Randell B Adkins
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

RE: Query Help

2002-11-05 Thread Everett, Al
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

Query Help

2002-11-05 Thread Mark Leder
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

RE: Query help

2002-11-03 Thread Jim Davis
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 &

RE: Query help

2002-11-03 Thread Chad
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

RE: Query help

2002-11-03 Thread Jeff
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

RE: Query help

2002-11-03 Thread Andy Clary
@;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

Query help

2002-11-03 Thread Chad
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,

Re: Oracle query help

2002-10-16 Thread Dave Carabetta
;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

Re: Oracle query help

2002-10-15 Thread Deanna Schneider
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

RE: Oracle query help

2002-10-15 Thread Lofback, Chris
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

RE: Oracle query help

2002-10-15 Thread Kris Pilles
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

Re: Oracle query help

2002-10-15 Thread Alex
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

Re: Oracle query help

2002-10-15 Thread Tony Schreiber
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

Oracle query help

2002-10-15 Thread Kris Pilles
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

RE: Query Help?

2002-08-09 Thread Cantrell, Adam
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 &

Query Help?

2002-08-09 Thread Kris Pilles
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

Re: Date query help

2002-06-02 Thread Brian Simpson
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 > > ___

Re: Date query help

2002-06-02 Thread Jim McAtee
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

Re: Date query help

2002-06-02 Thread Brian Simpson
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

Re: Date query help

2002-06-02 Thread Brian Simpson
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,

Re: Date query help

2002-06-02 Thread Jim McAtee
(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 --

Re: Date query help

2002-06-02 Thread Gyrus
- 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

Re: Date query help

2002-06-02 Thread Brian Simpson
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

Re: Date query help

2002-06-02 Thread Gyrus
- 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

Date query help

2002-06-02 Thread Brian Simpson
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/

Distinct Query help

2002-05-29 Thread Amanda Stern
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

RE: Query help

2002-05-21 Thread Rob Baxter
-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

RE: Query help

2002-05-21 Thread Dave Watts
> 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

RE: Query help

2002-05-21 Thread Ben Johnson
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

RE: Query help

2002-05-21 Thread Rob Baxter
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

RE: Query help

2002-05-21 Thread Won Lee
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

RE: Query help

2002-05-21 Thread Rob Baxter
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

RE: Query help

2002-05-21 Thread Won Lee
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

RE: Query help

2002-05-21 Thread Kris Pilles
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 (

Re: Query help

2002-05-21 Thread Alex
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... > _

RE: Query help

2002-05-21 Thread Rob Baxter
[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

Re: Query help

2002-05-21 Thread Paul Giesenhagen
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... >

RE: Query help

2002-05-21 Thread Christopher Olive
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

RE: Query help

2002-05-21 Thread Kevin Schmidt
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

RE: Query help

2002-05-21 Thread Stephen Galligan
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

RE: Query help

2002-05-21 Thread Andy Ewings
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

RE: Query help

2002-05-21 Thread Stephen Galligan
= @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

Query help

2002-05-21 Thread Kris Pilles
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

RE: Query help

2002-04-05 Thread Andres
: 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

Re: Query help

2002-04-05 Thread stas
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

RE: Query help

2002-04-05 Thread Cantrell, Adam
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

RE: Query help

2002-04-05 Thread Marian Dumitrascu
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

Re: Query help

2002-04-05 Thread stas
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 > (

RE: Query help

2002-04-05 Thread Matthew R. Small
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

RE: Query help

2002-04-05 Thread Shawn Kernes
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

RE: Query help

2002-04-05 Thread Cantrell, Adam
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

RE: Query help

2002-04-05 Thread Matthew R. Small
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

Re: Query help

2002-04-05 Thread stas
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

RE: Query help

2002-04-05 Thread Cantrell, Adam
. > -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

RE: Query help

2002-04-05 Thread Cantrell, Adam
> 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

Query help

2002-04-05 Thread stas
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! ___

Re: Delete Query Help

2002-04-01 Thread Frank Mamone
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

Re: Delete Query Help

2002-04-01 Thread BEN MORRIS
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

Delete Query Help

2002-04-01 Thread Frank Mamone
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 __

RE: SQL query help

2002-01-29 Thread Steve Oliver
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

RE: SQL query help

2002-01-29 Thread Darren Adams
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

RE: SQL query help

2002-01-28 Thread Chris Sinkwitz
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-

RE: SQL query help

2002-01-28 Thread Darren Adams
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

RE: SQL query help

2002-01-28 Thread Michael Blair
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

RE: SQL query help

2002-01-28 Thread Darren Adams
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

<    1   2   3   4   5   6   >