Is RegID your primary key? Are you trying to compare multiple records
based on matching RegID? If so, you may want to try something like this.


SELECT PlatMemNew.*, PlatMemNew.LastName AS NewLastName, PlatMemOld.*,
PlatMemOld.LastName AS OldLastName
FROM PlatMemNew, PlatMemOld
WHERE PlatMemNew.LastName <> PlatMemOld.LastName 
AND PlatMemOld.RegId = PlatMemNew.RegId;

You can use the AS statement so you can give the fields different names
so its easier to address them in your query output. 
Hope this helps.


-----Original Message-----
From: John Eubanks [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 18, 2007 8:13 AM
To: CF-Newbie
Subject: Re: Query Question

Ben,

The database at the moment is a simple Access db.  If you can think of
any ideas, please feel free to reach me at:  [EMAIL PROTECTED]

John
>You may need to do some grouping on it - not sure - perhaps quotes?
>
>WHERE (PlatMemNew.LastName <> PlatMemOld.LastName) AND PlatMemOld.RegId

>= 1
>
>I guess it depends on what you are trying to get
>- Nick
>
>-----Original Message-----
>From: Ben Nadel [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, January 17, 2007 5:23 PM
>To: CF-Newbie
>Subject: RE: Query Question
>
>
>Out of curiosity, what kind of Database are you using?
>
>
>......................
>Ben Nadel
>Certified Advanced ColdFusion MX7 Developer www.bennadel.com
>
>Need ColdFusion Help?
>www.bennadel.com/ask-ben/
>
>-----Original Message-----
>From: John Eubanks [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, January 17, 2007 4:29 PM
>To: CF-Newbie
>Subject: Query Question
>
>Hey everyone.  I have a really good question and I could use some 
>direction on it.  I am using the following piece of code to query and 
>dump a result set from two tables with the same field names but with 
>different data (mostly).  However, I am wanting to perform a not equals

>on it, because I am doing a visual comparison for my boss.  Any
>thoughts:
>
><cfquery name="PlatIII" datasource="Platinum"> SELECT
>PlatMemNew.*,PlatMemOld.* FROM PlatMemNew,PlatMemOld WHERE 
>PlatMemNew.LastName <> PlatMemOld.LastName AND PlatMemOld.RegId = '1'
></cfquery>
><cfdump var="#PlatIII#">



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2438
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to