I cannot seem to get the correct results.
I enter the file number A28402602 into the user prompt and no records are found. It should return around 30 results.
This works from MS Query Manager.
Thanks
John Fuhrman
I enter the file number A28402602 into the user prompt and no records are found. It should return around 30 results.
Code:
ALTER FUNCTION [dbo].[Test]
(
-- Add the parameters for the function here
@p1 varchar
)
RETURNS TABLE
AS
RETURN
(
SELECT TOP 100 PERCENT Tracking_ID, EmployeeID, MachineName, BoxNumber, FileNumber, TrackingDate
FROM dbo.tblTrackingTable
WHERE (FileNumber like @p1)
ORDER BY TrackingDate DESC
)
This works from MS Query Manager.
Code:
SELECT TOP 100 PERCENT Tracking_ID, EmployeeID, MachineName, BoxNumber, FileNumber, TrackingDate
FROM dbo.tblTrackingTable
WHERE (FileNumber like 'A28402602')
ORDER BY TrackingDate DESC
Thanks
John Fuhrman