Re: query of a query?

2006-05-05 Thread Bing Du
Not necessarily. I would think the CREATE SELECT statement would be the closest equivalent. http://dev.mysql.com/doc/refman/4.1/en/create-table.html Thanks much for the reply, John. That surely would help with our future applications. But this time, we only have read access to the

query of a query?

2006-05-04 Thread Bing Du
# SELECT db_entry_num, title FROM account_info /CFQUERY CFQUERY name=getprojectID datasource=#GSN# SELECT projectID FROM ResearchProjects WHERE IDNo = #url.IDNo# /cfquery cfif getprojectID.recordcount GT 0 !--- Query

Re: query of a query?

2006-05-04 Thread John Hicks
account_info /CFQUERY CFQUERY name=getprojectID datasource=#GSN# SELECT projectID FROM ResearchProjects WHERE IDNo = #url.IDNo# /cfquery cfif getprojectID.recordcount GT 0 !--- Query of a query --- cfquery dbtype=query name=getstudproj

Re: complicated query | no Sub query

2005-05-24 Thread Anoop kumar V
is that it only returns the record related to the second largest date for each id_secr_rqst. any suggestions how to get both the second and the largest date records in the same query? Thanks, Anoop On 5/23/05, Peter Normann [EMAIL PROTECTED] wrote: Anoop kumar V mailto:[EMAIL PROTECTED] wrote

Re: complicated query | no Sub query

2005-05-24 Thread SGreen
.dt_aud_rec t2.dt_aud_rec group by t1.id_secr_rqst but the problem is that it only returns the record related to the second largest date for each id_secr_rqst. any suggestions how to get both the second and the largest date records in the same query? Thanks, Anoop On 5/23/05

Re: complicated query | no Sub query

2005-05-24 Thread Anoop kumar V
records in the same query? Thanks, Anoop On 5/23/05, Peter Normann [EMAIL PROTECTED] wrote: Anoop kumar V mailto:[EMAIL PROTECTED] wrote: well - actually it might not be the last 2 days - i just want 2 of the latest records for every task regardless of what date

complicated query | no Sub query

2005-05-23 Thread Anoop kumar V
hi All, I need to create a query using no subqueries as I use 4.0.23 which does not support subqueries. I cannot upgrade for some compellimg reasons (the product does not support anything later than 4.0.23nt as of now). I also cannot use any thing that is native to mysql - in the sense

RE: complicated query | no Sub query

2005-05-23 Thread Peter Normann
Hi Anoop Try: SELECT t1.id_secr_rqst, t2.name_rec_type, t1.dt_aud_rec FROM isr2_aud_log t1, isr2_aud_log t2 WHERE t1.id_secr_rqst = t2.id_secr_rqst AND t1.name_rec_type='Exception Resource' ORDER by t1.dt_aud_rec DESC LIMIT 2; Peter Normann -- MySQL General Mailing List For list archives:

Re: complicated query | no Sub query

2005-05-23 Thread Anoop kumar V
Thanks Peter - but I see two issues: 1. It returns data about only one id_secr_rqst - I want it to return data about every id_secr_rqst in the table. 2. Limit IMO is mysql specific (I hope I am wrong) is there something generic so I dont need to bother about which database I am running it

RE: complicated query | no Sub query

2005-05-23 Thread Peter Normann
Anoop kumar V mailto:[EMAIL PROTECTED] wrote: 1. It returns data about only one id_secr_rqst - I want it to return data about every id_secr_rqst in the table. So, if I understand you correctly (sorry, having a bad day), you want all records for the past two days? Assuming this, you could use

RE: complicated query | no Sub query

2005-05-23 Thread Peter Normann
Anoop kumar V mailto:[EMAIL PROTECTED] wrote: well - actually it might not be the last 2 days - i just want 2 of the latest records for every task regardless of what date it is in the table. Okay, now I think I understand what you need - and if I am correct, this looks like one of the more

Newbie question: Create table from query or export query

2002-04-15 Thread Renger van Nieuwkoop
Hi Is it possible to create a new table from the results of a query, or export the result directly to a file (txt, csv, excel or alike) using MySQL? How is it done? Thanks Renger _ ECOPLAN Forschung und Beratung in Wirtschaft und Politik

Re: Newbie question: Create table from query or export query

2002-04-15 Thread Craig Ostrander
existingtablename; There are many variations on these themes, but this should get you pointed in the right direction. Hope it helps. Craig Ostrander At 06:38 AM 4/15/2002, you wrote: Hi Is it possible to create a new table from the results of a query, or export the result directly to a file (txt, csv