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
운영게시판
최근게시물
Informix Q&A 1920 게시물 읽기
No. 1920
view table 생성
작성자
김영민
작성일
2004-01-16 15:19
조회수
6,737

아래의 view table 생성구문으로 view table 생성시 error 가

발생을  합니다.  Informix 에서는 union 처리되었을경우  view table 을

생성할수 없는것인가요...

고수님들의 답변 부탁합니다.

 

create view view_in_out
 (
    cust_no    ,
    part_no    ,
    standard   ,
    color_no   ,
    input_qty  ,
    output_qty
 ) as
    select a.order_no[6,7] ,
           a.part_no       ,
           a.standard      ,
           a.color_no      ,      
           sum(a.input_qty),
           0 as out_qty
      from input a
     where a.order_no[1,1] = 'W'
       and a.inout_div     = '1'
     group by 1,2,3,4
union 
    select a.cust_no       ,
           a.part_no       ,
           a.standard      ,
           a.color_no      ,      
           0 in_qty        ,
           sum(a.input_qty)
      from input a
     where a.order_no[1,1] <> 'W'
       and a.inout_div      = '2'
       and a.cust_no in ( '112' , '106' , '116' , '939' )
     group by 1,2,3,4 ;

이 글에 대한 댓글이 총 1건 있습니다.

참고하세요 ^^

============================================================================

Subset of a SELECT Allowed in CREATE VIEW
The SELECT statement has the form that is described on page 1-459, but in
CREATE VIEW, it cannot have an ORDER BY clause, INTO TEMP clause, or
UNION operator. Do not use display labels in the select list; display labels are
interpreted as column names.

============================================================================

 

FROM BY DYSSE [ http://www.informix.we.ro ]

딧세(hanulso)님이 2004-01-16 17:43에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
1928백정현님의 인라인 뷰에 관한 글 이동.
정재익
2004-01-20
6090
1923에러코드 0번 [2]
아름이
2004-01-17
5784
1921matches 를 사용할 때
그래나야
2004-01-16
5238
1920view table 생성 [1]
김영민
2004-01-16
6737
1918자바에서 TEMP 테이블을 사용하려 하는데 가능한지요? [1]
김승수
2004-01-15
5613
1917오라클의 connect by 기능 알고 싶어요..
임지혁
2004-01-15
5306
1916[도와주셈] connect error
떡쇠
2004-01-14
5568
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.023초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다