Tuesday, March 27, 2012
Boolean Calculated Fields in SQL Server
This may seem amazing and a stupid question but:
Consider there is a parent table A and child table B and we want to write a query that has some fields from A and a calculated field which indicates whether A has any child record in B or not. The Value 1 means Yes and 0 means No. Has anybody an idea to write this in SQL Server?select foo
, bar
, fap
, case when exists
( select 1 from tableB
where Afk = tableA.pk )
then 1 else 0 end as calcfield
from tableA|||Originally posted by r937
select foo
, bar
, fap
, case when exists
( select 1 from tableB
where Afk = tableA.pk )
then 1 else 0 end as calcfield
from tableA
Books OnLine (chm files) Problem
I searched this news group but couldn't find that problem which
is suprising... maybe I'm doing something stupid.
I start one of the chm files (books on line help files).
I read about a topic. There are links.
I click on them. It tells me "Selection is not associated with any
topic. Please try again.". Its ahref link to jscript function:
javascript:hhobj_1.Click() but I do not have it and cannot find it.
So I have to go between all those chm files hoping to find the topic
of my choice.
Plus I want to search them all at once.
There must be a (smart) and easy way to do this.
Please, do you have any suggestions.
Thankfully
Jimmy Ol' BoyJimmy,
> I start one of the chm files (books on line help files). I read about a
> topic. There are links. I click on them. It tells me "Selection is not
> associated with any topic. Please try again.".
A number of the security patches for Internet Explorer that Microsoft
has released this year are known to break the HTML Help ActiveX
control, which is the component that provides the navigation
facilities in help files.
The problem is described in Knowledge Base article 822989 and, in most
cases, installing Critical Update 811630 should sort it out.
822989: http://support.microsoft.com/?kbid=822989
811630: http://support.microsoft.com/?kbid=811630
The exception to this is Windows 2000 with Service Pack 4 installed.
In this case, you must unregister the ActiveX control and then
re-register it, by running the following two commands from a command
prompt:
regsvr32 /u <drive>:\winnt\system32\hhctrl.ocx
regsvr32 <drive>:\winnt\system32\hhctrl.ocx
--
Pete (Microsoft Help MVP)