[Info-ingres] One up unique number for an attribute - in SQL - does anyone know the trick of doing this?
Allan Biggs
Allan.Biggs at GBR.dupont.com
Mon Feb 6 16:10:00 UTC 2017
Martin,
Thanks for this - I don't have 10.2 documentation on my PC and the ESD
site seems to be down or very busy this afternoon so was unable to look it
up.
The number of times I have needed to do this and struggled with internal
procedures :-)
cheers
Allan
From: Martin Bowes <martin.bowes at ndph.ox.ac.uk>
To: Allan Biggs <Allan.Biggs at GBR.dupont.com>
Cc: "info-ingres at lists.planetingres.org"
<info-ingres at lists.planetingres.org>
Date: 06/02/2017 15:47
Subject: RE: [Info-ingres] One up unique number for an attribute -
in SQL - does anyone know the trick of doing this?
Create the table using an identity column or have the column take a column
default which is the next value from a sequence.
Martin Bowes
From: Allan Biggs [mailto:Allan.Biggs at GBR.dupont.com]
Sent: 06 February 2017 15:42
To: info-ingres at lists.planetingres.org; openroad-users at googlegroups.com
Subject: [Info-ingres] One up unique number for an attribute - in SQL -
does anyone know the trick of doing this?
in command line sql I am populating a new table - one of the columns is a
sort order
each row of this field must be a 'one up' unique number starting at 1 and
ending as the number of rows in the table
I know that I could do this in OpenROAD , and in another guise this is
done in OpenROAD, but in this case it has to be done in SQL or maybe in
report writer.
It does not matter which rows contain 1 ,2 etc although one of the
columns does have a set of unique numbers with gaps which could be used to
determine the order of row 1, 2 etc.
Does anyone know of a 'trick' to do this?
In mysql it is possible to define unique one up numbers when creating a
table does modern Ingres have this feature?
thanks
Allan
This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.
Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean
http://www.DuPont.com/corp/email_disclaimer.html
This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.
Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean
http://www.DuPont.com/corp/email_disclaimer.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20170206/3c6efa2d/attachment.html>
More information about the Info-ingres
mailing list