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

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Some Questions

Author  Topic 

lokhande.shirish
Starting Member

4 Posts

Posted - 2007-02-21 : 23:59:40
Hi,

I like to know whethere we can do following task:

1. Can we call trigger from store procedure.
2. Can we call store procedure from store procedure.
3. Can we call store procedure from trigger .
4. Can we call trigger from trigger.


5. Can we call trigger from view.
6. Can we call store procedure from view.


Thanks & Regards,

Shirish







shirish

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-02-22 : 00:06:40
1. NO
2. YES
3. YES
4. NO
5. NO
6. NO


KH

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-02-22 : 00:10:44
[code]declare @a tinyint
set @a = 24

select
case when @a & 32 = 0 then 'NO' else 'YES' End [Q1],
case when @a & 16 = 0 then 'NO' else 'YES' End [Q2],
case when @a & 8 = 0 then 'NO' else 'YES' End [Q3],
case when @a & 4 = 0 then 'NO' else 'YES' End [Q4],
case when @a & 2 = 0 then 'NO' else 'YES' End [Q5],
case when @a & 1 = 0 then 'NO' else 'YES' End [Q6]
[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-02-22 : 00:12:04
quote:
Originally posted by harsh_athalye

declare @a tinyint
set @a = 24

select
case when @a & 32 = 0 then 'NO' else 'YES' End [Q1],
case when @a & 16 = 0 then 'NO' else 'YES' End [Q2],
case when @a & 8 = 0 then 'NO' else 'YES' End [Q3],
case when @a & 4 = 0 then 'NO' else 'YES' End [Q4],
case when @a & 2 = 0 then 'NO' else 'YES' End [Q5],
case when @a & 1 = 0 then 'NO' else 'YES' End [Q6]


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"





KH

Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-02-22 : 00:21:35


select Question = QNo,
Answer = case when QNo & 2 = 0 then 'NO' else 'YES' End
from (
select 1 as QNo union all
select 2 union all
select 3 union all
select 4 union all
select 5
) q
order by QNo




KH

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-02-22 : 01:58:42
quote:
Originally posted by khtan



select Question = QNo,
Answer = case when QNo & 2 = 0 then 'NO' else 'YES' End
from (
select 1 as QNo union all
select 2 union all
select 3 union all
select 4 union all
select 5
) q
order by QNo




KH





Much Compact !!

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -