January 29, 2009 at 2:47 pm
I have two tables one (calllog) with CallID, ProjectStatus, and Classification. The second one (journal) has CAllID and the field ProjectSummary. Both these have more fields but these are the ones I am working with. The callID is of couse the PK and relationship key. And Each CallID in the Calllog table can have many values in the Journal table.
IF calllog.ProjectStatus = 'Mgr On Hold' has at least one value of 'T' in the Journal.ProjectSummary field then I need to keep the ProjectStatus as is. If ProjectStatus does not have a column with at least one value of 'T' Then I need to clear the calllog.ProjectStatus field and insert 'Non Incident' in to the Calllog.classification field.
Help me please!!!!
January 29, 2009 at 2:50 pm
Check out Exists in Books Online. You should be able to build an update with "Where Not Exists" in the Where clause.
If you need help with writing it, post the table definitions and what you have so far for the update code, and we can help fill in the blanks and all that.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 29, 2009 at 2:52 pm
I will check it out in the morning. Thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply