Records not returned with where clause
I am creating a temporary table into which I am passing data from a table so as to page through the results, if I removed the where clause all values are returned but if I add a where clause then no records are returned?
I have run the query in sql and it works fine, I have done a response.write within the asp code so I know the value is being passed into the procedure parameter, the problem is it is as if it is getting lost somewhere during the procedure.
This is the stored procedure:
CREATE TABLE #CILTempItems
myID INT IDENTITY,
-- Insert the rows from tblItems into the temp. table
INSERT INTO #CILTempItems (row_id,NETWORK_ID,NODE_ID,CORP_ID,EMP_ID,CIL_ID,C IL_TYPE,CIL_KEY,CIL_DESC,CIL_BILL_FLAG,RENTAL,STAR T_DATE,END_DATE,username,action_date,user_action)
SELECT* FROM Employee_CIL WHERE NETWORK_ID = @NID
and this is the code in the asp page:
strSQL = "dbo.employee_cil_page " & currentPage & "," & iRecordsPerPage & "," & request("nid") & "," & request("cid") & "," & request("emp")
objRS.Open strSQL, objConn
As I say it works fine without the where clause so maybe the problem lies in trying to use it on a temp table.
Thanks for any help