database.sarang.net
UserID
Passwd
Database
DBMS
ㆍMySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
MySQL Q&A 30618 게시물 읽기
No. 30618
cursor 2개 사용할 수 없나요?
작성자
최진안
작성일
2013-07-22 16:11
조회수
8,895

/**  관심수 **/

declare wish_cnt1 int default 0;

declare wish_cnt2 int default 0;

declare wish_cnt3 int default 0;

declare m_wishcol varchar(14);

declare m_wish int default 0;

/** 추천수 **/

declare reomm_cnt1 int default 0;

declare reomm_cnt2 int default 0;

declare reomm_cnt3 int default 0;

declare m_reommcol varchar(14);

declare m_reomm int default 0;

/** 광고집행 **/

declare adver_cnt1 int default 0;

declare adver_cnt2 int default 0;

declare adver_cnt3 int default 0;

declare m_advercol varchar(14);

declare m_adver int default 0;

 

 

declare cursor_link CURSOR FOR SELECT date_format(gou_wdate,'%Y%m%d%H%i%S') gou_wdate FROM goods_url WHERE gou_codi_gcseq = seq and gou_type='codi' and gou_wdate > f_dategubun(day3,'-');

declare continue handler for not found set m_link:=1;

declare cursor_wish CURSOR FOR SELECT mcw_wdate FROM mem_codi_wish WHERE gc_seq = seq and mcw_wdate > day3;

declare continue handler for not found set m_wish:=1;

 

declare cursor_reomm CURSOR FOR SELECT mcr_wdate FROM mem_codi_recomm WHERE gc_seq = seq and mcr_wdate > day3;

declare continue handler for not found set m_reomm:=1;

 

declare cursor_adver CURSOR FOR SELECT date_format(gou_wdate,'%Y%m%d%H%i%S') gou_wdate FROM goods_url WHERE gc_seq = seq and gou_type='codi' and gou_wdate > f_dategubun(day3,'-');

declare continue handler for not found set m_adver:=1;

 

위 형식으로 2개 이상을 사용할 수 없나요?

[Top]
No.
제목
작성자
작성일
조회
30621쿼리 무엇이 잘못 된 것 일까요? [2]
이형준
2013-07-31
8842
30620최근시간 항목 가져오기 [2]
강선홍
2013-07-30
8994
30619서브 쿼리문을 알고 싶습니다. [3]
이형준
2013-07-24
8793
30618cursor 2개 사용할 수 없나요?
최진안
2013-07-22
8895
30617프로시저 cron 으로 돌리기 ? [1]
최진안
2013-07-20
8766
30616mysql 한글처리문제 [1]
haes
2013-07-19
8833
30615에러 로그 및 lock 관련 문의 [2]
익명
2013-07-15
10406
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2023 DSN, All rights reserved.
작업시간: 0.048초, 이곳 서비스는
	PostgreSQL v16.1로 자료를 관리합니다