Hi All,
I have below query ina stored procedure which deletes multiple records based on IDs
Declare @strProducts varchar(MAX) set @strProducts = 'SELECT pt.ID from Products pt INNER JOIN Price pr ON pt.ID = pr.ID Where pr.price='+ cast(@intprice as varchar(5))+'' DELETE FROM Stock WHERE stock.IDs in(@strProducts )
I would like to now whether this is a correct way of writing a query.
Your help is appreciated.
thanks,
mds2907