1. SQL / Говнокод #19183

    −47

    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
    insert into @Res
    select
    'ИК/Уход за волосами' as name,
    (select COUNT(ID) from kb.SMS_SEND_LOG where DateTimeRequest between @DStart and @DEnd and MsgID = 50) as value
    
    insert into @Res
    select
    'ИК/Уход за лицом' as name,
    (select COUNT(ID) from kb.SMS_SEND_LOG where DateTimeRequest between @DStart and @DEnd and MsgID = 51) as value
    
    insert into @Res
    select
    'ИК/Уход за руками-ногами' as name,
    (select COUNT(ID) from kb.SMS_SEND_LOG where DateTimeRequest between @DStart and @DEnd and MsgID = 52) as value
    
    insert into @Res
    select
    'ИК/Уход за телом' as name,
    (select COUNT(ID) from kb.SMS_SEND_LOG where DateTimeRequest between @DStart and @DEnd and MsgID = 53) as value
    
    insert into @Res
    select
    'ИК/Врачебная косметология' as name,
    (select COUNT(ID) from kb.SMS_SEND_LOG where DateTimeRequest between @DStart and @DEnd and MsgID = 54) as value

    Наш ИТ директора нанял толкового парня.
    И так MsgID = 1..56
    226 строк кода.

    Запостил: joker63, 15 Декабря 2015

    Комментарии (2) RSS

    Добавить комментарий