Groups | Blog | Home
all groups > sql server (microsoft) > june 2007 >

sql server (microsoft) : HI,I am writing a table of TWO by TSQL but it gaves me error,, ANY Help?


Alexey Smirnov
6/30/2007 7:26:40 AM
[quoted text, click to view]

Set @count = (@count + 1)*@count1
Print @count
Ed Murphy
6/30/2007 8:58:20 AM
[quoted text, click to view]

Print cast(@count as varchar) + ' x ' + cast(@count1 as varchar)
ch.adilaziz NO[at]SPAM gmail.com
6/30/2007 2:23:23 PM
declare @count int
declare @count1 int
set @count = 0
set @count1 = 2

while @count < 10
Begin
Set @Count = @count + 1
Print (@count) = (@count*@count1)
END
---------------------
Server: Msg 170, Level 15, State 1, Line 10
Line 10: Incorrect syntax near '='.
-------------
I want this table to be printed like
2 x 1 = 2
2x10 = 20
AddThis Social Bookmark Button