1. Список говнокодов пользователя Junior

    Всего: 2

  2. SQL / Говнокод #2518

    −859.4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    SET @DD = DATEPART(dd, GETDATE())
    SET @MM = DATEPART(mm, GETDATE())
    SET @YYYY = DATEPART(yyyy, GETDATE())
    
    IF LEN(@DD) = '1'
    	BEGIN
    		SET @DD = '0' + @DD
    	END
    IF LEN(@MM) = '1'
    	BEGIN
    		SET @MM = '0' + @MM
    	END
    
    SET @DT_D = @DD + '.' + @MM + '.' + @YYYY

    Изврат по превращению текущей даты в нужный формат в MSSQL

    Junior, 01 Февраля 2010

    Комментарии (1)
  3. SQL / Говнокод #2162

    −862.7

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    --...END OF STORED PROCEDURE...
    	-- WORK Table
    		DELETE	FROM	S_CLD011	
    		DELETE	FROM	S_COLOR
    		DELETE	FROM	S_CONTRACT
    		DELETE	FROM	S_CONVERT
    		DELETE	FROM	S_DEALER
    		DELETE	FROM	S_DIV021
    		DELETE	FROM	S_HISTORY	
    		DELETE	FROM	S_LOOKUP
    		DELETE	FROM	S_MODEL
    		DELETE	FROM	S_OPTION
    		DELETE	FROM	S_PAYINV
    		DELETE	FROM	S_PIV011	
    		DELETE	FROM	S_PIV021
    		DELETE	FROM	S_PRICE
    		DELETE	FROM	S_PORT	
    		DELETE	FROM	S_REG075
    		DELETE	FROM	S_SDS021
    		DELETE	FROM	S_SERIES
    		DELETE	FROM	S_SIS021
    		DELETE	FROM	S_STATUS
    		DELETE	FROM	S_SUPPLIER
    		DELETE	FROM	S_SYS021
    		DELETE	FROM	S_USER
    
    		CLOSE c1
    		DEALLOCATE c1
    		CLOSE c1V
    		DEALLOCATE c1V
    		CLOSE c2
    		DEALLOCATE c2
    		CLOSE c2V
    		DEALLOCATE c2V

    а таблички так в базе и висят... куча пустых табличек

    Junior, 20 Ноября 2009

    Комментарии (5)