I found our where the disconnect was. After some searching, there was some
VB going on that I needed to update. Your suggestions pointed me in the
right direction. Thanks.
----- Original Message -----
From: "Steven Monaghan" <[EMAIL PROTECTED]>
To: "SQL" <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 8:24 AM
Subject: RE: Remove Duplicates Query


> My guess is that somewhere in the declaration section of the DTS package,
> #nursesDistinct is defined.
>
> But, I don't think that is the insert that is failing.  I think the insert
> back into the nurses table is failing.  Check the definition of that table
> and see if all of the columns in that table are included in the select
> statement.
>
> Steve
> -------------------------------------
> Steven Monaghan
> Oracle DBA / Cold Fusion Developer
> MSC Industrial Direct Co., Inc.
> http://www.mscdirect.com
> -------------------------------------
>
> -----Original Message-----
> From: Bruce Sorge [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 27, 2002 9:23 AM
> To: SQL
> Subject: Re: Remove Duplicates Query
>
>
> Well let me ask you this real quick. In looking at the database tables, I
> see that there is not a table called nursesDistinct. However, that is the
> table that the code is trying to enter information into. So I naively
> thought that the line INTO #nursesDistinct would create some sort of temp
> table. Is this not the case? Do I have to create the table?
>
> Thanks
> ----- Original Message -----
> From: "Steven Monaghan" <[EMAIL PROTECTED]>
> To: "SQL" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 26, 2002 4:18 PM
> Subject: RE: Remove Duplicates Query
>
>
> > This probably means that your select distinct does not include all of
the
> > columns in the table.  You would have to either explicitly list the
> columns
> > in the insert statement, or select all of the columns, in the correct
> order,
> > in your select statement.
> >
> > I personally would recommend both!
> >
> > Steve
> > -------------------------------------
> > Steven Monaghan
> > Oracle DBA / Cold Fusion Developer
> > MSC Industrial Direct Co., Inc.
> > http://www.mscdirect.com
> > -------------------------------------
> >
> > -----Original Message-----
> > From: Bruce Sorge [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 26, 2002 4:53 PM
> > To: SQL
> > Subject: Remove Duplicates Query
> >
> >
> > I have inherited an application that has a DTS package. One of the
> functions
> > in this package is to remove duplicates from a table. The query looks
like
> > this:
> >
> > SELECT
> >  DISTINCT(nurseID), fname, lname, careerLadder, bcon,
> >   ssn, domainAccount
> > INTO #nursesDistinct
> > FROM nurses;
> > DELETE FROM nurses;
> > INSERT nurses SELECT * FROM #nursesDistinct;
> > DROP TABLE #nursesDistinct;
> >
> > Problem is that this does not work. When I run this I receive an error
> > message:
> >
> > Error Description:    Insert Error:    Column name or number of
specified
> > values does not match table definition.
> >
> > What does this mean?
> >
> > Thanks,
> >
> >
> > Bruce
> >
> >
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to