Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 optimising a query
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

msrs
Starting Member

India
32 Posts

Posted - 09/04/2007 :  07:21:13  Show Profile  Reply with Quote
hi all,

Edited by - msrs on 01/09/2008 03:53:49

SwePeso
Patron Saint of Lost Yaks

Sweden
30421 Posts

Posted - 09/04/2007 :  07:31:06  Show Profile  Visit SwePeso's Homepage  Reply with Quote
UPDATE	x
SET	x.PendingAtGlobus = '2'
FROM	tblCancelPolicy AS x
WHERE	x.PendingAtGlobus = '1'
	AND NOT EXISTS (SELECT * FROM tblSubscription AS e WHERE e.GlobusStatus IS NULL AND e.Wings_Status = 'S' AND e.Policy_id = x.Policy_id)


UPDATE		x
SET		x.PendingAtGlobus = '2'
FROM		tblCancelPolicy AS x
LEFT JOIN	tblSubscription AS e ON e.Policy_id = x.Policy_id
			AND e.GlobusStatus IS NULL
			AND e.Wings_Status = 'S'
WHERE		x.PendingAtGlobus = '1'
		AND e.Policy_id IS NULL



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

ditch
Flowing Fount of Yak Knowledge

South Africa
1466 Posts

Posted - 01/09/2008 :  03:55:32  Show Profile  Visit ditch's Homepage  Reply with Quote
mmm....... another one.


Duane.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30421 Posts

Posted - 01/09/2008 :  05:29:26  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Or he realized SQL is not his cup of tee and decided to leave the business?


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000