I am trying to declare an image then insert them into the database but i am getting below error
ALTER PROCEDURE [dbo].[datasheetcodesbarcode2018v23Teacher]
As
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
FROM accounts
where [type] LIKE 'teacher' and (status is null) and (account is not null)
ORDER BY account
error
Msg 2739, Level 16, State 1, Line 11
The text, ntext, and image data types are invalid for local variables.