Re: Multiple table join statement question

2005-05-26 Thread Ray Champagne
Forget it, this was much easier than I expected. Figured it out! Thanks, Ray Ray Champagne wrote: > Okay, I have a database, not designed by me, but I have to work with it, > with these tables: > > _Owners_ > OwnerID > OwnerName > etc > > _Clients_ > ClientID > OwnerFK > ClientName > etc >

Multiple table join statement question

2005-05-26 Thread Ray Champagne
Okay, I have a database, not designed by me, but I have to work with it, with these tables: _Owners_ OwnerID OwnerName etc _Clients_ ClientID OwnerFK ClientName etc _Users_ UserID ClientFK FirstName etc _Bridge_ BridgeID UserFK FileFK _Files_ FileID FileName etc What I need to do is select a

Re: SQL delete statement question

2005-03-21 Thread Bryan Stevenson
No worries...glad I could help clear the fog ;-) Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~~

RE: SQL delete statement question

2005-03-21 Thread Scott Mulholland
TED] Sent: Monday, March 21, 2005 1:49 PM To: CF-Talk Subject: Re: SQL delete statement question AND contractno IN (select distinct contracts from whatever) or am I having a Monday?? ;-) Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 25

Re: SQL delete statement question

2005-03-21 Thread Bryan Stevenson
AND contractno IN (select distinct contracts from whatever) or am I having a Monday?? ;-) Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystem

SQL delete statement question

2005-03-21 Thread Scott Mulholland
Is there an easy way to do a mass delete with 2 pieces of criteria in the where clause? With one clause we are just using a subquery i.e "delete from contracts where accountno IN (select distinct accounts from cancels)". I'm having trouble seeing a way to do in a sql statement if we needed t

Re: 'Select' statement question!

2004-05-24 Thread cf coder
You are a genius. I'm going home now but will try this tomorrow. Thanks again Pascal, don't know what I would have done without your help. Cheers, cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: 'Select' statement question!

2004-05-24 Thread Pascal Peters
eed it, you can calculate the total on the fly: blah blah blah #variables.total# logs found. #variables.tmp# > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: maandag 24 mei 2004 14:09 > To: CF-Talk > Subject: Re: 'Select' statemen

Re: 'Select' statement question!

2004-05-24 Thread cf coder
Many thanks Pascal for that. It still returns multiple records. I used the group by tag which stops this from happenning, so I don't see multiple records of the same log. Its all good. However, I'm displaying the recordcount in the search result and it doesn't give you the correct picture of the no

RE: 'Select' statement question!

2004-05-24 Thread Pascal Peters
uot;...> . Don't forget "ORDER BY LogID" if you want to do this. Pascal > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: maandag 24 mei 2004 13:03 > To: CF-Talk > Subject: Re: 'Select' statement question! > > I'

RE: 'Select' statement question!

2004-05-24 Thread Pascal Peters
uot;...> . Don't forget "ORDER BY LogID" if you want to do this. Pascal > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: maandag 24 mei 2004 13:03 > To: CF-Talk > Subject: Re: 'Select' statement question! > > I'

Re: 'Select' statement question!

2004-05-24 Thread cf coder
I'll be more specific this time. Sorry! Ok! I am working on the search functionality. The search should allow users to find a log from the logs table and also allow users to find logs that are attached to assets. Users can search by log/call ref no by inputting the log no in a textfield or by sele

Re: 'Select' statement question!

2004-05-21 Thread Jochem van Dieten
cf coder wrote: > Thanks Jochem, but your sql returns duplicate callNo's. I tried both your queries. Then please elaborate on your problem and the schema of your database. What I have so far is: - you have a fragment of a bar-code - that fragment identifies assets - ??? - employee records Obvio

Re: 'Select' statement question!

2004-05-21 Thread cf coder
Thanks Jochem, but your sql returns duplicate callNo's. I tried both your queries. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Re: 'Select' statement question!

2004-05-21 Thread Jochem van Dieten
cf coder wrote: > The following code is in a stored procedure. Can > somebody please just confirm if this is a valid SQL > Statement. I appreciate this is not a SQL Forum. I'm a > ColdFusion developer and am trying to query the db. > > SET @SQLStatement = @SQLStatement + 'SELECT * From > Employee

Re: 'Select' statement question!

2004-05-21 Thread cf coder
yes I am using MS SQL Server [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Re: 'Select' statement question!

2004-05-21 Thread cf coder
Sorry, I made a typo mistake. This is the correct sql SET @SQLStatement = @SQLStatement + 'SELECT * From Employee where Employee.callNo IN (select distinct Employee.callNo from Employee where Employee.asst_id IN (select Assets.asst_id from Assets where bar_code = ' + char(39) + @asset + char(39) +

Re: 'Select' statement question!

2004-05-21 Thread Alexander Sherwood
At 11:42 AM 5/21/2004, you wrote: >The following code is in a stored procedure. Can >somebody please just confirm if this is a valid SQL >Statement. I appreciate this is not a SQL Forum. I'm a >ColdFusion developer and am trying to query the db. > >SET @SQLStatement = @SQLStatement + 'SELECT * From

'Select' statement question!

2004-05-21 Thread cf coder
The following code is in a stored procedure. Can somebody please just confirm if this is a valid SQL Statement. I appreciate this is not a SQL Forum. I'm a ColdFusion developer and am trying to query the db. SET @SQLStatement = @SQLStatement + 'SELECT * From Employee where Employee.asstetID IN (se

RE: SQL Statement question

2002-03-13 Thread Chip Harlan
" syntax yet??? argh!! -Original Message- From: Joel Blanchette [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 11:45 AM To: CF-Talk Subject: SQL Statement question Hello all, I have a question about a sql statement I am trying to do. I am using the select distinct

SQL Statement question

2002-03-13 Thread Joel Blanchette
Hello all, I have a question about a sql statement I am trying to do. I am using the select distinct column1, column2 from table This is working correctly. The problem is when I want to output the results I need the ID column. How would I do this? I do not want to distinct that column

RE: Statement Question/Help

2001-03-26 Thread Hayes, David
Use a HAVING clause before your ORDER BY clause, e.g. "having count(contestantID) >= 2" -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 11:11 AM To: CF-Talk Subject: Statement Question/Help Good day all, I was wondering if anyo

Statement Question/Help

2001-03-26 Thread Jay Patton
Good day all, I was wondering if anyone could help me with this. i have a statement shown below that works great. however i was wondering if someone might give me an idea of how to do this: i need to display ONLY the contestants that show up in the ResultsManager (this is a table) More than onc

RE: Another SQL statement question...

2001-03-07 Thread DeVoil, Nick
Yes, my bad, isnull not ifnull -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 4:24 PM To: CF-Talk Subject: RE: Another SQL statement question... > It's off-topic, but I know people here are experienced with SQL, so...

RE: Another SQL statement question...

2001-03-07 Thread Maia, Eric
I think COALESCE is another way to do this: COALESCE(TextColumn1, ' ') -Original Message- From: DeVoil, Nick [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 8:18 AM To: CF-Talk Subject: RE: Another SQL statement question... how about SELECT TextID, IFNULL(T

RE: Another SQL statement question...

2001-03-07 Thread Philip Arnold - ASP
> It's off-topic, but I know people here are experienced with SQL, so... > > I am using SQL 7.0 and CF 4.5. I am trying to combine two ntext field > columns to one field in a query, but I have a problem when one of > the fields contains 'NULL' value. I am trying: > > SELECT TextID, TextColumn1 +

RE: Another SQL statement question...

2001-03-07 Thread DeVoil, Nick
how about SELECT TextID, IFNULL(TextColumn1, '') + IFNULL(TextColumn2, '') AS AllTextColumns FROM Table1 -Original Message- From: river [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 3:53 PM To: CF-Talk Subject: Another SQL statement question... It

Another SQL statement question...

2001-03-07 Thread river
It's off-topic, but I know people here are experienced with SQL, so... I am using SQL 7.0 and CF 4.5. I am trying to combine two ntext field columns to one field in a query, but I have a problem when one of the fields contains 'NULL' value. I am trying: SELECT TextID, TextColumn1 + TextColumn2

RE: !!!Statement Question.!!! (whole page)

2001-03-01 Thread Patricia Lee
rom: Jay Patton [mailto:[EMAIL PROTECTED]] |Sent: Thursday, March 01, 2001 1:32 PM |To: Patricia Lee; [EMAIL PROTECTED] |Subject: Re: !!!Statement Question.!!! (whole page) | | |here is the whole CF page. i hope this helps. | | | | |SELECT ResultsManager.ContestantID, ContestantManage

Re: !!!Statement Question.!!!

2001-03-01 Thread Deanna L. Schneider
Resultsmanager is your tablename, is it not? CF can't pull a variable from the table while it's running the query. You would need to either use a sql function (not a cf function) or do this in two steps, pulling the resultsmanager.contestentid variable, and then looping through that variable. Mak

Re: !!!Statement Question.!!!

2001-03-01 Thread Jay Patton
ch 01, 2001 11:15 AM Subject: RE: !!!Statement Question.!!! > by the way are the same jay patton that writes stuff for webmonkey.com ??? > > -Original Message- > From: Jay Patton [mailto:[EMAIL PROTECTED]] > Sent: 01 March 2001 17:53 > To: CF-Talk > Subject: !!!Statement Questio

RE: !!!Statement Question.!!!

2001-03-01 Thread Philip Arnold - ASP
ERROR: Error Diagnostic Information An error occurred while evaluating the expression: #ResultsManager.ContestantID# Error near line 9, column 169. This is telling you that it can't find the variable, not that it's the wrong type... Just on a side point; > dbtype="ODBC" username="#userna

Re: !!!Statement Question.!!! (whole page)

2001-03-01 Thread Jay Patton
sa.com - Original Message - From: "Patricia Lee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, March 01, 2001 11:26 AM Subject: RE: !!!Statement Question.!!! > Where is the variable Resultsmanager.contestantID supposed t

RE: !!!Statement Question.!!!

2001-03-01 Thread Patricia Lee
will happen. You're trying to output a variable that doesn't exist. |-Original Message- |From: Jay Patton [mailto:[EMAIL PROTECTED]] |Sent: Thursday, March 01, 2001 12:53 PM |To: CF-Talk |Subject: !!!Statement Question.!!! | | |This list has been good to me so far so i thought

RE: !!!Statement Question.!!!

2001-03-01 Thread Maia, Eric
In CF, refer to the variable as #GetTotalPts.ContestantID# -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 9:53 AM To: CF-Talk Subject: !!!Statement Question.!!! This list has been good to me so far so i thought i would ask another question

RE: !!!Statement Question.!!!

2001-03-01 Thread Javed Mushtaq
by the way are the same jay patton that writes stuff for webmonkey.com ??? -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent: 01 March 2001 17:53 To: CF-Talk Subject: !!!Statement Question.!!! This list has been good to me so far so i thought i would ask another

!!!Statement Question.!!!

2001-03-01 Thread Jay Patton
This list has been good to me so far so i thought i would ask another question. Could anyone help me with this? ive been going over and over it for a while now and cant seem to get it figured out. what i have is a ResultsManager and in that i have a ContestantID that is pulled from the Contesta