Re: Primary Key constraint error



Hi Dan,
Dan Slaby wrote:
I am importing data from one table to another using the import wizard
and sql query. However, I use an 'in (nbr, nbr)' to select data. When
I use the in clause, I get an error on the last row that terminates
the statement because it violates the Primary Key constraint.
However, querying the destination table, the Primary Key does not
exist. When I use the '=' for the very same individual record, the
data copy succeeds. Is there a problem using the 'in' with the import
utility? I imported the records to a table and tried to import from
that table with the same error. The Primary Key values I am trying to
import do not exist in the destination. Any suggestions why this
might be happening?
I am pretty sure, you wanted this question have posted in a different newsgroup (Access, SQL server?)
Between could it be, that the key you want as primary has already duplicate appearances in the source table?
Best greetings from Germany
Olaf


.



Relevant Pages

  • Re: Primary Key constraint error
    ... > Dan Slaby wrote: ... >> I am importing data from one table to another using the import wizard ... >> and sql query. ... >> the statement because it violates the Primary Key constraint. ...
    (microsoft.public.windows.server.general)
  • Re: Trying to simplify an sql query
    ... I am using the following sql query which I feel could be simplified, ... I think I have tried the following construct for the subquery ... to risk hanging the database again. ... As month is no part of the primary key and exists will invariably ...
    (comp.databases.oracle.misc)
  • ASP.NET Datagrid with VB
    ... I've got a datagrid on an asp.net page that loads 4 columns of data from a ... SQL query. ... On the grid, i have an edit command set so that when the button is pressed, ... that specific primary key in another grid. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: JDBC problem
    ... > SQLException: Result Set not updatable.This result set must come from a ... > But my statemet sets CONCUR_UPDATABLE property and sql query selects ... might want to try selecting the primary key col from posts rather then *. ...
    (comp.lang.java.help)
  • Re: Primary Key constraint error
    ... Dan Slaby wrote: ... newsgroup, so that the right people can help you with the specific problem ... Best greetings from Germany ... wizard and sql query. ...
    (microsoft.public.windows.server.general)