Thursday, September 11

Hello World

I just found the first cute little bit of SQL I ever wrote at work, on the 6th of October 2004;

USE Scott_Test
DECLARE @TestNum INT
   SET
@TestNum = 1047
SELECT SHID_ID, SHID_Complete, SHID_SMPNo, SHID_Date, SHID_TotalShares, SHID_PortionAnalyzed,
        
SHID_complete, SHID_NoExtracts, SHID_EnteredBy, SHID_ReportSentDate,
        
SHID_ReportSentBy, SHID_Stage
  
FROM Shid
  
WHERE SHID_COID = @TestNum
      
AND SHID_Stage <> 0
  
ORDER BY SHID_ID DESC
SELECT
SHID_ID, SHID_Date, SHID_InternalDeadLine, SHID_CompletionDate, SHID_Benchmark,
        
SHID_NoExtracts, Shid_Comment
  
FROM Shid
  
WHERE SHID_COID = @TestNum
      
AND SHID_Stage = 0
  
ORDER BY SHID_ID ASC
        

No comments: