Questions tagged [nextval]

53 questions
0
votes
1 answer

model validation of table using extval

My page contains in place editor of values in table. Something like this: I want all actors inside list bean.actors are…
sasha
  • 63
  • 7
0
votes
0 answers

C# mvc How to set AutoIncrement on

Hi I am trying to create a new customer record. The primary id customerid is autoincremental column. When I try to insert a new record I get this error : Message=Cannot insert explicit value for identity column in table 'Customer' when…
kayze
  • 738
  • 8
  • 19
  • 33
0
votes
2 answers

How to insert nextval to trigger inside for loop

Here is a code for trigger and it have a for loop. When trigger is fired (INSERT OR UPDATE) there's another table data must include it is MICL_SUP OPEN projMgrsCursor; LOOP FETCH projMgrsCursor INTO projMgr; select…
cHaNkX
  • 35
  • 1
  • 3
  • 12
0
votes
1 answer

Find next unused ID in table SQL which has non continous ranges

I have two tables like the following: TABLE1: ======= somid, tobeupdated 1 , null 2 , null 3 , null 10 , null TABLE2: ======= rangeofids 2 3 9 10 11 12 13 I have to update TABLE1.tobeupdated (or found its' should be value) based on…
Zsolt Botykai
  • 50,406
  • 14
  • 85
  • 110
0
votes
2 answers

nextval sequence for varchar in sql?

I was wondering if there was a way of making a nextval sequence for a varchar value? I am using iSQL plus, oracle. For e.g. I have a sales table which consists of sale_id, prod_id, cust_name, sale_name. where I insert the data by doing the…
taksIV
  • 121
  • 2
  • 3
  • 8
-1
votes
1 answer

Using a primary key with a sequence that cycles results in "duplicate key violates unique constraint" errors after wrap around in Postgresql

BACKGROUND/CONTEXT If I define a sequence and a table as follows: CREATE SEQUENCE public.test_sequence CYCLE MINVALUE 1 MAXVALUE 2147483647; CREATE TABLE public.test_table ( id integer NOT NULL DEFAULT…
-1
votes
1 answer

Adding a new column with nextval to an existing SNOWFLAKE database table

I am trying to insert a new column to an existing table in snowflake with nextval as similar to the supplierID in the below code (I did get_ddl on my stagingtable to get the below code). I added a new sequence and cloned with supplierID and when i…
SMR
  • 401
  • 4
  • 15
-2
votes
1 answer

python - get next value in list sequence, recursive call

What would be the simplest way to get the next value based on a sorted list? Sorted list with unique numbers: If the number n is not found in the list, return n+1, if is found, find in the last number that does not breaks an incremental sequence,…
Alg_D
  • 2,242
  • 6
  • 31
  • 63
1 2 3
4