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 : ... 3711 : 3712 : 3713 : 3714 : 3715 : 3716 : 3717 : 3718 : 3719 : ... 6391 : Next »

블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2024/05   »
      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:
198532
Today:
240
Yesterday:
359