[Info-ingres] One up unique number for an attribute - in SQL - does anyone know the trick of doing this?
Chris Clark
Chris.Clark at actian.com
Mon Feb 6 19:02:36 UTC 2017
ESD is up, I'm not aware of any outages. If you are having access issues, it is worth opening a support case http://supportservices.actian.com/support-services/support so that we can look into it.
Chris
From: info-ingres-bounces at lists.planetingres.org [mailto:info-ingres-bounces at lists.planetingres.org] On Behalf Of Allan Biggs
Sent: Monday, February 06, 2017 8:10 AM
To: martin.bowes at ndph.ox.ac.uk
Cc: info-ingres at lists.planetingres.org
Subject: Re: [Info-ingres] One up unique number for an attribute - in SQL - does anyone know the trick of doing this?
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<mailto:martin.bowes at ndph.ox.ac.uk>>
To: Allan Biggs <Allan.Biggs at GBR.dupont.com<mailto:Allan.Biggs at GBR.dupont.com>>
Cc: "info-ingres at lists.planetingres.org<mailto:info-ingres at lists.planetingres.org>" <info-ingres at lists.planetingres.org<mailto: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<mailto:info-ingres at lists.planetingres.org>; openroad-users at googlegroups.com<mailto: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<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/1c236f84/attachment.html>
More information about the Info-ingres
mailing list