Validation Query Question

2013-03-12 Thread DeMarco, Alex
I have a question regarding Validation Query: The CF 9 online help says this about the Validation Query: Called when a connection from the pool is reused. This can slow query response time because an additional query is generated. You should specify this just before restarting the database

nested hierarchical query question

2011-03-14 Thread LRS Scout
I have a table departments with the fields departmentID, parentDepartmentID, departmentName. I'm trying to build a nested ul li structure out of this. Currently this can be nested n deep. I'm not sure how best to even approach this. SQL Server 2008. god this sounds dumb even to me.

Re: nested hierarchical query question

2011-03-14 Thread Judah McAuley
Are you looking for help on the db part or constructing the UI display or both? When it comes to the DB part, I listen to Joe Celko. That dude knows way more about databases and SQL than any person ought to. Here's an article of his on messing with hierarchical data in SQL:

Re: nested hierarchical query question

2011-03-14 Thread LRS Scout
Yeah man a recursive function is probably going to be the answer I've seen it done with directory structures I'm just having a brain cramp on how to make it work here. On Mon, Mar 14, 2011 at 7:17 PM, Judah McAuley ju...@wiredotter.com wrote: Are you looking for help on the db part or

Re: nested hierarchical query question

2011-03-14 Thread LRS Scout
http://www.dougboude.com/blog/1/2006/06/Recursive-Functions-in-ColdFusion.cfm This has been useful. On Mon, Mar 14, 2011 at 7:20 PM, LRS Scout lrssc...@gmail.com wrote: Yeah man a recursive function is probably going to be the answer I've seen it done with directory structures I'm just

Re: SQL query question

2011-02-02 Thread Sean Henderson
With ColdFusion 9, we ended up replacing all the wildcard selects with actual column names, among other fortifications. We did not experience this issue on 6.1. ~| Order the Adobe Coldfusion Anthology now!

SQL query question

2011-02-01 Thread Debbie Morris
Since everyone should be in a SQL Join state of mind...here's another one. I have a weird issue that I haven't been able to narrow down yet. I'm trying to add a new field to one of my tables to store some additional information, but once I add the column, my previously working query breaks.

Re: SQL query question

2011-02-01 Thread Charlie Stell
This might be an issue I've had to deal with before. Do something to change the fingerprint (no idea what the correct term would be) of the query - or restart cf. By change the fingerprint, it could be something as simple ad swapping p.* and pt.* (swapping as in their ordinal position in the

Re: SQL query question

2011-02-01 Thread Ian Skinner
On 2/1/2011 1:23 PM, Debbie Morris wrote: What am I overlooking? The evil of using * in SELECT clauses. When that is done, database drivers are know to cache the columns and datatypes of the SQL queries. Then somebody comes along and changes the database structure, like you adding a field.

Re: SQL query question

2011-02-01 Thread Ian Skinner
On 2/1/2011 2:21 PM, Charlie Stell wrote: I assume this is something on CF's side - as restarting the CF service also fixes it. Not ColdFusion itself, but the database drivers used by ColdFusion and the cached (pooled) data source settings. Changing the Datasource to not used pooled settings

Re: SQL query question

2011-02-01 Thread Michael Grant
The evil of using * in SELECT clauses. I'm with Ian on this 100%. Often times developers think that using * will be faster, and easier and allow more flexibility. However that couldn't be further from the truth as you are seeing now. Take Ian's advice and define each column you want from your

RE: SQL query question

2011-02-01 Thread Debbie Morris
, so I'll tackle this again in the morning. Thanks for the help! Debbie -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Tuesday, February 01, 2011 5:41 PM To: cf-talk Subject: Re: SQL query question The evil of using * in SELECT clauses. I'm with Ian on this 100

CFC Query Question

2010-08-03 Thread Robert Harrison
Let's say I put a query like below in a CFC: cfquery name= news_menu datasource=#dsn# cachedwithin=#createTimeSpan (0,0,20,0)# SELECT cfif select_limit gt 0TOP #select_limit# /cfif safelink, news_id, headline, description, pub_year, pub_month, pub_day FROM tbl_news ORDER BY pub_year DESC,

re: CFC Query Question

2010-08-03 Thread Jason Fisher
Well, that code will create a separate cache for each version of the variable query statement. Cf http://forums.devshed.com/coldfusion-development-84/cfml-cfquery-cachedwithi n-does-changing-order-by-create-new-query-680793.html In other words, I think it will work the way you expect.

RE: CFC Query Question

2010-08-03 Thread Robert Harrison
] Sent: Tuesday, August 03, 2010 2:52 PM To: cf-talk Subject: re: CFC Query Question Well, that code will create a separate cache for each version of the variable query statement. Cf http://forums.devshed.com/coldfusion-development-84/cfml-cfquery-cachedwithi n-does-changing-order-by-create-new

RE: CFC Query Question

2010-08-03 Thread Jason Fisher
Makes sense. Clearly, if you were testing for ID = '#myVar#', then the number of variances would make caching irrelevant, but it sounds like this case might be a good candidate. ~| Order the Adobe Coldfusion Anthology now!

query question

2009-05-29 Thread Chad Gray
I have two tables that are joined one to many. I would like to write a query to get the one from the first table and only one from the many table. TABLE1 AlbumID, AlbumTitle 1, MyPictures TABLE2 PictureID, AlbumID, PictureName 1, 1, test.jpg 2, 1, test2.jpg How do I write the query to

Re: query question

2009-05-29 Thread Ryan Letulle
what db -- Ryan On Fri, May 29, 2009 at 9:41 AM, Chad Gray cg...@careyweb.com wrote: I have two tables that are joined one to many. I would like to write a query to get the one from the first table and only one from the many table. TABLE1 AlbumID, AlbumTitle 1, MyPictures TABLE2

RE: query question

2009-05-29 Thread Chad Gray
Sorry should have mentioned that MySQL -Original Message- From: Ryan Letulle [mailto:bayous...@gmail.com] Sent: Friday, May 29, 2009 10:48 AM To: cf-talk Subject: Re: query question what db -- Ryan On Fri, May 29, 2009 at 9:41 AM, Chad Gray cg...@careyweb.com wrote: I have two

Re: query question

2009-05-29 Thread Azadi Saryev
2 options off the top of my head: 1) have your query return as many records as there are, but limit the output of the query by using MAXROWS attribute of cfoutput tag 2) join your first table to a sub-query that pulls only one record from the other table in your sql: SELECT TABLE1.*,

Re: query question

2009-05-29 Thread Ryan Letulle
, 2009 10:48 AM To: cf-talk Subject: Re: query question what db -- Ryan On Fri, May 29, 2009 at 9:41 AM, Chad Gray cg...@careyweb.com wrote: I have two tables that are joined one to many. I would like to write a query to get the one from the first table and only one from the many

Re: query question

2009-05-29 Thread Azadi Saryev
mentioned that MySQL -Original Message- From: Ryan Letulle [mailto:bayous...@gmail.com] Sent: Friday, May 29, 2009 10:48 AM To: cf-talk Subject: Re: query question what db -- Ryan On Fri, May 29, 2009 at 9:41 AM, Chad Gray cg...@careyweb.com wrote: I have two tables

OT: Oracle Query Question

2008-04-30 Thread Randy Adkins
I am trying ot use the to_date function to format the date as just the YEAR but it returns the following error: ORA-1830: date format picture ends before converting entire input string Here is the sql: select to_date(annual_email_sent_date,'') from nh_annual_email_log So to answer a few

Re: OT: Oracle Query Question

2008-04-30 Thread Ian Skinner
Randy Adkins wrote: So to answer a few questions: Yes, the field within the oracle database is a true date time field. Do all the records contain date data? Are any of them NULL? ~| Adobe® ColdFusion® 8 software 8 is the

Re: OT: Oracle Query Question

2008-04-30 Thread Greg Morphis
'' isnt a date recognized.. try to_char() to_char(myDate, '') That should work for you On Wed, Apr 30, 2008 at 11:06 AM, Ian Skinner [EMAIL PROTECTED] wrote: Randy Adkins wrote: So to answer a few questions: Yes, the field within the oracle database is a true date time field. Do

Re: OT: Oracle Query Question

2008-04-30 Thread ColdFusion Dev
Sweet that worked... (Yes all the records will contain date daa) On Wed, Apr 30, 2008 at 12:10 PM, Greg Morphis [EMAIL PROTECTED] wrote: '' isnt a date recognized.. try to_char() to_char(myDate, '') That should work for you On Wed, Apr 30, 2008 at 11:06 AM, Ian Skinner [EMAIL

ColdFusion query question

2008-04-25 Thread erik tom
I have problem updating the DB table. I have 3 text boxes which has specific id. if the value of that boxes changed i wanto compare to DB and update the option for that id and only for that id . Instead it updates for all ids cfif isDefined(btnOption) cfloop index=i from=1

RE: ColdFusion query question

2008-04-25 Thread Mark Kruger
: erik tom [mailto:[EMAIL PROTECTED] Sent: Friday, April 25, 2008 11:37 AM To: CF-Talk Subject: ColdFusion query question I have problem updating the DB table. I have 3 text boxes which has specific id. if the value of that boxes changed i wanto compare to DB and update the option for that id and only

Re: ColdFusion query question

2008-04-25 Thread Brian Kotek
Did you read my response to this same question in the other thread before you decided to post it yet again as a duplicate thread? On Fri, Apr 25, 2008 at 12:37 PM, erik tom [EMAIL PROTECTED] wrote: I have problem updating the DB table. I have 3 text boxes which has specific id. if the value

Re: ColdFusion query question

2008-04-25 Thread erik tom
The data is the follow : id idoptionsquestionID SurveyID 160test 82 1 161test2 82 1 162test3 82 1 Erik, This is pretty difficult to troubleshoot

Re: ColdFusion query question

2008-04-25 Thread erik tom
Sorry about that I have updated version of the code. What it does is updating all records rathere than updating only changed records. cfif isDefined(btnOption) cfloop index=i from=1 to=#ListLen(form.opt)# cfset variables.this=ListGetAt(form.opt,i) cfloop

Re: Query Question

2007-10-12 Thread Claude Schneegans
think that I need to look at redoing this table for sure. If you can redesign the table, the best way to handle hierarchy is using a recursive template like a custom tag, called with only the parentId as parameter. The root elements in the the tree have parentId = 0. --

Re: Query Question

2007-10-12 Thread Claude Schneegans
I would add a column hierarchyLevel and order by that column That won't do it: you can have element at the same level, but in completely distinct branches in the hierarchy. -- ___ REUSE CODE! Use custom tags; See

RE: Query Question

2007-10-12 Thread Svetlana Rudkovsky
-Talk Subject: Query Question I have a simple select query: Select parentID, title, body, status, hierarchy From pages Where status='A' Order by hierarchy The hierarchy field looks like this: 1 1~7 1~8 1~9 1~10 1~12 1~12~13 1~12~14 and so on. The problem is that when I run this query, it orders

Re: Query Question

2007-10-12 Thread Bruce Sorge
Actually I am going to stop re-inventing the wheel and go with an open source CMS. Claude Schneegans wrote: I would add a column hierarchyLevel and order by that column That won't do it: you can have element at the same level, but in completely distinct branches in the hierarchy.

Query Question

2007-10-11 Thread Bruce Sorge
I have a simple select query: Select parentID, title, body, status, hierarchy From pages Where status='A' Order by hierarchy The hierarchy field looks like this: 1 1~7 1~8 1~9 1~10 1~12 1~12~13 1~12~14 and so on. The problem is that when I run this query, it orders them like this: 1 1~10

RE: Query Question

2007-10-11 Thread Dale Fraser
Message- From: Bruce Sorge [mailto:[EMAIL PROTECTED] Sent: Friday, 12 October 2007 8:04 AM To: CF-Talk Subject: Query Question I have a simple select query: Select parentID, title, body, status, hierarchy From pages Where status='A' Order by hierarchy The hierarchy field looks like this: 1 1

RE: Query Question

2007-10-11 Thread Bruce Sorge
[mailto:[EMAIL PROTECTED] Sent: Thursday, October 11, 2007 5:01 PM To: CF-Talk Subject: RE: Query Question You can't really. Your DB is badly designed if you have one field called hierarchy that contains multiple elements. Its not normalised. Normally the hierarchy would be in a different table

Re: Access Query Question

2007-04-19 Thread Donna Martin
Sorry...I beg to differ. Access is most certainly not the db of choice for large--or even medium-sized-apps with many, many users or mega-records, but has its place. In the newer versions, Access can be locked at the record level, and does not effect changes made to other records within the

RE: Access Query Question

2007-04-19 Thread Peterson, Chris
Donna, I don't have you experience with newer Access, but why would you use that over SQL 2005 Express edition? Chris -Original Message- From: Donna Martin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 19, 2007 10:10 AM To: CF-Talk Subject: Re: Access Query Question Sorry...I beg

Re: Access Query Question

2007-04-19 Thread Claude Schneegans
My personal experience with it is this: I have yet to have any of these database instances to be corrupted or bloated in over five years of very active usage. Same with me, in over 12 years ! Another advantage is that you can easily make the database downloadable by the customer, so that he

Re: Access Query Question

2007-04-19 Thread Claude Schneegans
but why would you use that over SQL 2005 Express edition? The environment one client - one database - one file has many advantages and makes many things much simpler than the one database server environment. Again, simplicity is an advantage for simple applications, for more complex

Re: Access Query Question

2007-04-19 Thread Jim Wright
Donna Martin wrote: In the newer versions, Access can be locked at the record level, and does not effect changes made to other records within the same table. *If you are using the oledb driver with the correct settings, IIRC. Of course, that doesn't prevent something else from connecting

Access Query Question

2007-04-18 Thread dsmith
I have a client using access (I know Access sucks for web stuff, but he's using it...) Anyway I try to execute the SQL below and it blows a syntax error from CF. I can paste this into a query in Access and get it to run. I think it has something to do with the field called Date which is a

Re: Access Query Question

2007-04-18 Thread Claude Schneegans
I have a client using access (I know Access sucks for web stuff, but he's using it...) Access does not sucks. Access works perfectly for many sites for what it has been made for, ie small and medium databases. Unless you have thousands hits a day on your site, it is a perfect solution, and

Re: Access Query Question

2007-04-18 Thread Will Tomlinson
Access does not sucks. Access works perfectly for many sites for what it has been made for, ie small and medium databases. Not tryin' to argue here, but I've mostly heard bad stuff about it. Will ~| ColdFusion MX7 by Adobe®

Re: Access Query Question

2007-04-18 Thread Claude Schneegans
've mostly heard bad stuff about it. Me too, but they are mostly urban legends. Like for instance Access is really bad when serving many users at the same time. This affirmation just does not make sense for WEB applications. This may be true for an Access application on a lan, but since when

RE: Access Query Question

2007-04-18 Thread Dave Watts
Me too, but they are mostly urban legends. Like for instance Access is really bad when serving many users at the same time. This affirmation just does not make sense for WEB applications. This may be true for an Access application on a lan, but since when used with CF there is always

Re: Access Query Question

2007-04-18 Thread Will Tomlinson
I just know someone that's a higher-up at the IRS. She told me they mostly use oracle, but thought they'd try an access db for a small application. She said if they had 6 users on the system, the data became corrupted. Acted all pissy about it and stuff. Of course, she also told me CF sucked.

Query Question

2007-02-02 Thread Pete
Hi there I have 2 queries that both work. The first I was using to get information from a table in the database: Select * From tbl_procedures p Where procedurecategoryid = #url.procedurecategoryid# This query returned all the procedures which had a procedurecategoryid = the url

Re: Query Question

2007-02-02 Thread Jochem van Dieten
Pete wrote: Select * From tbl_procedures p, procedure_asset pa Where ( p.procedureid = pa.procedureid and procedurecategoryid = #url.procedurecategoryid# ) The trouble I am having is that if there is no matching record in the procedure_asset table the

RE: Query Question

2007-02-02 Thread Pete
10:09 PM To: CF-Talk Subject: Re: Query Question Pete wrote: Select * From tbl_procedures p, procedure_asset pa Where ( p.procedureid = pa.procedureid and procedurecategoryid = #url.procedurecategoryid# ) The trouble I am having

Re: Query Question

2006-09-04 Thread Dina Hess
http://mysite.verizon.net/Graeme_Birchall/id1.html Download and go to page 302. Dina On 9/1/06, loathe [EMAIL PROTECTED] wrote: I have an organization table. There is an org_id and a parent_org_id. I am trying to get all organizations from a certain point down. The environment is DB/2.

Query Question

2006-09-01 Thread loathe
I have an organization table. There is an org_id and a parent_org_id. I am trying to get all organizations from a certain point down. The environment is DB/2. So far I'm doing: Select org.org_id, org.parent_org_id From organizations org Left join

Re: Query Question

2006-09-01 Thread Barney Boisvert
Have you checked to see if DB/2 supports recursive queries? Most DBs don't, but some do. That'd be the best bet. Otherwise you're stuck with doing the recursion manual: run that query, then run it again for each returned row, repeating until there aren't any more rows. If you have a common

RE: Query Question

2006-09-01 Thread Doug Bezona
This should help: http://tinyurl.com/hee59 -Original Message- From: loathe [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 3:46 PM To: CF-Talk Subject: Query Question I have an organization table. There is an org_id and a parent_org_id. I am trying to get all

Re: Query Question

2006-09-01 Thread Timothy Heald
Rock :) Wish this were oracle :) That solution for Oracle is sweet. This should help: http://tinyurl.com/hee59 recursion or something in order to go lower than that. I'm beating myself over the head with this one, on a Friday afternoon, any pointers would be much appreciated.

Query question

2006-03-01 Thread Will Tomlinson
Using Access (not me, a client has to use it!)... I have a tblStates. I need a few different tables to be related to it. A local agency is in a state. A contributor is in a state, a state coordinator is in a state, etc. When I join tblStates in a query it blows up. I get no records returned.

Re: Query question

2006-03-01 Thread James Holmes
Perhaps post an example of the SQL that doesn't work. On 3/2/06, Will Tomlinson [EMAIL PROTECTED] wrote: Using Access (not me, a client has to use it!)... I have a tblStates. I need a few different tables to be related to it. A local agency is in a state. A contributor is in a state, a state

Re: Query question

2006-03-01 Thread Will Tomlinson
Perhaps post an example of the SQL that doesn't work Thanks James. I have all my stuff closed down right now, hitting the bed. I did come up with an idea. Right now tblStates has a stateID for the PK. I always like using ID's for PK's. If I drop stateID and let stateAbbr be the PK, it gets

RE: quick mysql 4.0.17 query question...

2006-02-23 Thread Andy Matthews
[mailto:[EMAIL PROTECTED] Sent: Thursday, February 23, 2006 1:13 PM To: CF-Talk Subject: quick mysql 4.0.17 query question... I've got a table with an ENUM column that has 3 possible options. I want to return 4 random entries for each option. I know how to get N random records, but this requires

Re: quick mysql 4.0.17 query question...

2006-02-23 Thread Claude Schneegans
Is it possible to do this in one query and if so how might I do that? I would try a UNION between 3 SELECTs, one for each possible option. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam

RE: quick mysql 4.0.17 query question...

2006-02-23 Thread Andy Matthews
-Talk Subject: Re: quick mysql 4.0.17 query question... Is it possible to do this in one query and if so how might I do that? I would try a UNION between 3 SELECTs, one for each possible option. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com

RE: quick mysql 4.0.17 query question...

2006-02-23 Thread Bobby Hartsfield
the same thing ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, February 23, 2006 2:27 PM To: CF-Talk Subject: RE: quick mysql 4.0.17 query question... Ah...that might work, thank you

RE: Query Question

2006-01-04 Thread Russ
Isn't this equivalent to my query? -Original Message- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 5:11 PM To: CF-Talk Subject: Re: Query Question You almost had it: SELECT eventID, eventName, eventDate, FROM event a INNER JOIN eventDates b ON a.eventID

CF mySQL date search query question

2005-12-14 Thread Andy Matthews
I've got a form which submits 3 fields, year, month and day. In the db, I'm storing a standard date/time field (-mm-dd hh:mm:ss). The time portion of this is irrelevant for this form. What I'd like to accomplish is allowing the user to submit values for one or more of these fields and search

Re: CF mySQL date search query question

2005-12-14 Thread Ryan Guill
I have to say that its sort of funny that you surrounded your cf tags with [php] but i suppose you probably cross posted this to a forum. Either way, try something like this : cfif FORM.year IS NOT AND YEAR(n.due_datetime) = '#FORM.year#' /cfif cfif FORM.month IS NOT AND

RE: CF mySQL date search query question

2005-12-14 Thread Andy Matthews
x737 --//- -Original Message- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 8:54 AM To: CF-Talk Subject: Re: CF mySQL date search query question I have to say that its sort of funny that you surrounded your cf tags with [php] but i

RE: CF mySQL date search query question

2005-12-14 Thread Bobby Hartsfield
] Sent: Wednesday, December 14, 2005 10:00 AM To: CF-Talk Subject: RE: CF mySQL date search query question Thanks ryan...it was actually posted to Sitepoint. :P mySQL does have the year/month/day functions and that should work great, thanks! And yeah...it is stored as a date/time field

Query Question

2005-11-16 Thread Russ
I have 2 tables, for the sake of simplification lets say they look like this: EVENT eventID eventName EVENTDATES eventID eventDate Each event would be in the event table once, and possibly multiple times in the eventDates table. I want to have a query return one record for each

RE: Query Question

2005-11-16 Thread Adrian Lynch
I don't know about efficient, but try SELECT TOP 1 eventID That's if it's SQL Server, the over DBs will have something similar Ade -Original Message- From: Russ [mailto:[EMAIL PROTECTED] Sent: 16 November 2005 21:56 To: CF-Talk Subject: Query Question I have 2 tables

RE: Query Question

2005-11-16 Thread Russ
Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 5:03 PM To: CF-Talk Subject: RE: Query Question I don't know about efficient, but try SELECT TOP 1 eventID That's if it's SQL Server, the over DBs will have something similar Ade -Original

Re: Query Question

2005-11-16 Thread Ryan Guill
You almost had it: SELECT eventID, eventName, eventDate, FROM event a INNER JOIN eventDates b ON a.eventID = b.eventID AND eventDate #now()# actually just learned this yesterday ;) On 11/16/05, Russ [EMAIL PROTECTED] wrote: I have 2 tables, for the sake of simplification lets say they look

Re: Query Question

2005-11-16 Thread Ryan Guill
Oh yeah, if you want to limit it to one, you may want to do max(eventDate) #now()# or min(eventDate) #now()# On 11/16/05, Ryan Guill [EMAIL PROTECTED] wrote: You almost had it: SELECT eventID, eventName, eventDate, FROM event a INNER JOIN eventDates b ON a.eventID = b.eventID AND

Re: Query Question

2005-11-16 Thread Yisroel Spanier
checked the exact syntax. if it doesn't work, I'll look it up) - Original Message - From: Adrian Lynch [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, November 16, 2005 5:02 PM Subject: RE: Query Question I don't know about efficient, but try SELECT TOP 1 eventID

RE: Query Question

2005-11-16 Thread Katz, Dov B \(IT\)
: Query Question I have 2 tables, for the sake of simplification lets say they look like this: EVENT eventID eventName EVENTDATES eventID eventDate Each event would be in the event table once, and possibly multiple times in the eventDates table. I want to have a query return one

Solved: Query Question

2005-11-16 Thread Russ
PM To: CF-Talk Subject: RE: Query Question This will return only 1 event... I want all the events, but joined to only 1 record in the eventDates per event... So originally the query will return something like this EventID eventNameeventDate 1 my event 12/1/2005 1 my

RE: Query Question

2005-11-16 Thread Russ
, Dov B (IT) [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 5:32 PM To: CF-Talk Subject: RE: Query Question How about this? Select e.eventid, min(ed.eventdate) from events e inner join eventdates ed on ed.eventid=e.eventid Where ed.eventdate getdate() Group by eventid

Re: Query Question

2005-11-16 Thread Ryan Guill
thinking about this more, you could probably do it even easier like so: SELECT eventID, eventName, MIN(eventDate) FROM event a INNER JOIN eventDates b ON a.eventID = b.eventID WHERE eventDate #now()# GROUP BY eventID, eventName that should bring back one record for each id. The only catch on

query question

2005-09-29 Thread Mark Fuqua
Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank. Is that a possibility? Thanks, Mark

RE: query question

2005-09-29 Thread Adrian Lynch
Yup. Look at left and right outer joins. http://www.w3schools.com/sql/sql_join.asp What DB are you using? Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:45 To: CF-Talk Subject: query question Morning, When I use joins with a select

RE: query question

2005-09-29 Thread Mark Fuqua
question Yup. Look at left and right outer joins. http://www.w3schools.com/sql/sql_join.asp What DB are you using? Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:45 To: CF-Talk Subject: query question Morning, When I use joins with a select

RE: query question

2005-09-29 Thread Andy Matthews
, 2005 7:45 AM To: CF-Talk Subject: query question Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank

RE: query question

2005-09-29 Thread Andy Matthews
[mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 8:16 AM To: CF-Talk Subject: RE: query question This database is MS Access. I don't know if it supports right joins. Is the structure of the join the same, just exchange right for left? Mark -Original Message- From: Adrian Lynch

RE: query question

2005-09-29 Thread Mark Fuqua
: RE: query question This database is MS Access. I don't know if it supports right joins. Is the structure of the join the same, just exchange right for left? Mark -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 8:55 AM To: CF-Talk

Re: query question

2005-09-29 Thread Webmaster at FastTrack On Line
@houseoffusion.com Sent: Thursday, September 29, 2005 1:55 PM Subject: RE: query question Yup. Look at left and right outer joins. http://www.w3schools.com/sql/sql_join.asp What DB are you using? Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:45

RE: Quick Query Question...[hopefully]

2005-08-29 Thread Mark A Kruger
:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 8:04 AM To: CF-Talk Subject: RE: Quick Query Question...[hopefully] Huh? Ya got me with that one Mark. Care to explain in detail? Also, would it be easier to use CF to insert the missing hours of the day and values of zero (if yes, what would

RE: Quick Query Question...[hopefully]

2005-08-29 Thread Che Vilnonis
: Mark A Kruger [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 10:52 AM To: CF-Talk Subject: RE: Quick Query Question...[hopefully] This would give you all the hours with zeros where no hours existed. Purely theoretical and untested :) I'm sure Jochem will tell us if I'm right or give me

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Dave.Phillips
Che, You can use isnull() in SQL Server and nvl() in Oracle. I don't know which DB you're using. Dave -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Thursday, August 25, 2005 4:53 PM To: CF-Talk Subject: Quick Query Question...[hopefully] If have a query

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Che Vilnonis
Dave, below is my query...how would I make the query work with isnull() on SQL Server 2000? Thanks, Che. SELECT Datepart(hh,OrderDate) AS Hour, Count(OrderDate) AS TotalOrdersPerHour FROMOrders WHERE Status = 'SHIPPED' AND (OrderDate BETWEEN '8/1/2005' AND '8/31/2005 23:59:59') GROUP BY

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Mark A Kruger
to 23 and tease out the values rather than try to insert placeholders into the data. -Mark -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 7:39 AM To: CF-Talk Subject: RE: Quick Query Question...[hopefully] Dave, below is my query...how

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Che Vilnonis
Mark, that's what I thought. I tried to find a simple solution using the db, but I don't think it's going to work very well. Thanks, Che. -Original Message- From: Mark A Kruger [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 8:47 AM To: CF-Talk Subject: RE: Quick Query Question

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Mark A Kruger
Che, try this, create a table 1 row and the numbers 0 through 23 in them, then do a left join to your group by query :) -Mark -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 7:50 AM To: CF-Talk Subject: RE: Quick Query Question...[hopefully

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Dave.Phillips
, 2005 9:04 AM To: CF-Talk Subject: RE: Quick Query Question...[hopefully] Huh? Ya got me with that one Mark. Care to explain in detail? Also, would it be easier to use CF to insert the missing hours of the day and values of zero (if yes, what would be the easist)? I hate to use CF when I might

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Che Vilnonis
Yeah... I could use the help. I have an idea... but its probably NOT the best or most efficient way to do it in CF. Enlighten me, por favor! ~Che -Original Message- Che, I agree with Mark. Anything you do in the DB is going to be more complex than in CF in this particular case. I'd just

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Che Vilnonis
Huh? Ya got me with that one Mark. Care to explain in detail? Also, would it be easier to use CF to insert the missing hours of the day and values of zero (if yes, what would be the easist)? I hate to use CF when I might be able to use the db... but were only talking about 24 rows of data. ~Che

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Dave.Phillips
[hit]#/cfoutputCFELSE0/CFIF/td /tr /CFLOOP /table -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 9:16 AM To: CF-Talk Subject: RE: Quick Query Question...[hopefully] Yeah... I could use the help. I have an idea

RE: Quick Query Question...[hopefully]

2005-08-26 Thread Che Vilnonis
works well. thanks so much. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 10:07 AM To: CF-Talk Subject: RE: Quick Query Question...[hopefully] There's probably a number of ways to do it. Mine may or may not be the most efficient

Re: Quick Query Question...[hopefully]

2005-08-26 Thread Greg Morphis
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 10:07 AM To: CF-Talk Subject: RE: Quick Query Question...[hopefully] There's probably a number of ways to do it. Mine may or may not be the most efficient, but it gets the job done. . do your query

Quick Query Question...[hopefully]

2005-08-25 Thread Che Vilnonis
If have a query that returns a 24 hour breakdown of orders by the hour on a monthly basis. (see below). As you can see, Hour 5 6 are missing because there are no values to return. What would be the easiest way to add Hour 5 and Hour 6 to the query's recordset with a corresponding value of zero

  1   2   3   4   >