Re: Distinct insert
From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 08/25/04
- Previous message: Robert: "Distinct insert"
- In reply to: Robert: "Distinct insert"
- Next in thread: Robert: "Re: Distinct insert"
- Reply: Robert: "Re: Distinct insert"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Aug 2004 23:34:01 +0200
On Wed, 25 Aug 2004 12:55:03 -0700, Robert wrote:
>I am trying to insert a record id primary at the same time that I am trying
>to insert a Distinct Account number.
>
>The insert statement is something kind of like this:
>
>insert into Accounts (AccountsOID,Account)
> select Distinct "Rec NO" + 100 as AccountsOID, "LIC TAG" as Account from
>AutoExpt
>
>In the AutoExpt table there are multiple occurrences of "LIC TAG" values all
>of which need to be put into the Accounts table, however there must be only
>one entry for the Lic tag in the accounts table. The Rec No +100 is just to
>create a unique primary key for the AccountsOID.
>
>Is there anyway I can get only the Distinct Lic Tag's, but at the same time
>get a unique primary key for them.
>
>Thanks,
Hi Robert,
Please provide DDL (CREATE TABLE statements, with constraints), sample
data (as INSERT statements), expected output and a description of the
business problem you're trying to solve.
http://www.aspfaq.com/etiquette.asp?id=5006
http://vyaskn.tripod.com/code.htm#inserts
Best, Hugo
-- (Remove _NO_ and _SPAM_ to get my e-mail address)
- Previous message: Robert: "Distinct insert"
- In reply to: Robert: "Distinct insert"
- Next in thread: Robert: "Re: Distinct insert"
- Reply: Robert: "Re: Distinct insert"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|