I am trying to declare an image then insert them into the database but i am getting below error
ALTER PROCEDURE [dbo].[datasheetcodesbarcode2018v23Teacher]
declare @p image
select @p=Logo from schools where schoolkey ='1'
truncate table tbl_BarCodes
INSERT INTO tbl_BarCodes(Barcode,autono,bookname,author,callno,Logo)
SELECT account,account as kaccount,name,class,stream,@p
where [type] LIKE 'teacher' and (status is null) and (account is not null)
ORDER BY account
Msg 2739, Level 16, State 1, Line 11
The text, ntext, and image data types are invalid for local variables.