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)
 Does multiple variable can't declare insingle line

Author  Topic 

ranjeetsingh_6
Posting Yak Master

125 Posts

Posted - 2006-07-18 : 01:21:10
Hi
I am declaring multiple variable in single line but it give error.
Does multiple variable can't declare in single line in sql server 2000.
I Use this(Here only i send only declare variable i am using these varible
for different purpose)
declare @totalqty,@totalamount,@totalfright integer
declare @challan ,@DestinationBranch, @BalancePaidAt,@Drivername,@BroKername varchar(50)

when i declare This in multiple and use these variable my query executed
executed declare variable below:-

declare @totalqty integer
declare @totalamount integer
declare @totalfright integer
declare @challan varchar(50)
declare @DestinationBranch varchar(50)
declare @BalancePaidAt varchar(50)
declare @Drivername varchar(50)
declare @BroKername varchar(50)



Ranjeet Kumar Singh

nathans
Aged Yak Warrior

938 Posts

Posted - 2006-07-18 : 01:44:24
You can:


declare	@TotalQty	int,
@TotalAmount int,
@TotalFright int,
@Challan varchar(50),




Nathan Skerl
Go to Top of Page

ranjeetsingh_6
Posting Yak Master

125 Posts

Posted - 2006-07-18 : 01:51:52
Hi
Thanks Query executed

Ranjeet Kumar Singh
Go to Top of Page
   

- Advertisement -