(ot) sql help

2010-10-15 Thread Michael J. Sprague
I am having a SQL problem that I'm guessing amounts to me just being brain dead today but I'd really appreciate any help with this. Here is the query: SELECT phases.phase AS phaseLabel, narratives.title, narratives.id, narratives.content, phases.id AS phaseId FROM

Re: (ot) sql help

2010-10-15 Thread Michael J. Sprague
Figured it out. I was missing a join. Should have been: SELECT DISTINCT phases.phase AS phaseLabel, narratives.title, narratives.id, narratives.content, phases.id AS phaseId FROM( ( nsftool.phases2company phases2company

OT: SQL Help

2007-10-24 Thread Rick Root
I'm having a weird query issue with SQL server... The following query inserts two rows into the query_results table: insert into ENQUIRE.dbo.QUERY_RESULTS ( QUERYID, ENTITY_ID ) SELECT DISTINCT 1933 AS QUERYID, A.ENTITY_ID FROM BIOTAB1

OT - Sql Help

2005-02-17 Thread Mickael
Hi All, I am a little stumped with the following task in SQL which seems simple enough to me. I have a form that my users can select a range of Dates for a particular report. The range is not day month year, but month and year and ending month and year. In my database I have a date field,

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Mickael wrote: select * from table where date between Jan2005 and feb2005 ( so in essence not having to say Jan 1, 2005 and Feb 28, 2005) How about: WHERE MONTH(date) = 1 and YEAR(date) = 2005) and MONTH(date) = 2 and YEAR(date) = 2005

Re: OT - Sql Help

2005-02-17 Thread Charlie Griefer
try something like: cfset from_date = createDate(form.fromyear, form.fromMonth, 1) / cfset to_date = createDate(form.toyear, form.toMonth, daysInMonth(createDate(form.toyear, form.toMonth, 1))) / SELECT * FROM table WHERE date BETWEEN (#createODBCDate(variables.from_date))# AND

RE: OT - Sql Help

2005-02-17 Thread Eric Creese
PROTECTED] Sent: Thursday, February 17, 2005 10:19 AM To: CF-Talk Subject: OT - Sql Help Hi All, I am a little stumped with the following task in SQL which seems simple enough to me. I have a form that my users can select a range of Dates for a particular report. The range is not day month year

Re: OT - Sql Help

2005-02-17 Thread Charlie Griefer
oooh...that's cleaner than mine :) On Thu, 17 Feb 2005 11:26:52 -0500, Rick Root [EMAIL PROTECTED] wrote: Mickael wrote: select * from table where date between Jan2005 and feb2005 ( so in essence not having to say Jan 1, 2005 and Feb 28, 2005) How about: WHERE MONTH(date) =

Re: OT - Sql Help

2005-02-17 Thread Mickael
Hi Rick, That is simple. Thanks just what I was looking for - Original Message - From: Rick Root [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, February 17, 2005 11:26 AM Subject: Re: OT - Sql Help Mickael wrote: select * from table where date between

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Charlie Griefer wrote: oooh...that's cleaner than mine :) Maybe, some databases have the gall not to have Month() and Day() functions... postgres has neither... mysql didn't have Day() until 4.1.something.. although they had DayOfWeek(). Plus, if you want to use indexes, you can't do it the

RE: OT - Sql Help

2005-02-17 Thread Matthew Small
I think it's just as simple to say Select * from table where date = '1/1/2005' and date '3/1/2005' - Matt Small -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Thursday, February 17, 2005 11:50 AM To: CF-Talk Subject: Re: OT - Sql Help Charlie

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Matthew Small wrote: I think it's just as simple to say Select * from table where date = '1/1/2005' and date '3/1/2005' The query is, but the way you get there dynamically is not, ecause you have to figure out what the next month is. So if your parameters are 1 2005 2

OT: SQL help

2005-01-06 Thread Tim Do
I'm trying to do a filter for a list of varchars values. I would like it to work like this but using an in instead of = fieldname = case when @variable = '0' then fieldname else @variable end basically if the list is empty do nothing else check the list. also, do I need to format the

RE: [OT] SQL help

2004-05-27 Thread Monique Boea
what is OT? -Original Message- From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:22 PM To: CF-Talk Subject: [OT] SQL help Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table queries like

RE: [OT] SQL help

2004-05-27 Thread John Stanley
Off Topic -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:11 AM To: CF-Talk Subject: RE: [OT] SQL help what is OT? -Original Message- From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:22 PM To: CF

RE: [OT] SQL help

2004-05-27 Thread Philip Arnold
From: Monique Boea what is OT? Off Topic [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: [OT] SQL help

2004-05-27 Thread Monique Boea
Thanks :) -Original Message- From: John Stanley [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:13 AM To: CF-Talk Subject: RE: [OT] SQL help Off Topic -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:11 AM To: CF-Talk

RE: [OT] SQL help

2004-05-27 Thread John Stanley
You are welcome. ;-) -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:17 AM To: CF-Talk Subject: RE: [OT] SQL help Thanks :) -Original Message- From: John Stanley [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:13 AM

Re: [OT] SQL help

2004-05-27 Thread Spectrum Web
ENDAS [group] From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 May 2004 8:22 a.m. To: CF-Talk Subject: [OT] SQL help Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table

[OT] SQL help

2004-05-25 Thread Spectrum WebDesign
Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table queries like this: Group 1: = 16 years Group 2: =17 E = 25 Group 3: =26 E = 40 Group 4: =41 years My$SQL give the ages but how to aggrupate in that groups? Thanx for your time. --

RE: [OT] SQL help

2004-05-25 Thread Matthew Walker
] From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 May 2004 8:22 a.m. To: CF-Talk Subject: [OT] SQL help Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table queries like this: Group 1: = 16 years Group 2: =17 E

OT: SQL HELP

2004-02-18 Thread Tim Do
Hello All, I'm trying to query a table that is on a different server.So I did something like this: select * from server.database.dbo.tablename Strange thing is that this works on every table in that database except for one.Everytime I try to query from that table, I get this error:

Re: OT: SQL HELP

2004-02-18 Thread Casey C Cook
The ID your using have permissions on the table? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: OT: SQL HELP

2004-02-18 Thread Tim Do
yes.. permissions are there. -Original Message- From: Casey C Cook [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 4:40 PM To: CF-Talk Subject: Re: OT: SQL HELP The ID your using have permissions on the table? _ [Todays Threads] [This Message] [Subscription

RE: OT: SQL help

2003-08-27 Thread Mark A. Kruger - CFG
What?? what about cursors? This seems pretty easy in SQL if you ask me. -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 4:08 PM To: CF-Talk Subject: Re: OT: SQL help Michael Hodgdon wrote: Before I begin, I know this is simple

Re: OT: SQL help

2003-08-27 Thread Jochem van Dieten
Mark A. Kruger - CFG wrote: What?? what about cursors? This seems pretty easy in SQL if you ask me. I should have been more specific. You can't do it in SQL in MS SQL Server. You need to use some non-standard T-SQL facilities. Jochem

Re: OT: SQL help

2003-08-26 Thread Jochem van Dieten
Michael Hodgdon wrote: Before I begin, I know this is simple and remedial in CF, but I specifically want a SQL solution (if necessary, it can be a Transact SQL solution) Basically, I want to loop over a query using SQL syntax just like you would loop over a query using CFQUERY or CFLOOP

OT: SQL help

2003-08-26 Thread Michael Hodgdon
I am sure this is really easy, but for some reason, I cannot get a handle on this. Before I begin, I know this is simple and remedial in CF, but I specifically want a SQL solution (if necessary, it can be a Transact SQL solution) Basically, I want to loop over a query using SQL syntax just

OT: SQL Help

2003-03-19 Thread JS
I know there are some smart SQL people on this list, so I hope someone would be willing to help me with my problem. I have 2 tables table 1 uid | person_id | amount table 2 table_1_uid | person_id | percentage I need a way to join these tables to get the percentage of each amount due to a

RE: OT: SQL Help

2003-03-19 Thread JS
I found the solution. I needed a where statement on the uid field. where table1.uid = table2.uid Thanks, JS __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com

Re: OT: SQL Help

2003-01-23 Thread ksuh
The problem is that you're using cursors. Cursors in SQL Server are very, very slow. Come up with an alternate way of doing your import. - Original Message - From: Duane Boudreau [EMAIL PROTECTED] Date: Thursday, January 23, 2003 9:02 am Subject: OT: SQL Help Hi All, I need

OT - SQL Help

2002-12-02 Thread Tony Carcieri
Hi all, Sorry for the OT but this should be a quick answer. This is in ASP (sorry). If I have the following: sql = SELECT * FROM SomeTable sql = sql WHERE Email = ' Request(un) ' sql = sql OR SEmail = ' Request(un) ' sql = sql AND IsDeleted = 0 sql = sql AND Password = '

Re: OT - SQL Help

2002-12-02 Thread Randell B Adkins
You ( ) around your OR statements Example: sql = SELECT * FROM SomeTable sql = sql WHERE (Email = ' Request(un) ' sql = sql OR SEmail = ' Request(un) ') sql = sql AND IsDeleted = 0 sql = sql AND Password = ' Request(pw) ' sql = sql AND Approved = 1 sql = sql AND

RE: OT - SQL Help

2002-12-02 Thread Andy Ewings
. Not saying that what you have will cause errors - just not seen it written like that b4. -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: 02 December 2002 16:31 To: CF-Talk Subject: OT - SQL Help Hi all, Sorry for the OT but this should be a quick answer. This is in ASP

RE: OT - SQL Help

2002-12-02 Thread Robertson-Ravo, Neil (RX)
its using Structure notation. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: 02 December 2002 16:46 To: CF-Talk Subject: RE: OT - SQL Help I'm a bit confused - I'm not sure what you mean by the error you are getting. What scope are you trying to request

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
No scope. It is written in ASP. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:46 AM To: CF-Talk Subject: RE: OT - SQL Help I'm a bit confused - I'm not sure what you mean by the error you are getting. What scope are you trying

RE: OT - SQL Help

2002-12-02 Thread Rob Rohan
:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 9:25 AM To: CF-Talk Subject: RE: OT - SQL Help No scope. It is written in ASP. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:46 AM To: CF-Talk Subject: RE: OT - SQL Help I'm a bit

RE: OT - SQL Help

2002-12-02 Thread Andy Ewings
: RE: OT - SQL Help No scope. It is written in ASP. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:46 AM To: CF-Talk Subject: RE: OT - SQL Help I'm a bit confused - I'm not sure what you mean by the error you are getting. What scope

RE: OT - SQL Help

2002-12-02 Thread Dave Watts
Sorry - I wasn't particularly clear. What I meant to say was that the request object has a number of collections associated with it (form, querystring, etc...). When I have used the request object I have always referenced an element of one of these collections e,g, request.form(un). Not

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
This and CFDJList are the only good lists that are out there where everyone is more than helpful and help/answers are extrememly quick. -Original Message- From: Rob Rohan [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 12:38 PM To: CF-Talk Subject: RE: OT - SQL Help

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
Dave's absolutely right. I am a lil' lazy. The less typing the better! 8^) -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 12:56 PM To: CF-Talk Subject: RE: OT - SQL Help Sorry - I wasn't particularly clear. What I meant to say

RE: OT - SQL Help

2002-12-02 Thread Andy Ewings
my ASP's not what it used to be! - so did Randells post sort it? -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: 02 December 2002 17:59 To: CF-Talk Subject: RE: OT - SQL Help Dave's absolutely right. I am a lil' lazy. The less typing the better! 8

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
No it did not. It's very bizarre. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 1:04 PM To: CF-Talk Subject: RE: OT - SQL Help my ASP's not what it used to be! - so did Randells post sort it? -Original Message- From: Tony

RE: OT - SQL Help

2002-12-02 Thread Matthew Small
:14 PM To: CF-Talk Subject: RE: OT - SQL Help No it did not. It's very bizarre. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 1:04 PM To: CF-Talk Subject: RE: OT - SQL Help my ASP's not what it used to be! - so did Randells post sort

RE: OT - SQL Help

2002-12-02 Thread Matthew Small
:14 PM To: CF-Talk Subject: RE: OT - SQL Help No it did not. It's very bizarre. -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 1:04 PM To: CF-Talk Subject: RE: OT - SQL Help my ASP's not what it used to be! - so did Randells post sort

RE: OT - SQL Help

2002-12-02 Thread Dave Watts
Sorry for the OT but this should be a quick answer. This is in ASP (sorry). If I have the following: sql = SELECT * FROM SomeTable sql = sql WHERE Email = ' Request(un) ' sql = sql OR SEmail = ' Request(un) ' sql = sql AND IsDeleted = 0 sql = sql AND Password = '

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
is that it only accepts the primary email address. Hope this clears it up. Thanks, Tony -Original Message- From: Matthew Small [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:22 PM To: CF-Talk Subject: RE: OT - SQL Help What error are you getting? Matthew Small IT Supervisor

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
Exactly!!! But it is not working that way. I just sent a previous email explaining this. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:36 PM To: CF-Talk Subject: RE: OT - SQL Help Sorry for the OT but this should be a quick answer

RE: OT - SQL Help

2002-12-02 Thread Matthew Small
://www.showstopperonline.com -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:38 PM To: CF-Talk Subject: RE: OT - SQL Help Exactly!!! But it is not working that way. I just sent a previous email explaining this. -Original Message- From: Dave Watts

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
[mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:48 PM To: CF-Talk Subject: RE: OT - SQL Help You to see exactly what SQL Statement being sent to the db. How about displaying the sql string before it is processed and send that to the list. Matthew Small IT Supervisor Showstopper

RE: OT - SQL Help

2002-12-02 Thread Matthew Small
IT Supervisor Showstopper National Dance Competitions 3660 Old Kings Hwy Murrells Inlet, SC 29576 843-357-1847 http://www.showstopperonline.com -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:56 PM To: CF-Talk Subject: RE: OT - SQL Help

RE: OT - SQL Help

2002-12-02 Thread Rob Rohan
Scientia Est Potentia -Original Message- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:56 AM To: CF-Talk Subject: RE: OT - SQL Help I just removed all the asp stuff and this is what gets sent. SELECT * FROM SomeTable WHERE (Email = '[EMAIL PROTECTED

RE: OT - SQL Help

2002-12-02 Thread Tony Carcieri
Small [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 2:48 PM To: CF-Talk Subject: RE: OT - SQL Help You to see exactly what SQL Statement being sent to the db. How about displaying the sql string before it is processed and send that to the list. Matthew Small IT Supervisor

OT: SQL Help, Please

2001-03-07 Thread Scott Brader
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

OT: SQL Help

2001-01-03 Thread Todd Ashworth
Sorry about posting this to the wrong list, but I'm having trouble getting mail through to the SQL list. I am running a query to see if there is an entry in the database for an event that matches certain date criteria. One of the criteria is that one of the dates that the event is scheduled on