how to use sp_executesql
does anyone know how to retrieve the data using sp_executesql i am running asp as front-end and backend as store procedures.
I have this store procedures
CREATE PROCEDURE sp_GetCustomerData
DECLARE @SQUERY AS NVARCHAR(500)
SET @APPENDTYPE = 'ID,NAME'
SET @SQUERY = N'SELECT ' + @APPENDTYPE + N'FROM CUSTOMER'
EXECUTE SP_EXECUTESQL @SQUERY
how to do retrieve the data for the id and name because i need to retrieve the data for manipulation purpose.