[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate key violation on insert to parts



On Thu, Nov 13, 2008 at 2:39 PM, Eamonn Hamilton <..hidden..> wrote:
> Hi Chris,
>
> The results from your queries :
>
> ledgersmb=# select max(id) from parts;
>  max
> -------
>  10511
> (1 row)
>
> ledgersmb=# select max(id) from ap;
>  max
> -----
>
> (1 row)
>
> ledgersmb=# select max(id) from ar;
>  max
> -------
>  10512
> (1 row)
>
> ledgersmb=# select max(id) from gl;
>  max
> -----
>
> (1 row)
>
>
>
> Now, the fact that I only get two numbers returned, and they're both
> different, gives me to think summat not good is going on?

If they were the same I would be more worried.

However, try this:

select * from id;

and

select max(id) from transactions;

Best Wishes,
Chris Travers