Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

problem in create table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
abiyn

New User


Joined: 25 Mar 2008
Posts: 12
Location: Chennai

PostPosted: Wed Mar 26, 2008 5:16 pm    Post subject: problem in create table
Reply with quote

Could you pls tell me what is wrong in this statement

CREATE TABEL TESTID AS (SELECT * FROM EMP_DETAIL)

I am getting the below error message

DSNT408I SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD AS. TOKEN FOR WAS
EXPECTED
DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR



Thanks in Advance
Regards

Abi
Back to top
View user's profile Send private message

UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Wed Mar 26, 2008 6:21 pm    Post subject:
Reply with quote

Hi abiyn !

Are you shure, you want to create a Table ???

CREATE VIEW viewname columnname,.. AS Subselect

Regards, UmeySan
Back to top
View user's profile Send private message
abiyn

New User


Joined: 25 Mar 2008
Posts: 12
Location: Chennai

PostPosted: Thu Mar 27, 2008 10:28 am    Post subject:
Reply with quote

Yes UmeySan

I want to create Materialized query table.

The syntax for that is

Create table tbname as (select column_name from tablename1).

But this is not working in Mainframe-DB2, But I have created the table using the same in Linux-Db2 environment.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us