nohacks
asked on
Oracle insert with select and nextval
Hi,
I have a simple insert question for 10g.
I have an insert and want to use a select from another table and nextval.
This returns an error...missing expression
Thanks
Phil
I have a simple insert question for 10g.
I have an insert and want to use a select from another table and nextval.
This returns an error...missing expression
Thanks
Phil
insert into zipcode_usa_canada (
ZIPCODE_ID,
ZIPCODE,
ZIP_TYPE,
ZIP_CITYNAME,
ZIP_CITYTYPE,
ZIP_STATENAME,
ZIP_STATEABBR,
ZIP_AREACODE,
LATITUDE,
LONGITUDE)
values (
select ZIPCODE_USA_CANADA_SEQ.nextval,
POSTALCODE,
POSTALTYPE,
CITYNAME,
CITYTYPE,
PROVINCENAME,
PROVINCEABBR,
AREACODE,
LATITUDE,
LONGITUDE
from ZIP_USA_CANADA_2009
where upper(citytype) = 'D'
)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER