Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

create procedure proc1 (@a int)
as
begin
if @a=1
create table #temp(a1 int)
else
create table #temp(a1 int)
end

while executeing the above code it shows error
like '#temp already exist' .why it shows an error?

Answer Posted / lee

yep problem is with the compiler.. I had to think of
another way to solve the problem, eg, I created the #temp
without the IF statement and then used an IF ELSE statement
to modify or update #temp, make sense?

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by SQL*Net?

1010


What are the 3 types of schema?

1100


How to Update from select query in sql server?

1048


What is executereader?

940


Explain sub-query?

940


What happens if null values are involved in datetime operations?

963


Why use sub query in sql server and list out types of sub queries?

987


What is the meaning of lock escalation and why/how to stop this? : sql server database administration

1025


Who is the owner of a schema in ms sql server?

1065


Is port 1433 secure?

988


what are the reporting service components in SSRS?

163


Which language is supported by sql server?

1004


Can a cursor be updated? If yes, how you can protect which columns are updated?

1096


What is an identity column in insert statements?

1010


Can we use where clause with group by?

891