Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!u72g2000cwu.googlegroups.com!not-for-mail
From: "Bonk" <bonk.brennan@gmail.com>
Newsgroups: comp.databases.oracle.server
Subject: Getting currval from a sequence with out incrementing nextval
Date: 3 Mar 2006 14:32:55 -0800
Organization: http://groups.google.com
Lines: 11
Message-ID: <1141425175.303800.98530@u72g2000cwu.googlegroups.com>
NNTP-Posting-Host: 216.162.245.135
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1141425182 11983 127.0.0.1 (3 Mar 2006 22:33:02 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 3 Mar 2006 22:33:02 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; brip1; InfoPath.1),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: u72g2000cwu.googlegroups.com; posting-host=216.162.245.135;
   posting-account=iQ2HAQ0AAAD-3n5D6R3MDgdqeZQaO09Q
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:262746

Kind of a dumb question is there a good way in 10.2G to get the current
value of a sequence number with first select thing the next value? Our
issue is that we have a database that caches a large chunk of numbers
on our sequences, and it appears that the column LAST_NUMBER on
user_sequences (or dba_sequences) has the last value of the cached
numbers.

I would like to compare the current value of the sequence to the
associated primary keys so that I can determine that I do not have a
"unique key constraint" without burning a  next value first.

