20일까지 마쳐야 하는데 이걸 어떻게 오라클로 바꾸어야할지 몰겠읍니다
오라클도 능한분들에게 부탁드립니다
CREATE PROCEDURE MODEL_HISTORY_LIST
(
@CurrentPage int,
@RecordsPerPages int,
@MODEL_ID int
)
AS
/*OUTPUT:MaxLevel Tables, MaxVersion Table, Count, List Tabl
e*/
/* 변수 선언 */
declare @TotalRecords int
declare @SearchedRecords int
declare @SQLWhere varchar(1000)
declare @ViewName varchar(100)
declare @OrderClause varchar(100)
/* 테이블 정의.*/
SET @SQLWhere = ''
set @ViewName = '#MODEL_HISTORY_LISTVIEW1'
SET @OrderClause = ' HISTORY_DATE'
CREATE TABLE [#MODEL_HISTORY_LISTVIEW1] (
[HIST_ID] [int] NOT NULL ,
[OBJ_ID_PARENT] [int] NULL ,
[HISTORY_TYPE] [int] NULL ,
[HISTORY_DETAIL] [varchar] (200) COLLATE Korean_Wansung_CI_
AS NULL ,
[HISTORY_DATE] [varchar] (50) COLLATE Korean_Wansung_CI_AS
NULL ,
[EQP_MILEAGE] [int] NULL ,
[HISTORY_DESC] [varchar] (200) COLLATE Korean_Wansung_CI_AS
NULL ,
[TARGET_PART] [varchar] (200) COLLATE Korean_Wansung_CI_AS
NULL
) ON [PRIMARY]
INSERT INTO #MODEL_HISTORY_LISTVIEW1 SELECT * FROM MODEL_HIS
TORY
/* 검색어를 처리.*/
if @MODEL_ID>0
BEGIN
SET @SQLWhere = ' Where OBJ_ID_PARENT = ' + CONVERT(VARCHAR
, @MODEL_ID)
END
/* 공용 리스트 검색 루틴을 호출 */
EXEC CLASS_SearchedList @CurrentPage, @RecordsPerPages, @Vie
wName, @OrderClause, @SQLWhere, @TotalRecords OUTPUT, @Searc
hedRecords OUTPUT
GO
|