truncates them? - have you got leading 0's?

Try this - although I don't think it will necessarily make a difference

SELECT     *
FROM         temptblJOBEVL
WHERE     LTRIM(RTRIM(SYS_EMP_ID_NR)) NOT IN
                          (SELECT     LTRIM(RTRIM(emp_id_nr))
                            FROM          tblemployee)

-----Original Message-----
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2002 14:04
To: CF-Talk
Subject: RE: SQL HELP


The column is char 10 when I change it to int it truncates my numbers so I
do not want that.

Josh

-----Original Message-----
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 8:59 AM
To: CF-Talk
Subject: RE: SQL HELP


yes it may - unless you put ltrim(rtrim()) around the field values - change
to an int and see what hapens

-----Original Message-----
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2002 13:52
To: CF-Talk
Subject: RE: SQL HELP


Both char(10) I can change them to int is you think it would make a
difference.
-----Original Message-----
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 8:44 AM
To: CF-Talk
Subject: RE: SQL HELP


shouldn't make a difference.

What field type is  emp_id in table tblemployee?  Is it the same as
SYS_EMP_ID_NR in temptblJOBEVL?  Are they integers?

Your syntax looks fine to me.

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2002 13:38
To: CF-Talk
Subject: RE: SQL HELP


first of all I don't think you need the first ()

try this.

SELECT     *
FROM         temptblJOBEVL
WHERE     SYS_EMP_ID_NR NOT IN
                          (SELECT     emp_id_nr
                            FROM          tblemployee)

tony

Tony Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337


-----Original Message-----
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 8:40 AM
To: CF-Talk
Subject: SQL HELP


For some unknown reason this query does not work correctly even though I
know that there is data in temptbljobevl that does not match tblemployee
data.  Can someone please help me do this via a join.


Thanks,

Joshua Tipton

SELECT     *
FROM         temptblJOBEVL
WHERE     (SYS_EMP_ID_NR NOT IN
                          (SELECT     emp_id_nr
                            FROM          tblemployee))







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to