Hi
I have problem with binary values in mssql.
I find this script on the web:
declare @i int /* input */
set @i = 42
declare @result varchar(32) /* SQL Server int is 32 bits wide */
set @result = ''
while 1 = 1 begin
select @result = convert(char(1), @i % 2) + @result,
@i = convert(int, @i / 2)
if @i = 0 break
end
select @result
My problem is that i can't get the value of i as a column.
PLEASE HELP.
I have problem with binary values in mssql.
I find this script on the web:
declare @i int /* input */
set @i = 42
declare @result varchar(32) /* SQL Server int is 32 bits wide */
set @result = ''
while 1 = 1 begin
select @result = convert(char(1), @i % 2) + @result,
@i = convert(int, @i / 2)
if @i = 0 break
end
select @result
My problem is that i can't get the value of i as a column.
PLEASE HELP.