Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros RES 4.0 Update Qery for mi_def table as custom user

Status
Not open for further replies.

DoChGsell

Technical User
Nov 3, 2008
2
CH
Hi there



I’m trying to build a update query for the micros res 4.0 system that changes entries in the whole mi_def table.



So far I could access the sybase central DB by using the Adaptiv anywhere server with the uid:custom pwd:custom. I created a stored procedure which should update the fields "obj_num", "name_1", "name_2" from an imported table which contains the modified entries of the records.



Attached is the code I am using:

UPDATE mi_def

SET obj_num = obj_num_change, name_1 = name_1_change, name_2 = name_2_change

FROM mi_def A INNER JOIN import_changed B

ON A.mi_seq = B.mi_seq



When I use the custom user I can't update the table. It says that the table mi_def cound not be found. So I changed the password for the micros user to try it as a micros user and the query worked perfectly. The problem is that it's too dangerous to change the micros password. So is there another way to change the entries of the mi_def table by using an update query?



Thanks in advance for your help.



Best regards,

Dominik
 

You're logged in as the custom user, so have to specify the owner of the standard micros tables.

Code:
UPDATE [red]micros.[/red]mi_def

SET obj_num = obj_num_change, name_1 = name_1_change, name_2 = name_2_change

FROM [red]micros.[/red]mi_def A INNER JOIN import_changed B

ON A.mi_seq = B.mi_seq
 
Hi pmegan

whow, it's working. Perfect. I forgott the 2nd micros. Thanks a lot.

Best regads,
Dominik
 
if your trying to do the Query whit user Custom, try to rechange the Pwf in Database Manager in User/Passwords.

and the Log in again in dbisql and try to do the QRY again.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top