how to fire the event when the windows service is running.

2 views
Skip to first unread message

viji

unread,
Oct 21, 2005, 10:15:03 AM10/21/05
to dotnetindia
hi friends,
how to fire the event when the windows service is running.



__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Shivprasad Koirala

unread,
Oct 22, 2005, 12:06:29 AM10/22/05
to .NetIndia
Declare events or delegate.... its not different that normal .NET
programs.

-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Ravi

unread,
Oct 24, 2005, 1:34:11 AM10/24/05
to Techdot...@googlegroups.com
Hi Friends,
Please help me in solving the problem and an interview question

Is it possible to retrive rows into a columns?,

example

Table name: Month(value varchar(10),Salary int)

Value Salary
------------
Jan 1000
Feb 2000
Mar 3000
Apr 4000

into

Jan Feb Mar Apr
1000 2000 3000 4000

Thanks in advance
Ravi.P

Ravi

unread,
Oct 24, 2005, 3:54:10 AM10/24/05
to Techdot...@googlegroups.com

Ravi

unread,
Oct 24, 2005, 3:54:10 AM10/24/05
to Techdot...@googlegroups.com

Shivprasad Koirala

unread,
Oct 24, 2005, 5:05:15 AM10/24/05
to .NetIndia
Yes by making CUBE check out analysis services in SQL Server

Senthil Kumar

unread,
Oct 24, 2005, 6:09:31 AM10/24/05
to Techdot...@googlegroups.com
HI Ravi.
use crosstab query for ur below question.

BabuLives

unread,
Oct 24, 2005, 6:10:25 AM10/24/05
to .NetIndia
hai ravi...
pls explain with example a simple cross tab query ..


Regards,
Satheesh

BabuLives

unread,
Oct 24, 2005, 6:10:26 AM10/24/05
to .NetIndia

Senthil Kumar

unread,
Oct 24, 2005, 6:20:45 AM10/24/05
to Techdot...@googlegroups.com
HI ravi If u want more
 plese goto SQL Server Help under the section :
Cross-tab Reports
Its having with example Query

Regards
Senthilkumar.K

Ravi

unread,
Oct 24, 2005, 6:35:04 AM10/24/05
to Techdot...@googlegroups.com
Actual table content :
           
StudCode        SubCode    Mark
501                  101            95
502                  102            65  
502                  103            82
502                  101            66
501                  102            65
501                  103            36
 
Required output:
 
StudCode                   101                102        103
501                             95                  65           36
502                             66                  65           82  
 
it is possible thru cross tab query
select  studcode,sum(case subcode when '101' then mark) Physics,
                         sum(case subcode when  '102' then mark) Chemistry,
                         sum(case subcode when  '103' then mark) Maths
from marks group by studcode
 
But my query is i m having only unique records,
like
 
Value       Salary
Jan           1000
Feb          2000
Mar         3000
Apr          4000
 
Required output is:
 
Jan            Feb        Mar        Apr
1000        2000        3000    4000
 
is it possible to do this wihout any additional information in that table?,
it was asked in a interview,
what do u think,if u have answer please send me
 
Thanks in advance.....
 
Ravi.P

Laks_win

unread,
Oct 25, 2005, 4:40:00 AM10/25/05
to .NetIndia
Hi Ravi,

Pls try this.
This works with ur actual data

[Sql]
select * from [Month]

select min( case when value='Jan' then salary end) as Jan,
min( case when value='Feb' then salary end) as Feb,
min( case when value='Mar' then salary end) as Mar,
min( case when value='Apr' then salary end) as Apr,
min( case when value='May' then salary end) as May
from [Month]
[/Sql]

--Dont use the group by

Regards
Lakshmi Narayanan.R

Reply all
Reply to author
Forward
0 new messages