PravinBand
Programmer
Hi,
Can somebody tell me why following is happening?
When I am executing following proc with paramter 1,
it is runnig fine.
But when I am giving parameter 2, it is giving me following error message:
Table 'cas_t' can not found.
Stored Procedure
create proc sp2 (@proc int)
as
begin
if @proc = 1
begin
select * into cas_t from cas
end
if @proc = 2
begin
create index ix1 on cas_t(lacct15)
select lacct15,count(*) from cas_t group by lacct15
end
end
Can somebody tell me why following is happening?
When I am executing following proc with paramter 1,
it is runnig fine.
But when I am giving parameter 2, it is giving me following error message:
Table 'cas_t' can not found.
Stored Procedure
create proc sp2 (@proc int)
as
begin
if @proc = 1
begin
select * into cas_t from cas
end
if @proc = 2
begin
create index ix1 on cas_t(lacct15)
select lacct15,count(*) from cas_t group by lacct15
end
end