If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > ERROR while using VARCHAR2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-09, 05:04
vgr12386 vgr12386 is offline
Registered User
 
Join Date: Aug 2009
Posts: 6
Exclamation ERROR while using VARCHAR2

hi i tried using VARCHAR2 and this is the error i got:

Code:
create table tst (name VARCHAR2(30));

DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL0104N  An unexpected token "VARCHAR2" was found following "eate table TST
(name".  Expected tokens may include:  "VARCHAR".  SQLSTATE=42601
Have any of you'll got similar errors?

im am currently using Db2 version 9.1.2 on an AIX server
Reply With Quote
  #2 (permalink)  
Old 08-10-09, 05:07
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
VARCHAR2 is not a valid data type in standard SQL and DB2's dialect.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 08-10-09, 10:05
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
VARCHAR2 is supported in V9.7, but not before then.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #4 (permalink)  
Old 08-10-09, 12:13
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I stand corrected. I just checked V9.1 and V9.5 manuals...
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 08-10-09, 13:28
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Version 9.7 has a wide variety of Oracle compatibility features, including CLP Plus, that would be helpful to Oracle DBA's not familar with DB2.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On