Tags » Select

Select | Shoot Your First Handgun | Online Handgun Store | Lavonia - YouTube


Select | Shoot Your First Handgun | Online Handgun Store | Lavonia Tactical Guns and Gear Get the right gun for you! (706) 356-1042 http://tacticalgunsandgea&#8230… 8 more words

Online

How To Select Apples For Cooking & Baking

These days: How to pick apples for cooking and baking (and snacking).

Autumn is in complete swing, and we’ve been busy cooking and baking with the ideal of the season: apples. 32 more words

Women Ideas

Quote of the day: Jill Ellis

“When I went through the list, versatility was one of the determining factors, especially when it came down to the last spots. … Certainly with getting out of the friendly mode, where you can have six subs, and now getting into the three subs, it’s very important for us.” 34 more words

USWNT

MS SQL Server - генерация года и месяца в SQL-query

Случай, когда нужно сгенерировать год и месяц, используя только SQL-query:

SELECT SS.YYYY, TT.MM FROM
(SELECT 10*10*(a-1) + 10*(b-1) + (c-1) + 2000 AS YYYY FROM
(SELECT 1 a UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10) x
CROSS JOIN
(SELECT 1 b UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10) y
CROSS JOIN
(SELECT 1 c UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10) z
WHERE 10*10*(a-1) + 10*(b-1) + (c-1) <= (YEAR(GETDATE()) - 2000)) SS
,
(SELECT 10*10*(a-1) + 10*(b-1) + c AS MM FROM
(SELECT 1 a UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10) x
CROSS JOIN
(SELECT 1 b UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10) y
CROSS JOIN
(SELECT 1 c UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10) z
WHERE 10*10*(a-1) + 10*(b-1) + c <= 12) TT
ORDER BY SS.YYYY, TT.MM

YYYY  MM
.....      ....
2013    10
2013    11
2013    12
2014    1
2014    2
2014    3
2014    4
2014    5
2014    6
2014    7
2014    8
2014    9
2014    10
2014    11
2014    12
Mssql