Re: Columns defined with double quotes.

Re: Columns defined with double quotes.

 

  


The book to check is the SQL Reference, and the double quotes are called
delimited identifiers to distinguish them from
strings. This is a standards compliance item as well as part of DB2 from
Version 1 onward. Here are the V7 books:
http://www.ibm.com/software/data/db2/zos/v7books.html

Get the latest V7 SQL Reference, updated in Feb 2007, then find identifiers
and delimited identifiers, Acrobat page 52 - 53 or
pages listed as pages 30 - 31:
http://publib.boulder.ibm.com/cgi-bin/bookmgr/download/dsnsqh16.pdf

You could also check the Cross-Platform SQL Reference: Acrobat page 54.

ftp://ftp.software.ibm.com/ps/products/db2/info/xplatsql/pdf/en_US/cpsqlrv2.pdf

I hope your company is moving from V7 to V8 soon, so you can move up from
the 2001 version to the 2004 version, and then
think about the 2007 version later. V7 goes out of service in less than a
year.

Roger





"JAMES PARK "
<db2udbdba-ezmlms
hield-x954317.x11 To
[Email Address Removed] "LazyDBA Discussion"
com> <[Email address protected]
cc
08/29/2007 11:02
AM Subject
Columns defined with double quotes.










Thanks Bruce, Jose and Edwards for answering my previous question on SQLID.


DB2 V7 on z/OS.

I have seen columns with " " in create table DDL as below.
Two columns are defined with double quotes while the other three without.
CREATE TABLE Q.OBJECT_DATA
(OWNER CHAR(8) FOR SBCS DATA NOT NULL ,
"NAME" VARCHAR(18) FOR SBCS DATA NOT NULL ,
"TYPE" CHAR(8) FOR SBCS DATA NOT NULL ,
SEQ SMALLINT NOT NULL ,
APPLDATA LONG VARCHAR FOR BIT DATA WITH DEFAULT NULL
)
IN DSQDBCTL.DSQTSCT3
AUDIT NONE
DATA CAPTURE NONE
CCSID EBCDIC;

Is the syntax right? DB2 Universal Database V8.1 certificate exam book
doesn't show any sample of column names with double quote. But the DDLs one
of DBAs used have columns with double quote. If the syntax is right what is
the difference with and without double quotes?

Thanks,

James Park
Database Specialist II
Annapolis Data Center
410-260-7489
[Email address protected]




------------------------------------------------------------------------------

This email and any file transmitted with it may be confidential and are
intended solely for the use of the individual or entity to whom they are
addressed. If you received this email in error, please notify the
Comptroller's System Manager by forwarding this message to [Email address
protected]
==============================================================================




This footnote also confirms that this email message has been swept by the
networkmaryland MIMEsweeper for the presence of computer viruses.

**********************************************************************



---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


DB2 & UDB email list listserv db2-l LazyDBA home page