That is what I was thinking, however this query: (members being the old
table, tmpMembers being the new table...members.memNumber is a number
field, tmpMembers,memNumber is a text field)

<Cfquery name="deleteOld" datasource="#existingDSN#">
        SELECT * FROM members
        WHERE NOT EXISTS (SELECT 1 FROM tmpMembers 
        WHERE members.memNumber = Cast(tmpMembers.memNumber as number))
</CFQUERY>

Gives me the following error....am I converting it wrong? 

ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC Microsoft Access Driver] Syntax error. in query
expression 'NOT EXISTS (SELECT 1 FROM tmpMembers WHERE members.memNumber
= Cast(tmpMembers.memNumber as int))'.


SQL = "SELECT * FROM members WHERE NOT EXISTS (SELECT 1 FROM tmpMembers
WHERE members.memNumber = Cast(tmpMembers.memNumber as int))"


~~
Stephenie 




> |-----Original Message-----
> |From: Toklat [mailto:[EMAIL PROTECTED]] 
> |Sent: Wednesday, October 16, 2002 2:05 PM
> |To: CF-Community
> |Subject: Re: Db merge question
> |
> |
> |Then you could loop through the one table, convert the 
> |number to a string, compare and then if its there ignore, if 
> |its not add it.
> |
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.401 / Virus Database: 226 - Release Date: 10/9/2002
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_community
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to