How to write this MySQL query...

2011-08-12 Thread Rick Faircloth
Hi, guys... I've been writing, research, and re-writing a query over and over trying to get the correct (ie, trustworthy) results, but can't make it work. How would I write a query that would: - find all propertyID's from a table that had duplicate photo200 field values I've tried every

Re: How to write this MySQL query...

2011-08-12 Thread Andrew Scott
Doesn't the count have to be count(*) but otherwise it looks fine to me. On Sat, Aug 13, 2011 at 3:44 AM, Rick Faircloth r...@whitestonemedia.comwrote: Hi, guys... I've been writing, research, and re-writing a query over and over trying to get the correct (ie, trustworthy) results, but

Re: How to write this MySQL query...

2011-08-12 Thread Bryan Stevenson
I'd think grouping by propertyID as well would be a good startotherwise you're just getting ALL duplicate photo200 values across ALL properties. What is wrong with your results? that may help us help you Rick ;-) A brute force way is to: select propertyID, count(photo200) as NumPhoto200

Re: How to write this MySQL query...

2011-08-12 Thread Leigh
- find all propertyID's from a table that had duplicate photo200 field values If you mean _different_ propertyID's sharing the same photo200 value, you would need to count by the photo200 column instead. Then match it with the propertyID. One option is using a join. Another would be a

RE: How to write this MySQL query...

2011-08-12 Thread Rick Faircloth
Thanks, guys... I decided to try Leigh's suggestion first, and it worked. Thanks for the suggestions, everyone! Rick :o) -Original Message- From: Leigh [mailto:cfsearch...@yahoo.com] Sent: Friday, August 12, 2011 2:02 PM To: cf-talk Subject: Re: How to write this MySQL query

RE: How to write this MySQL query...

2011-08-12 Thread Leigh
Rick - If you do not need the TimesUsed count, you might also try the WHERE EXISTS approach to compare performance. -Leigh ~| Order the Adobe Coldfusion Anthology now!

RE: How to write this MySQL query...

2011-08-12 Thread Rick Faircloth
and show them why photos were appearing with the wrong properties. Thanks for your help! Rick -Original Message- From: Leigh [mailto:cfsearch...@yahoo.com] Sent: Friday, August 12, 2011 4:05 PM To: cf-talk Subject: RE: How to write this MySQL query... Rick - If you do not need the TimesUsed

RE: How to write this MySQL query...

2011-08-12 Thread Leigh
Ah. Ad-hoc. Gotcha. (Can you tell I have been tuning monster sql queries all day? Here is to a sql free weekend! ;-) -Leigh ~| Order the Adobe Coldfusion Anthology now!

Help with MySQL Query

2007-10-20 Thread Peter Tanswell
Hi there I have a query that I have created - it works against a MS-Access database but does not work with MySQL. I have searched through the MySQL notes that I have but cant find out why - I think its because of the AS MatTotal section of the query. Thanks in advance for feedback SELECT

mysql query

2007-10-20 Thread Toby King
Hi there I have a query that I have created - it works against a MS-Access database but does not work with MySQL. I have searched through the MySQL notes that I have but cant find out why - I think its because of the AS MatTotal section of the query. Thanks in advance for feedback SELECT

Re: Help with MySQL Query

2007-10-20 Thread Jochem van Dieten
Peter Tanswell wrote: I have a query that I have created - it works against a MS-Access database but does not work with MySQL. I have searched through the MySQL notes that I have but cant find out why - I think its because of the AS MatTotal section of the query. You can not use a column

Re: Help with MySQL Query

2007-10-20 Thread Will Tomlinson
Hi there I have a query that I have created - it works against a MS-Access database but does not work with MySQL. I have searched through the MySQL notes that I have but cant find out why - I think its because of the AS MatTotal section of the query. What do you mean by does not work with mySQL

Re: Help with MySQL Query

2007-10-20 Thread Jon Clausen
Peter, The reason it's not working is not because of the alias, but because you are trying to use the alias in the SELECT clause. MySQL only allows you to reference aliases in the GROUP BY, ORDER BY, or HAVING clauses. (http://dev.mysql.com/doc/refman/5.0/en/problems-with- alias.html)

Re: mysql query

2007-10-20 Thread Brian Kotek
Well unless there is more to the where clause that you didn't paste, all those extra parentheses are going to cause an error, in addition to the fact that you're not joining any of the other tables. On 10/20/07, Toby King [EMAIL PROTECTED] wrote: Hi there I have a query that I have created -

Re: Help with MySQL Query

2007-10-20 Thread Janet MacKay
You can not use a column alias you define in the select list as a base column to some other calculated column in that same select list, i.e.: True. SELECT A + B AS C, C / D AS E I have to say I'm surprised Access actually _does_ allow you to do that. I'd never tried it before now

Re: mysql query

2007-10-20 Thread Peter Tanswell
ah yes there were a few extra lines AND (visaudactweight.AuditorID = AuditorNames.AuditorID)) AND (visaudactweight.CompanyID = CompanyNames.CompanyID)) AND (visaudactweight.GKprRecID = GateKeeperRecs.GKprRecID)) AND (GateKeeperRecs.GKeeperID = GKeeperNames.GKeeperID)) but its the AS

Re: Very slow JDBC/mySQL query - what's responsible?

2007-07-16 Thread Dinner
I like to sit back, and wonder: how many apps are out there, running about 20-80% slower than they should be... =] On 7/14/07, Hansjoerg [EMAIL PROTECTED] wrote: Hello! Incredible - going back to this old version resolved the performance issue ... very, very strange ;-) Best regards,

Very slow JDBC/mySQL query - what's responsible?

2007-07-14 Thread peter mayer
Hello! I have got two simple SQL statements in my CFMX - application: SELECT companyname, uidnumber, description, telephone FROM companies WHERE entrykey = ? ; Query Parameter Value(s) - Parameter #1(cf_sql_varchar) = 2405961E-FE08-E3BE-059C648DC01198A9 SELECT LEFT(companyname, 250) AS

Re: Very slow JDBC/mySQL query - what's responsible?

2007-07-14 Thread Dinner
On 7/14/07, peter mayer wrote: Hello! I have got two simple SQL statements in my CFMX - application: I'm going to take a wild stab and say it's the version of the mysql driver. Try using mysql-connector-java-3.0.17-ga instead. Or perhaps whatever driver cf8 ships with... I don't think I saw

Re: Very slow JDBC/mySQL query - what's responsible?

2007-07-14 Thread Hansjoerg
Hello! Incredible - going back to this old version resolved the performance issue ... very, very strange ;-) Best regards, Hansjoerg I have got two simple SQL statements in my CFMX - application: I'm going to take a wild stab and say it's the version of the mysql driver. Try using

MySQL query help

2006-06-03 Thread Jim McAtee
Using MySQL 5.0.21, I have two tables: contributors - contributor_id name namesort contributor_sort - name namesort I'd like to update the namesort column in contributors by using the values in the namesort column in contributor_sort wherever name = name. I

Re: MySQL query help

2006-06-03 Thread Greg Morphis
off the top of my head, may have errors.. update contributors c set c.namesort = ( select cs.namesort from contributor_sort cs where c.name = cs.name) On 6/3/06, Jim McAtee [EMAIL PROTECTED] wrote: Using MySQL 5.0.21, I have two tables: contributors - contributor_id name

Re: MySQL query help

2006-06-03 Thread Jim Wright
I believe it would be... UPDATE contributors,contributor_sort SET contributors.namesort=contributor_sort.namesort WHERE contributors.name=contributor_sort.name -- Jim Wright Wright Business Solutions [EMAIL PROTECTED] 919-417-2257

Slightly OT: mySQL query (view) syntax

2006-03-28 Thread Les Mizzell
Using a view in mySQL, From the current query: SELECT blah, blah... from (`idc`.`locations` join `idc`.`personnel` on((`idc`.`personnel`.`county_id` = `idc`.`locations`.`locID`))) `idc`.`personnel`.`county_id` is a LIST So I need to add a WHERE statement to the above like: WHERE

Re: Slightly OT: mySQL query (view) syntax

2006-03-28 Thread Thomas Chiverton
On Tuesday 28 March 2006 17:15, Les Mizzell wrote: `idc`.`personnel`.`county_id` is a LIST So I need to add a WHERE statement to the above like: WHERE `idc`.`locations`.`locID` IN `idc`.`personnel`.`county_id` `idc`.`locations`.`locID` IN (`idc`.`personnel`.`county_id`) ? TBH 'in' is

Returning a binary char type from a mySQL query using ColdFusion

2006-01-23 Thread Andy Matthews
This is a really odd occurrence and I wonder if anyone has run into themselves, or more importantly knows how to get around it. I'm using ColdFusion 6.1 with mySQL 4.0. Here's my data structure: eq_year - smallint(4) mfr_name - varchar(60) eq_model - varchar(12) and the query: SELECT CONCAT(' ',

Re: CFMX + MySQL Query Problem

2004-12-16 Thread Jamie Price
Any ideas guys? ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187958 Archives:

Re: CFMX + MySQL Query Problem

2004-12-16 Thread dave
[quote]Any ideas guys?[/quote] yeah he's what u do * sorry this post has been censored ;) -- Original Message -- From: Jamie Price [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Thu, 16 Dec 2004 18:06:21 -0400 Any ideas guys?

Re: CFMX + MySQL Query Problem

2004-12-15 Thread Marco Antonio C. Santos
GROUP_CONCAT works only for 4.1+ MySQL versions... http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html Cheers Marco On Tue, 14 Dec 2004 22:25:14 -0400, Jamie Price [EMAIL PROTECTED] wrote: Jamie Price wrote: SELECT o.UserID, GROUP_CONCAT(o.CardID) FROM mycards t INNER JOIN

Re: CFMX + MySQL Query Problem

2004-12-15 Thread Jamie Price
Simon - Here's the dumps - the GetMatches dump has never returned results for me (though it seems like it is doing something since it's outputting results) GetWantedCards Query - query CARDID USERID 1 41001101 7 2 41001102 7 3 41001151 7 4 41001152 7 5 41001153 7 GetMatches Query -

Re: CFMX + MySQL Query Problem

2004-12-15 Thread Marco Antonio C. Santos
OK Jamie you could migrate to PostgreSQL? Do that... Cheers Marco On Wed, 15 Dec 2004 09:46:18 -0400, Jamie Price [EMAIL PROTECTED] wrote: Simon - Here's the dumps - the GetMatches dump has never returned results for me (though it seems like it is doing something since it's outputting

Re: CFMX + MySQL Query Problem

2004-12-15 Thread Jochem van Dieten
Jamie Price wrote: SELECT o.UserID, GROUP_CONCAT(o.CardID) FROM mycards t INNER JOIN mycards o ON t.cardid = o.cardid WHEREt.trade = 1 AND o.own = 1 AND t.UserID = cfqueryparam value=#cUserID# cfsqltype=cf_sql_integer GROUP BY o.UserID I

Re: CFMX + MySQL Query Problem

2004-12-15 Thread Simon Smith
Hi jamie ... took a look I know its a bit of a fudge but as SQL's letting you down cant you wrap the bit that outputs the results in a cfif like this ? cfif qGetMatches.rowcont NEQ 0 tr .. /tr /cfif Not ideal I know Simon - Here's the dumps - the GetMatches dump has never

Re: CFMX + MySQL Query Problem

2004-12-15 Thread Jamie Price
Jochem - that code worked (with some minor adjustment)! Thanks! Now, to up the level of complexity a bit. currently it outputs like so: userid1 cardid1 cardid2 . . . userid2 cardid1 cardid2 In other words it lists the other users with matching cards and then below each user it lists the

Re: CFMX + MySQL Query Problem

2004-12-15 Thread Simon Smith
although its a little 'windy' can you cfdump the qGetWantedCards query and post it ? also the first and the last 'qGetMatches' cfdumped would be helpful too Cheers Simon GROUP_CONCAT works only for 4.1+ MySQL versions... http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html Cheers

Re: CFMX + MySQL Query Problem

2004-12-14 Thread Jamie Price
Jamie Price wrote: SELECT o.UserID, GROUP_CONCAT(o.CardID) FROM mycards t INNER JOIN mycards o ON t.cardid = o.cardid WHEREt.trade = 1 AND o.own = 1 AND t.UserID = cfqueryparam value=#cUserID# cfsqltype=cf_sql_integer GROUP BY o.UserID Jochem

Re: CFMX + MySQL Query Problem

2004-12-12 Thread Marco Antonio C. Santos
Jamie what you need? Cheers Marco On Sat, 11 Dec 2004 21:25:39 -0400, Jamie Price [EMAIL PROTECTED] wrote: I know that this sounds like a pretty wild problem, but I would REALLY appreciate any help you guys could give - I've been putting my head through a wall for about two weeks trying

Re: CFMX + MySQL Query Problem

2004-12-12 Thread Jochem van Dieten
Jamie Price wrote: ...which is close, but no cigar. I need to get rid of those 'blank' entries, plus I need to arrange it so what's left comes out like this: Quote: UserID: 3 Owns Cards: 41001152 UserID: 8 Owns Cards: 41001151 UserID: 9 Owns Cards: 41001151 UserID: 13

Re: CFMX + MySQL Query Problem

2004-12-11 Thread Jamie Price
I know that this sounds like a pretty wild problem, but I would REALLY appreciate any help you guys could give - I've been putting my head through a wall for about two weeks trying to get this function right. If you need clarification on anything, just let me know. Thanks!

CFMX + MySQL Query Problem

2004-12-10 Thread Jamie Price
I'm working on a trading card site for an online card game. One of the key functions of the site will be that a user can login and click on match and the database will return a 'matching' trader - one that has all the cards the user needs. I've setup a test version that counts on the user with

MySQL query question

2004-12-07 Thread Todd
In one table I have an ID as the primary key. In a second table, I have a string that is made out of that ID. I'm trying to match the two. The string looks like this: /folder1/folder2/some_other_stuff_that_changes/123.txt where 123 is the ID from the first table. How can I match the two

RE: MySQL query question

2004-12-07 Thread Eric Creese
PROTECTED] Sent: Tuesday, December 07, 2004 8:47 AM To: CF-Talk Subject: MySQL query question In one table I have an ID as the primary key. In a second table, I have a string that is made out of that ID. I'm trying to match the two. The string looks like this: /folder1/folder2

Re: MySQL query question

2004-12-07 Thread Todd
Creese [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:08 AM Subject: RE: MySQL query question why would you not store the id in the second table as a FK to the PK in table one. I think that is just good table design and will easily accomplish what you

RE: MySQL query question

2004-12-07 Thread Paul
] Sent: Tuesday, December 07, 2004 8:23 AM To: CF-Talk Subject: Re: MySQL query question A couple of reasons. 1. This wasn't thought about ahead of time and there is several months worth of data in the table already. 2. I have no control over the database. This makes for a bad combination :) So

RE: MySQL query question

2004-12-07 Thread Eric Creese
/',''),'.gif','') = 123 -Original Message- From: Todd [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 9:23 AM To: CF-Talk Subject: Re: MySQL query question A couple of reasons. 1. This wasn't thought about ahead of time and there is several months worth of data

Re: MySQL query question

2004-12-07 Thread Jochem van Dieten
Todd wrote: In one table I have an ID as the primary key. In a second table, I have a string that is made out of that ID. I'm trying to match the two. The string looks like this: /folder1/folder2/some_other_stuff_that_changes/123.txt where 123 is the ID from the first table. How can I

Re: MySQL query question

2004-12-07 Thread Todd
Subject: RE: MySQL query question I agree with Eric in the suggestion to normalize your structure (a single script/update statement could take care of updating your several months of records and make your life simpler in the future...) But, since I've worked in similar situations with databases

Re: MySQL query question

2004-12-07 Thread Todd
That's what I was after. Thanks! Oh, and I am definately going to suggest they make a FK with that ID in there. - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:37 AM Subject: Re: MySQL query question

Re: MySQL query help

2004-08-07 Thread Jochem van Dieten
Marco Antonio C. Santos wrote: How can I do MySQL works fine with this simple query: SELECT DISTINCT User_ID,(SELECT Count(User_ID) FROM users p1 WHERE p1.User_ID = users.User_ID) AS CountID FROM users SELECT User_ID, count(User_ID) FROM users GROUP BY User_ID Jochem [Todays Threads]

MySQL query help

2004-08-06 Thread Marco Antonio C. Santos
How can I do MySQL works fine with this simple query: SELECT DISTINCT User_ID,(SELECT Count(User_ID) FROM users p1 WHERE p1.User_ID = users.User_ID) AS CountID FROM users MySQL don't have subselect capabilities, so We're using 4.0.12 version in Win2K3 server... Thanx [Todays Threads]

mysql query help

2004-06-16 Thread Hagan, Ryan Mr (Contractor ACI)
Good morning, I'm having a devil of a time with a mysql (v3.23) query and was hoping someone here could give me a hand. I have a fantasy football project I'm working on and I allow registered users to pick a lineup every week and then I score them at the end of the week depending on how well

Re: mysql query help

2004-06-16 Thread Rick Root
You know, I've crafted two responses to this already (this is the third) and both ended up being wrong after I thought about it for a while. Someone else may be able to post the right solution, but in the interim, you could CFQUERY NAME=getrelevantrows SELECT user, max(lineupid) as maxlineupid

RE: mysql query help - SOLVED

2004-06-16 Thread Hagan, Ryan Mr (Contractor ACI)
, June 16, 2004 8:16 AM To: CF-Talk Subject: Re: mysql query help You know, I've crafted two responses to this already (this is the third) and both ended up being wrong after I thought about it for a while. Someone else may be able to post the right solution, but in the interim, you could

Re: MySQL query

2004-01-22 Thread Yves Arsenault
Thanks to all those who answered Even after changing the the day() to dayofmonth(), the queries would still not pull out the request information... After a little reflection, I noticed that something had changed this DB was originally an Access DB, and it was converted to MySQL, in the

MySQL query

2004-01-21 Thread Yves Arsenault
Hello, I just wanted to check... Is this a valid query in MySQL 3.xx ? cfquery name=There datasource=ipe SELECT * FROM events WHERE day(theDate) = '#dayVal#' and month(theDate) = '#querymonth#' and year(theDate) = '#session.year#' /cfquery A client is using a calendar app on a site he is

Re: MySQL query

2004-01-21 Thread Jochem van Dieten
Yves Arsenault wrote: Is this a valid query in MySQL 3.xx ? No. http://www.mysql.com/doc/en/Date_and_time_functions.html says rather explicitly that Day() was added in 4.1.1 Use Extract(). Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This

RE: MySQL query

2004-01-21 Thread Ben Forta
The *right* way to do this is to use DATEDIFF(), but alas that too was added in 4.1.1. --- Ben -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 21, 2004 9:54 AM To: CF-Talk Subject: Re: MySQL query Yves Arsenault wrote: Is this a valid

RE: MySQL query

2004-01-21 Thread C. Hatton Humphrey
Is this a valid query in MySQL 3.xx ? cfquery name=There datasource=ipe SELECT * FROM events WHERE day(theDate) = '#dayVal#' and month(theDate) = '#querymonth#' and year(theDate) = '#session.year#' /cfquery Day() can not be used in MySQL WHERE clause Use To_Days() to convert both

Re: MySQL query

2004-01-21 Thread Stephen Moretti
Yves, You need to use DayofMonth() instead of Day() - Day() is available in 4.11 and is a synonym of DayofMonth() I'm sure that mySQL will ignore the single quotes around dayVal, querymonth and session.year, but the functions that you are comparing against do generate numeric values, so you

Re: MySQL query

2004-01-21 Thread Jochem van Dieten
Ben Forta wrote: The *right* way to do this is to use DATEDIFF(), but alas that too was added in 4.1.1. The SQL standard does not know DateDiff(). The SQL standard does know Extract(). So I disagree with your right way. Jochem -- I don't get it immigrants don't work and steal our jobs -

Re: MySQL query

2004-01-21 Thread Stephen Moretti
And I disagree with both of you as it is a straight forward date comparison! Of course all you're doing is comparing two dates, so you can do the following instead: Depending on whether you are using an ODBC connector or not : WHERE theDate = #CreateODBCDate(CreateDate(session.year,

Re: MySQL query

2004-01-21 Thread Jochem van Dieten
Stephen Moretti wrote: And I disagree with both of you as it is a straight forward date comparison! Of course all you're doing is comparing two dates, so you can do the following instead: Depending on whether you are using an ODBC connector or not : WHERE theDate =

CFMX/mySQL Query Problem

2003-02-11 Thread Paul Giesenhagen
I have a query that is giving a generic error and I cannot see what hte problem is ... below you will see the insert statement and the generic error.This is running on mySQL 3.2x and Windows XP, the #variables.urlRoot# is http://localhost/cfquery datasource=#form.dsn# name=step1

RE: CFMX/mySQL Query Problem

2003-02-11 Thread Dave Wilson
Paul, At first glance I think you've omitted single quotes around the largetext value i.e. the first NULL in your values list below should be 'NULL' Dave -Original Message- From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] Sent: 11 February 2003 15:12 To: CF-Talk Subject: CFMX/mySQL

Re: CFMX/mySQL Query Problem

2003-02-11 Thread Paul Giesenhagen
type requested Any help would be greatly appreciated! Paul Giesenhagen QuillDesign - Original Message - From: Paul Giesenhagen [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, February 11, 2003 9:11 AM Subject: CFMX/mySQL Query Problem I have a query that is giving

Re: CFMX/mySQL Query Problem

2003-02-11 Thread Paul Giesenhagen
But that would make NULL a string instead of a NULL value ... Paul Giesenhagen QuillDesign - Original Message - From: Dave Wilson [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, February 11, 2003 9:13 AM Subject: RE: CFMX/mySQL Query Problem Paul, At first glance I

RE: CFMX/mySQL Query Problem

2003-02-11 Thread Matt Robertson
, 2003 7:19 AM To: CF-Talk Subject: Re: CFMX/mySQL Query Problem Lets try that one again! (copy and paste just didn't cut it) I have a query that is giving a generic error and I cannot see what hte problem is ... below you will see the insert statement and the generic error. This is running

Re: CFMX/mySQL Query Problem

2003-02-11 Thread Stephen Moretti
', '#variables.urlRoot#', NULL, NULL, NULL, NULL, '#form.adminUser#') /cfquery ie. without the cfqueryparam. Regards Stephen - Original Message - From: Paul Giesenhagen [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, February 11, 2003 3:18 PM Subject: Re: CFMX/mySQL Query Problem Lets

Re: CFMX/mySQL Query Problem

2003-02-11 Thread stas
If the columns allow NULL values, could you not just omit them? - Original Message - From: Paul Giesenhagen [EMAIL PROTECTED] What the insert looks like: values('36','urlRoot',' (param 1) ',NULL,NULL,NULL,NULL,'admin') are the values being put into the database.

Re: CFMX/mySQL Query Problem

2003-02-11 Thread Paul Giesenhagen
PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, February 11, 2003 9:35 AM Subject: Re: CFMX/mySQL Query Problem Its daft and people will shout at me, but try this instead : cfquery datasource=#form.dsn# name=step1 username=#form.dbUserName# password=#form.dbPassword# insert

Re: CFMX/mySQL Query Problem

2003-02-11 Thread Jochem van Dieten
Paul Giesenhagen wrote: cfquery datasource=#form.dsn# name=step1 username=#form.dbUserName# password=#form.dbPassword#insert into settings(id,datatype,smalltext,largetext,numberdata,datedata,edit_date,admin _user) values('36','urlRoot','cfqueryparam value=#variables.urlRoot#

RE: CFMX/mySQL Query Problem

2003-02-11 Thread Dave Wilson
:[EMAIL PROTECTED]] Sent: 11 February 2003 15:21 To: CF-Talk Subject: Re: CFMX/mySQL Query Problem But that would make NULL a string instead of a NULL value ... Paul Giesenhagen QuillDesign - Original Message - From: Dave Wilson [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent

Re: CFMX/mySQL Query Problem

2003-02-11 Thread Paul Giesenhagen
Subject: RE: CFMX/mySQL Query Problem Yes sorry my bad, however the error message is pointing out a problem with datatypes. How about id field? is that a string or a value? because you're trying to insert it as a string although it looks like it should be a value to me. Dave -Original

Re: How to change this query from MS Access to MySQL Query

2002-12-12 Thread Stephen Moretti
Rick, Instead of this: CFQUERY Name=GetProperty Datasource=#DSN# Select * from Properties where PropertyID in (Select PropertyID from Rentals where Rentals.ClientID in (Select ClientID from Clients where Clients.ClientID =

RE: How to change this query from MS Access to MySQL Query

2002-12-12 Thread Rick Faircloth
MS Access to MySQL Query Rick, Instead of this: CFQUERY Name=GetProperty Datasource=#DSN# Select * from Properties where PropertyID in (Select PropertyID from Rentals where Rentals.ClientID in (Select ClientID from Clients where Clients.ClientID

How to change this query from MS Access to MySQL Query

2002-12-11 Thread Rick Faircloth
Hi, all. This query worked with MS Access, but not with MySQL... How should I change this to make it work? Is it a subquery problem? This is MySQL version 4.0.5 beta... CFQUERY Name=GetUnit Datasource=#DSN# Select * from Units U where U.UnitID in (Select UnitID from Clients

Re: How to change this query from MS Access to MySQL Query

2002-12-11 Thread Jochem van Dieten
Rick Faircloth wrote: How should I change this to make it work? Is it a subquery problem? This is MySQL version 4.0.5 beta... CFQUERY Name=GetUnit Datasource=#DSN# Select * from Units U where U.UnitID in (Select UnitID from Clients where Clients.ClientID

Re: How to change this query from MS Access to MySQL Query

2002-12-11 Thread Stephen Moretti
This query worked with MS Access, but not with MySQL... How should I change this to make it work? Is it a subquery problem? This is MySQL version 4.0.5 beta... In mySQL you need to use Joins. CFQUERY Name=GetUnit Datasource=#DSN# Select * FROM Units LEFT JOIN Clients

RE: How to change this query from MS Access to MySQL Query

2002-12-11 Thread Rick Faircloth
in MySQL currently, but will be in 4.1... :o( I'll work on the joins...thanks... Rick -Original Message- From: Stephen Moretti [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:00 PM To: CF-Talk Subject: Re: How to change this query from MS Access to MySQL Query This query

RE: How to change this query from MS Access to MySQL Query

2002-12-11 Thread Rick Faircloth
PROTECTED]] Sent: Wednesday, December 11, 2002 1:00 PM To: CF-Talk Subject: Re: How to change this query from MS Access to MySQL Query This query worked with MS Access, but not with MySQL... How should I change this to make it work? Is it a subquery problem? This is MySQL version 4.0.5 beta

Re: How to change this query from MS Access to MySQL Query

2002-12-11 Thread Cary Gordon
SELECT u.* FROMUnits u, Clients c WHERE c.UnitID = u.UnitID AND c.ClientID = #App_ClientID# At 11:49 AM 12/11/2002 -0500, you wrote: Hi, all. This query worked with MS Access, but not with MySQL... How should I change this to make it work? Is it a subquery problem? This is

RE: How to change this query from MS Access to MySQL Query

2002-12-11 Thread Rick Faircloth
Clients where Clients.ClientID = #App_ClientID#)) /CFQUERY Rick -Original Message- From: Cary Gordon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:22 PM To: CF-Talk Subject: Re: How to change this query from MS Access to MySQL Query SELECT u.* FROM

RE: How to change this query from MS Access to MySQL Query

2002-12-11 Thread Rick Faircloth
-Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:47 PM To: CF-Talk Subject: RE: How to change this query from MS Access to MySQL Query Thanks, Gordon...works good. How would I change this one to make it mySQL compatible? CFQUERY Name