WITH() AS() 예제

WITH APP_CUSTOM( ADIDX, ADSPONSORNAME, ADTYPE, ADPHONE ) AS (



SELECT idx as 'adidx', adcompanyname as 'adsponsorname', adtype1 as 'adtype', adphone as 'adphone'
FROM TBL_ADVERTISING_MEMBER
union all
SELECT '0' as 'adidx', pubname as 'adsponsorname',
( SELECT SESE_NAME FROM tbl_addtel_upjong where sese_code = ATB.Yp) as 'adtype',
( AreaCode + '-' + TelKuk + '-' + TelNo ) as 'adphone'
FROM TBL_ADDTELBOOK AS ATB


)
select * from
( select ADIDX, ADSPONSORNAME, ADTYPE, ADPHONE,row_number() over ( order by ADSPONSORNAME asc ) as 'ROWNUMBER'
from APP_CUSTOM
) as a where ROWNUMBER < 100
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2007/10/08 17:00 2007/10/08 17:00
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2706

Trackback URL : http://tcbs17.cafe24.com/tc/trackback/2706

« Previous : 1 : ... 70 : 71 : 72 : 73 : 74 : 75 : 76 : 77 : 78 : ... 120 : Next »

블로그 이미지

- 홍반장

Archives

Recent Comments

  1. 1 pHqghUme 01/05
  2. 1 pHqghUme 01/05
  3. 1 pHqghUme 01/05
  4. 1 pHqghUme 01/05
  5. 1 pHqghUme 01/05

Calendar

«   2025/12   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Statistics Graph

Site Stats

Total hits:
331240
Today:
30
Yesterday:
254