임시테이블 & 레코드수 채우기

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go



--------------------------------------------------------



CREATE PROC [dbo].[up_main_update]

AS
SET NOCOUNT ON

declare @totalcount int, @chk_num int

CREATE TABLE #Notice(
[idx] [int] IDENTITY(1,1) NOT NULL,
[Gubun] [nvarchar] (10) NULL,
[seq] [int] NULL,
[Title] [nvarchar](50) COLLATE Korean_Wansung_CI_AS NULL,
[RegDate] [nvarchar] (10) NULL

)



insert into #Notice select gubun, seq, title, regdate from
(
select top 3 'notice' as 'gubun', seq,title,right(replace(convert(varchar(10),regdate,111),'/','.'),8) as 'regdate'
from notice where seq in (select top 5 seq from notice where status = '1' and len(title) > 0 order by rank desc,seq desc )
union
select top 2 'event' as 'gubun', seq,title,right(replace(convert(varchar(10),regdate,111),'/','.'),8) as 'regdate'
from event where seq in (select top 5 seq from event where status = '1' and len(title) > 0 order by seq desc )
) as a order by regdate desc

set @totalcount = @@rowcount
set @chk_num = 0
while(@totalcount < 5)
begin
if(@chk_num = 0 and @totalcount = 0 )
begin
--insert into #Notice select 'notice' as 'gubun', '0','등록된 자료가 없습니다.',right(replace(convert(varchar(10),getdate(),111),'/','.'),8) as 'regdate'
insert into #Notice select 'notice' as 'gubun', '0','undefined', 'undefined' as 'regdate'
end
else
begin
-- insert into #Notice select 'notice' as 'gubun', '0','undefined',right(replace(convert(varchar(10),getdate(),111),'/','.'),8) as 'regdate'
insert into #Notice select 'notice' as 'gubun', '0','undefined', 'undefined' as 'regdate'
end

print @totalcount

set @totalcount = @totalcount + 1
set @chk_num = @chk_num + 1
end




select * from #Notice order by idx

drop table #Notice

--------------------------------------------------------
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2007/08/01 17:25 2007/08/01 17:25
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2578

임시테이블 생성/사용

-- 임시 테이블 생성
CREATE TABLE #SETTLE_DAILY (
TARGET_DATE VARCHAR(10) NOT NULL ,
TOT_CNT INT DEFAULT NULL ,
TOT_PRECNT INT DEFAULT NULL ,
TOT_GOCNT INT DEFAULT NULL ,
TOT_PRICE INT DEFAULT NULL ,
TOT_PREPRICE INT DEFAULT NULL ,
TOT_GOPRICE INT DEFAULT NULL
)
CREATE TABLE #SETTLE_CHK (
TARGET_DATE VARCHAR(10) NOT NULL
)


-- 임시 테이블 삭제
DROP TABLE #SETTLE_DAILY
DROP TABLE #SETTLE_CHK
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2007/08/01 17:17 2007/08/01 17:17
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2577

성능테스트 - JMeter

성능테스트 툴 - JMeter


다운로드 : http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi

Manual : JMeter Manual



참고 : http://wiki.javajigi.net/display/IDE/JMeter

JUnit - http://junit.org/
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2007/08/01 14:34 2007/08/01 14:34
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2576

사람들의 대응방식은 생각과 감정,
그리고 그에 따른 행동에 의해 전적으로 결정된다.
좋건 나쁘건 상관없이 감정의 95%는
어떤 일이 벌어졌을 때
이를 어떻게 받아들이는 지에 따라 달라진다.

- 긍정 심리학자, 마틴 셀리그만

이 논리를 따르면 기분 나쁜 일도 내가 그렇게 만든 것이고,
기분이 좋은 일도 결국 내가 만든 일이라 할 수 있습니다.
문제의 핵심은 부정적 감정은 저조한 실적을 낳고
긍정적 감정은 훌륭한 업적을 만들어 낸다는 것입니다.
결국 마음먹기에 모든 것이 달려 있습니다.
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2007/08/01 10:05 2007/08/01 10:05
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2575

희망이란

희망이란
본래 있다고도 할 수 없고 없다고도 할 수 없다.
그것은 마치 땅 위의 길과 같은 것이다.
본래 땅 위에는 길이 없었다.
한 사람이 먼저 가고
걸어가는 사람이 많아지면
그것이 곧 길이 되는 것이다.


- 루쉰의《고향》중에서 -


* 그렇습니다.
희망은 처음부터 있었던 것이 아닙니다.
아무것도 없는 곳에서도 생겨나는 것이 희망입니다.
희망은 희망을 갖는 사람에게만 존재합니다.
희망이 있다고 믿는 사람에게는 희망이 있고,
희망 같은 것은 없다고 생각하는 사람에게는
실제로도 희망은 없습니다.
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2007/08/01 09:57 2007/08/01 09:57
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2574


블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2007/08   »
      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:
188023
Today:
209
Yesterday:
614