-
DESC getting deleted from stored procedure
I am writing a stored procedure and trying to write the following query:
SELECT TOP 1 *
FROM schedule WITH (NOLOCK)
WHERE source_id = @iSourceID
AND air_date_time < @adtBegin
ORDER BY air_date_time DESC
Everytime a change the stored procedure I go back into the procedure and the DESC has disappeared. My DBA can make the change and it stays. Has anyone experienced this problem. I can't see this being a permission problem but maybe it is. I can update anything else in the stored procedure and it updates it. I can even do the following:
SELECT TOP 1 *
FROM schedule WITH (NOLOCK)
WHERE source_id = @iSourceID
AND air_date_time < @adtBegin
ORDER BY air_date_time --DESC
Comment it out and it STILL deletes it. Any help would be appreciated.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|