I have written a UNIX menu script, accessing a Sybase database.
It gives the user many options, one of which is as follows :-
a. The user enters a reference number, and one or more entries for that reference are returned on the screen from a table, preceded with an incremental counter.
b. The user then enters the numbers he wants to update,
c. and I then re-display those selected.
d. I then update these records.
I do this as follows :
a. From UNIX the user enters his value.
Within SQL, I get the records, creating a VIEW, and displaying them all (1 thru 5, say), with the counter.
b. Back to UNIX, the User enters the numbers he wants (2 and 5, say)
c. I go back into SQL, and update my VIEW, dropping 1, 3, and 4
d. Still in SQL, the 2 remaining records are updated.
This works OK in a testing environment, but going live, I find I do not have UPDATE privileges for my VIEW.
Nor will I be granted them by the DBA.
How can I re-write this functionality ?
Substituting the VIEW with a temporary table doesn’t work, as it is lost when the first SQL session ends.
Ideally, I want to get 2 and 5 entered, within the SQL session.
I could then use the temporary table approach.
It gives the user many options, one of which is as follows :-
a. The user enters a reference number, and one or more entries for that reference are returned on the screen from a table, preceded with an incremental counter.
b. The user then enters the numbers he wants to update,
c. and I then re-display those selected.
d. I then update these records.
I do this as follows :
a. From UNIX the user enters his value.
Within SQL, I get the records, creating a VIEW, and displaying them all (1 thru 5, say), with the counter.
b. Back to UNIX, the User enters the numbers he wants (2 and 5, say)
c. I go back into SQL, and update my VIEW, dropping 1, 3, and 4
d. Still in SQL, the 2 remaining records are updated.
This works OK in a testing environment, but going live, I find I do not have UPDATE privileges for my VIEW.
Nor will I be granted them by the DBA.
How can I re-write this functionality ?
Substituting the VIEW with a temporary table doesn’t work, as it is lost when the first SQL session ends.
Ideally, I want to get 2 and 5 entered, within the SQL session.
I could then use the temporary table approach.