Hello there I hope you can help me . Im very new to oracle unfortunatley and have now managed to get my self stuck, after some serious hunting around the internet i am non the wiser. the problem i have is i would like to create a sequence in oracle using the max customer_id from an existing table as the sequence's start value , e.g
CREATE SEQUENCE customer_id_sequence
START WITH <max value for the customer_id colum in the customer table > + 1
INCREMENT BY 1
unfortunatley just poping in
START WITH (SELECT max(customer_id) FROM customer)
just produces an invalid number format error .
I ma using oracle 10 g
now im fairly sure i can do somethign with substitution variables to sort this out but i am at a loss how to proceed. I would be very greatfull if any one can point me in the right direction to get me started towards a solution
Im sorry if i have posted this in the wrong area , im new to tek-tips also and im still finsding my way around
CREATE SEQUENCE customer_id_sequence
START WITH <max value for the customer_id colum in the customer table > + 1
INCREMENT BY 1
unfortunatley just poping in
START WITH (SELECT max(customer_id) FROM customer)
just produces an invalid number format error .
I ma using oracle 10 g
now im fairly sure i can do somethign with substitution variables to sort this out but i am at a loss how to proceed. I would be very greatfull if any one can point me in the right direction to get me started towards a solution
Im sorry if i have posted this in the wrong area , im new to tek-tips also and im still finsding my way around