Solved

Sybase Update Query Help

Posted on 2002-07-09
2
484 Views
Last Modified: 2008-03-17
I have 3 tables:
Profl with fields: id, eventcode, parent
Usr with 2 fields: id, rolename
Roac with 3 fields: eventcode, rolename, parent

I need a query that will update the parent field from the Profl table with the value from the parent field from the Roac table based on the rolenames matching (from Roac and Usr) and the ids matching from the Profl and Usr tables.

Am I able to do this with an update statement? I know I can do it with a stored proc but want more of a 'quick and dirty'.

Thanks.
0
Comment
Question by:pmacmann
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
amitpagarwal earned 200 total points
Comment Utility

update Profl
set parent = R.parent
from Profl P,
Usr U,
Roac R
WHERE P.id = U.id
and U.rolename = R.rolename

hope this helps.
0
 
LVL 5

Expert Comment

by:amitpagarwal
Comment Utility
pmacmann,

any updates on this query ??
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now