Crystal Report runtime for Visual Studio 2010 & 2012

Filed in .Net Leave a comment

In the previous version of Visual Studio Crystal runtime is include in Visual Studio Installation but from Visual Studio 2010 you have to download manual from SAP Crystal Report website, below is the link. This normally you need when you have to deploy reports on production server where Visual Studio and Crystal Report is not installed.

http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp

For Visual Studio 2012

http://scn.sap.com/docs/DOC-7824

,

Update statement while select data from same table

Filed in SQL Leave a comment

UPDATE EmailEvents
SET SubjectES = (SELECT ee.SubjectES FROM EmailEvents ee WHERE ee.Clientid IS NULL AND ee.EmailEventId = EmailEvents.EmailEventId)
WHERE EmailEvents.Clientid = ‘OE’

Key point; you cannot define table alias after Update clause so you have to use complete table name when referring main table columns.

One more example of Self join.
select EmailEventid, Body,clientid,
(SELECT ee.Body FROM EmailEvents ee WHERE ee.Clientid IS NULL AND ee.EmailEventId = EmailEvents.EmailEventId AND ee.Body = EmailEvents.Body )
from EmailEvents
order by emaileventid, clientid

,

TOP