»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

ÁÖ´ÜÀ§ SQL¹® Áú¹®ÀÔ´Ï´Ù..^^;6

  • classicASP
  • µî·ÏÀÏ 2015-01-30 15:43
  • Á¶È¸¼ö 977
³»°øÀÌ ºÎÁ·ÇÏ¿© ¸Ó¸´¼ÓÀ¸·Î ¾Æ¹«¸® »ý°¢ÇغÁµµ ´äÀÌ ¾Èº¸¿©¼­ ÈùÆ®¶óµµ ¾ò°íÀÚ Áú¹®±ÛÀ» ¿Ã·Áº¾´Ï´Ù.

ÁÖ´ÜÀ§·Î µ¹¾Æ°¡´Â ÀÏÁ¤ÀÌ ÀÖ´Ù°í °¡Á¤ÇÕ´Ï´Ù. ¿ù ¼ö ±Ý ½ÃÀÛÀÏÀº 1¿ù 10ÀÏ Á¾·áÀÏÀº 1¿ù 30ÀÏ

ÈÞÀÏ Á¦¿ÜÇÏ°í ÇØ´çÇÏ´Â ³¯Â¥¸¦ »Ì½À´Ï´Ù.

±×·³ ±×Áß¿¡ 10¹ø° ÇØ´çÇÏ´Â ³¯Àº ¾ðÁ¦Àΰ¡? ÇÏ´Â ¹®Á¦´Â ÇØ°áÇß½À´Ï´Ù.

DBMS´Â MSSQL 2005ÀÔ´Ï´Ù.

;WITH X (TODAY,WEEKNAMES,SORTDATE) AS (
SELECT DD.TODAY,DATENAME(DW,DD.TODAY) AS WEEKNAMES,ROW_NUMBER() OVER(ORDER BY DD.TODAY ASC) AS SORTDATE
FROM ADATE DD
WHERE DD.TODAY BETWEEN '2015-01-10 00:00:00.000' AND '2015-01-30 23:59:59.000'
AND replace(datename(dw,DD.today),'¿äÀÏ','') in ('¿ù','¼ö','±Ý')
AND DD.TODAY NOT IN (SELECT TODAY FROM HOLIDAYS WHERE CONVERT(CHAR(4),TODAY,121) = '2015')
) SELECT * FROM X WHERE SORTDATE = 10

ÀÌ·±½ÄÀ¸·Î »Ì¾Æ¿Ã¼ö ÀÖ½À´Ï´Ù.

WHEREÀý REPLACE´Â ÇöÀç Å×ÀÌºí »óȲÀ¸·Î ÀÎÇؼ­..¤Ð¤Ð

ÀÌÁ¦ ¹®Á¦´Â ÀÌ°Ô 2ÁÖ´ÜÀ§·Î µÆÀ»¶§ ¾î¶»°Ô °è»ê ÇÒ²¨³Ä´Â°Ì´Ï´Ù.

¿ù¼ö±Ý / È­¸ñ ÀÌ·±½ÄÀ¸·Î 2ÁÖ´ÜÀ§·Î µ¹¾Æ°¬À»¶§ Àú ¸®½ºÆ®¸¦ ¾î¶»°Ô »ÌÀ»Áö µµÅë °¨ÀÌ ¾ÈÀâÈü´Ï´Ù.

½ÃÀÛÇÏ´Â ÁÖÀÇ ¼ýÀÚ¸¦ °è»êÇؿͼ­ 2·Î ³ª´² ³ª¸ÓÁö °ªÀ» °è»êÇÏ°í ¿äÀϺ° ³¯Â¥ Äõ¸®¸¦ »ÌÀ»¶§ °¢°¢ ÁÖ´ÜÀ§°ªÀ» ³ª´²¼­ ³ª¸ÓÁö°ªÀÌ ½ÃÀÛÇÏ´Â ÁÖ¿Í µ¿ÀÏÇÑ°æ¿ì¸¸ °Ë»öµÇµµ·Ï Çؼ­

¾çÂÊ °Ë»ö°ªÀ» Çϳª·Î Á¤·ÄÇØÁÖ¸é µÉ²¨¶ó°í »ý°¢¸¸ ÇÏ°í ÀÖ½À´Ï´Ù..;;

ÇѸ¶µð·Î ÁÖ´ÜÀ§°¡ 1/3/5/6/7       2/4/6/8/10 ¿¡ ÁÖÀÇ ³¯Â¥¸¸ °¡Á®¿À°Ô²û Çؼ­ Çϳª·Î ÇÕÄ£´Ù´Â°ÅÁÒ °¡´ÉÇÑÁö´Â ¾ÆÁ÷ ¼ÕÀ» ¾È´ëºÃ½À´Ï´Ù¸¸..¤Ð¤Ð

À§ Äõ¸®¹®¿¡ ´ëÇÑ Á¶¾ðÀ̳ª ¾Æ·¡ 2ÁÖ´ÜÀ§ ¹®Á¦¿¡ ´ëÇÑ ÀÛÀº Á¶¾ðÀÌ¶óµµ ^^;

¸Ó¸®°¡ ³ªºü¼­ ½ºÆ®·¹½º¸¸ ¹Þ³×¿ä..¤¾¤¾;

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 classicASP

´Ù¸¥ÀÇ°ß 0 Ãßõ 1 ÀÛÀº¾ß¼ö

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 classicASP

´Ù¸¥ÀÇ°ß 0 Ãßõ 2 ARMADA700

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 classicASP

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ÀÛÀº¾ß¼ö
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û ¸ñ·Ïº¸±â