|
|
|
|
À¯¼º°ü / 2000-01-17 / ¿ÀÈÄ 7:20:18 / 211.38.164.148
Á¶È¸¼ö : 144
|
[Áú¹®] ASP ¿¡¼ SQL °á°ú°ª Àоî¿À´Â ¹æ¹ý.... |
¾È³çÇϼ¼¿ä. ¼ö°í°¡ ¸¹À¸½Ê´Ï´Ù. ^^
´Ù¸§ÀÌ ¾Æ´Ï±¸¿ä... ´ÙÀ½°ú °°Àº ÁúÀǸ¦ Çß½À´Ï´Ù.
select date, mdcode, section, total = sum(sale) from chul00003200001t where date>='2000-01-01' and date<='2000-01-16' and mdcode='0001' and section='Á¤»ó' group by mdcode, section, date with rollup
±×¸®°í ±×¿¡ ´ëÇÑ ÁúÀÇ °á°ú´Â ´ÙÀ½°ú °°½À´Ï´Ù.
date mdcode section total
-------------------- -------------------- -------------------- ------------------------------------------
2000-01-02 0001 Á¤»ó 70400
2000-01-03 0001 Á¤»ó 0
2000-01-04 0001 Á¤»ó 32200
2000-01-05 0001 Á¤»ó 11700
2000-01-06 0001 Á¤»ó 15600
2000-01-07 0001 Á¤»ó 46600
2000-01-08 0001 Á¤»ó 37600
2000-01-09 0001 Á¤»ó 63200
2000-01-10 0001 Á¤»ó 67100
2000-01-11 0001 Á¤»ó 16000
2000-01-12 0001 Á¤»ó 3000
2000-01-13 0001 Á¤»ó 29100
2000-01-14 0001 Á¤»ó 22000
2000-01-15 0001 Á¤»ó 150000
2000-01-16 0001 Á¤»ó 364100
(null) 0001 Á¤»ó 928600
(null) 0001 (null) 928600
(null) (null) (null) 928600
(18 row(s) affected)
Á¦°¡ ¾Ë°í½ÍÀº°Ç¿ä... ÀúÀ§ÀÇ ÁúÀÇ °á°úÁß¿¡¼ ¸Ç ¾Æ·¡ ³ª¿À´Â '928600'ÀÇ ¼öÄ¡¸¸ ²¨³»¿À°í ½ÍÀº°Ì´Ï´Ù.
±âÁ¸¿¡
sql = "select ex from table where ........"
set rs = db.execute(sql)
ÇÏ´Â ½ÄÀ¸·Î ex°ªÀ» ²¨³»¿À°í ½ÍÀ»¶§´Â
rs(0)
ÀÌ·±½ÄÀ¸·Î Çߴµ¥¿ä..... À§¿Í°°ÀÌ ±×·ìÀ» »ç¿ëÇؼ °è»êµÇ¾îÁø ¼öÄ¡¸¦ µü ÀÐÀ»¶§´Â ¾îÂîÇØ¾ß ÇÒÁö ¸ð¸£°Ú½À´Ï´Ù.
Áú¹®Çϸ鼵µ ÂÍ Ã¬ÇÇÇϱº¿ä...
µµ¿ÍÁÖ½Ã¸é °í¸¿°Ú½À´Ï´Ù. ^^ |
|
|
|