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 are the properties of primary key?

913


What is catalog views?

1024


How to create a user name in a database?

992


How to list all schemas in a database?

1003


Do you know sql server 2008 introduces automatic auditing?

906


How do we Backup SQL Azure Data?

106


How to view the error log for any specific instance? : sql server database administration

985


How can you manage sql azure security?

101


Is there any difference between primary key and unique with the not null condition?

886


What is the difference between Clustered and Non-Clustered Index?

1010


Explain a join?

1003


What is a result set object returned by mssql_query()?

1070


Which language is supported by sql server?

953


What is auditing in sql server?

879


1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?

1964