I have a problem with the SQL query- nextval in a SQL Server database:
The multi-part identifier "applicationauth.nextvalue" could not be bound.
Any idea what could be wrong?
Here is query:
insert into applicationauth (app, optionname, conditionnum, groupname, applicationauthid)
select 'AUTOSCRIPT', 'ATTRVAL', 'ATTRVALUECON', varvalue, applicationauth.nextvalue
from maxvars
where varname = 'ALLUSERGROUP';
insert into applicationauth (app, optionname, conditionnum, groupname, applicationauthid)
select 'AUTOSCRIPT', 'HIDEATTR', 'HIDEATTRCON', varvalue, applicationauthseq.nextval
insert into applicationauth (app, optionname, conditionnum, groupname, applicationauthid)
select 'AUTOSCRIPT', 'ATTRVAL', 'ATTRVALUECON', varvalue, applicationauthseq.nextval
from maxvars
where varname = 'ALLUSERGROUP';
insert into applicationauth (app, optionname, conditionnum, groupname, applicationauthid)
select 'AUTOSCRIPT', 'HIDEATTR','HIDEATTRCON', varvalue, applicationauthseq.nextval
from maxvars
where varname = 'ALLUSERGROUP';
insert into applicationauth (app, optionname, conditionnum, groupname, applicationauthid)
select 'AUTOSCRIPT', 'HIDEBUT', 'HIDEBUTCON', varvalue, applicationauthseq.nextval
from maxvars
where varname = 'ALLUSERGROUP';
insert into applicationauth (app, optionname, conditionnum, groupname, applicationauthid)
select 'AUTOSCRIPT', 'HIDEIMP', 'HIDEIMPCON', varvalue, applicationauthseq.nextval
from maxvars
where varname = 'ALLUSERGROUP';
(and so on and so forth ...)
I'm getting following error message:
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "applicationauth.nextvalue" could not be bound.Msg 4104, Level 16, State 1, Line 9
The multi-part identifier "applicationauthseq.nextval" could not be bound.(.... and so on and so forth)