Hello, guys.
I have been trying to execute the following and just keep getting the same error:
“Syntax error converting the nvarchar value ‘one_a’ to a column of data int.
declare @a int
declare @b int
declare abc cursor for select TABLE_Name, data_type
from information_schema.columns where table_name = ‘com_tv’
open abc
fetch abc into @a, @b
while @@fetch_status = 0
begin
fetch abc into @a, @b
print space (10) + @a + space(10) + @b
end
close abc
deallocate abc
Thanks for help in advance.
I have been trying to execute the following and just keep getting the same error:
“Syntax error converting the nvarchar value ‘one_a’ to a column of data int.
declare @a int
declare @b int
declare abc cursor for select TABLE_Name, data_type
from information_schema.columns where table_name = ‘com_tv’
open abc
fetch abc into @a, @b
while @@fetch_status = 0
begin
fetch abc into @a, @b
print space (10) + @a + space(10) + @b
end
close abc
deallocate abc
Thanks for help in advance.