(Off-topic) Request for an old post on SQL reserved words.

Suresh Sane

(Off-topic) Request for an old post on SQL reserved words.
Team - I am looking for a really old post (could be 10 years or so). I think it may have been from Lockwood Lyon but I am not sure. Basically, it was using reserved words in SQL such as creating a table called "table" or naming a column as "integer" etc. It was quite amusing!


Anyone recall and have it saved?


Thx

Suresh

Mike Vaughan

(Off-topic) Request for an old post on SQL reserved words.
(in response to Suresh Sane)
I believe this might be the one you are thinking of?


Classification: Public

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf Of Lyon, Lockwood
Sent: Tuesday, February 10, 2009 7:10 AM
To: [login to unmask email]
Subject: Re: [DB2-L] [z/OS] DB2 Keywords List?

Dear Esteemed List:

Since the topic of Reserved Words has arisen again, I shamelessly pull out a copy of this old chestnut.



I attempted the following today (DB2 V8 NFM for z/OS):

CREATE TABLE FROM
(SELECT CHAR (7) NOT NULL,
WHERE CHAR (7) NOT NULL,
AND CHAR (7) NOT NULL,
BETWEEN CHAR (7) NOT NULL,
EQUALS CHAR (7) NOT NULL,
NULL CHAR (7))
IN ... ;

DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0

It was successful! (This was quite a surprise. I thought you had to enclose column names in quotes ("") if they were Reserved Words. I also thought that 'CREATE TABLE FROM' would generate a syntax error.)

I then inserted this row:

INSERT INTO FROM VALUES
('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ;

And now, the finale, my Reserved Word Query executed in SPUFI, with the
result:

SELECT SELECT
FROM FROM
WHERE NOT WHERE = EQUALS
AND NOT AND NOT BETWEEN AND AND BETWEEN AND NOT NULL IS NOT NULL ;


SELECT
---------+---
SELECT



Lock Lyon
Fifth Third Bancorp

-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [login to unmask email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://www.principal.com/do-not-contact-form any time.

If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://www.principal.com/do-not-email-request-canadian-residents any time.

Roy Boxwell

(Off-topic) Request for an old post on SQL reserved words.
(in response to Suresh Sane)
One of mine at the end...

Roy Boxwell
SOFTWARE ENGINEERING GmbH and SEGUS Inc.
-Product Development-
Heinrichstrasse 83-85
40239 Düsseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]<mailto:[login to unmask email]>
http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert

On 25 Oct 2017, at 19:11, suresh sane <[login to unmask email]<mailto:[login to unmask email]>> wrote:


Team - I am looking for a really old post (could be 10 years or so). I think it may have been from Lockwood Lyon but I am not sure. Basically, it was using reserved words in SQL such as creating a table called "table" or naming a column as "integer" etc. It was quite amusing!


Anyone recall and have it saved?


Thx

Suresh

-----End Original Message-----

Phil Grainger

(Off-topic) Request for an old post on SQL reserved words.
(in response to Mike Vaughan)
Such a shame you can't replace = with EQUALS

Sent using OWA for iPad
________________________________________
From: Vaughan, Mike <[login to unmask email]>
Sent: 25 October 2017 18:36:04
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.

I believe this might be the one you are thinking of?


Classification: Public

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf Of Lyon, Lockwood
Sent: Tuesday, February 10, 2009 7:10 AM
To: [login to unmask email]
Subject: Re: [DB2-L] [z/OS] DB2 Keywords List?

Dear Esteemed List:

Since the topic of Reserved Words has arisen again, I shamelessly pull out a copy of this old chestnut.



I attempted the following today (DB2 V8 NFM for z/OS):

CREATE TABLE FROM
(SELECT CHAR (7) NOT NULL,
WHERE CHAR (7) NOT NULL,
AND CHAR (7) NOT NULL,
BETWEEN CHAR (7) NOT NULL,
EQUALS CHAR (7) NOT NULL,
NULL CHAR (7))
IN ... ;

DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0

It was successful! (This was quite a surprise. I thought you had to enclose column names in quotes ("") if they were Reserved Words. I also thought that 'CREATE TABLE FROM' would generate a syntax error.)

I then inserted this row:

INSERT INTO FROM VALUES
('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ;

And now, the finale, my Reserved Word Query executed in SPUFI, with the
result:

SELECT SELECT
FROM FROM
WHERE NOT WHERE = EQUALS
AND NOT AND NOT BETWEEN AND AND BETWEEN AND NOT NULL IS NOT NULL ;


SELECT
---------+---
SELECT



Lock Lyon
Fifth Third Bancorp

-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [login to unmask email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://urldefense.proofpoint.com/v2/url?u=https-3A__www.principal.com_do-2Dnot-2Dcontact-2Dform&d=DwICAg&c=UrUhmHsiTVT5qkaA4d_oSzcamb9hmamiCDMzBAEwC7E&r=EAGrd_qzLADPfI8dgytr8sbCG7_U9QfXwQMLgK1Zo30&m=-g6eEsXEKpYfpNA4szVL2Tp2MGfXRmz78TM6B83iyIA&s=d24V6-y19OqHAS34P4urY4rREPqlPGsVL5ldNmVizRQ&e= any time.

If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://urldefense.proofpoint.com/v2/url?u=https-3A__www.principal.com_do-2Dnot-2Demail-2Drequest-2Dcanadian-2Dresidents&d=DwICAg&c=UrUhmHsiTVT5qkaA4d_oSzcamb9hmamiCDMzBAEwC7E&r=EAGrd_qzLADPfI8dgytr8sbCG7_U9QfXwQMLgK1Zo30&m=-g6eEsXEKpYfpNA4szVL2Tp2MGfXRmz78TM6B83iyIA&s=MQKWmC_qmR-HZJjMSgIs_P2mvhxTpDqRoB8BCjhwSwM&e= any time.

-----End Original Message-----

BMC Software Limited Registered Office: Building E2, Eskdale Road, Winnersh, Wokingham, Berkshire, United Kingdom, RG41 5TS Registered in England No. 1927903 The content of this email is confidential. If you are not the addressee, you may not distribute, copy or disclose any part of it. If you receive this message in error, please delete this from your system and notify the sender immediately.

Suresh Sane

(Off-topic) Request for an old post on SQL reserved words.
(in response to Mike Vaughan)
This is it. Thank you for sharing. I will see if V12 has made it more restrictive.


Thx

Suresh


________________________________
From: Vaughan, Mike <[login to unmask email]>
Sent: Wednesday, October 25, 2017 5:36 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.

I believe this might be the one you are thinking of?


Classification: Public

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf Of Lyon, Lockwood
Sent: Tuesday, February 10, 2009 7:10 AM
To: [login to unmask email]
Subject: Re: [DB2-L] [z/OS] DB2 Keywords List?

Dear Esteemed List:

Since the topic of Reserved Words has arisen again, I shamelessly pull out a copy of this old chestnut.



I attempted the following today (DB2 V8 NFM for z/OS):

CREATE TABLE FROM
(SELECT CHAR (7) NOT NULL,
WHERE CHAR (7) NOT NULL,
AND CHAR (7) NOT NULL,
BETWEEN CHAR (7) NOT NULL,
EQUALS CHAR (7) NOT NULL,
NULL CHAR (7))
IN ... ;

DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0

It was successful! (This was quite a surprise. I thought you had to enclose column names in quotes ("") if they were Reserved Words. I also thought that 'CREATE TABLE FROM' would generate a syntax error.)

I then inserted this row:

INSERT INTO FROM VALUES
('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ;

And now, the finale, my Reserved Word Query executed in SPUFI, with the
result:

SELECT SELECT
FROM FROM
WHERE NOT WHERE = EQUALS
AND NOT AND NOT BETWEEN AND AND BETWEEN AND NOT NULL IS NOT NULL ;


SELECT
---------+---
SELECT



Lock Lyon
Fifth Third Bancorp

-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [login to unmask email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://www.principal.com/do-not-contact-form any time.

If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://www.principal.com/do-not-email-request-canadian-residents any time.

-----End Original Message-----

Suresh Sane

(Off-topic) Request for an old post on SQL reserved words.
(in response to Mike Vaughan)
Thanks Mike. For what it's worth, it still works on DB2 z/OS V12.


Thx

Suresh

________________________________
From: Vaughan, Mike <[login to unmask email]>
Sent: Wednesday, October 25, 2017 5:36 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.

I believe this might be the one you are thinking of?


Classification: Public

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf Of Lyon, Lockwood
Sent: Tuesday, February 10, 2009 7:10 AM
To: [login to unmask email]
Subject: Re: [DB2-L] [z/OS] DB2 Keywords List?

Dear Esteemed List:

Since the topic of Reserved Words has arisen again, I shamelessly pull out a copy of this old chestnut.



I attempted the following today (DB2 V8 NFM for z/OS):

CREATE TABLE FROM
(SELECT CHAR (7) NOT NULL,
WHERE CHAR (7) NOT NULL,
AND CHAR (7) NOT NULL,
BETWEEN CHAR (7) NOT NULL,
EQUALS CHAR (7) NOT NULL,
NULL CHAR (7))
IN ... ;

DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0

It was successful! (This was quite a surprise. I thought you had to enclose column names in quotes ("") if they were Reserved Words. I also thought that 'CREATE TABLE FROM' would generate a syntax error.)

I then inserted this row:

INSERT INTO FROM VALUES
('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ;

And now, the finale, my Reserved Word Query executed in SPUFI, with the
result:

SELECT SELECT
FROM FROM
WHERE NOT WHERE = EQUALS
AND NOT AND NOT BETWEEN AND AND BETWEEN AND NOT NULL IS NOT NULL ;


SELECT
---------+---
SELECT



Lock Lyon
Fifth Third Bancorp

-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [login to unmask email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://www.principal.com/do-not-contact-form any time.

If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://www.principal.com/do-not-email-request-canadian-residents any time.

-----End Original Message-----

Roy Boxwell

(Off-topic) Request for an old post on SQL reserved words.
(in response to Suresh Sane)
Found my old one as well..

DROP TABLE SELECT ;
CREATE TABLE SELECT (NULL CHAR (3),NOT CHAR (3),IS CHAR (2));
INSERT INTO SELECT VALUES ('ABC','XYZ','IS');
SELECT NULL
FROM SELECT
WHERE NULL IS NOT NULL
AND IS = IS
AND NOT NOT = NOT;

DROP TABLE FROM ;
CREATE TABLE FROM
(SELECT CHAR(7) NOT NULL,
WHERE CHAR(7) NOT NULL,
AND CHAR(7) NOT NULL,
BETWEEN CHAR(7) NOT NULL,
EQUALS CHAR(7) NOT NULL,
NULL CHAR(7))
;
INSERT INTO FROM VALUES
('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ;
SELECT SELECT
FROM FROM
WHERE NOT WHERE = EQUALS
AND NOT AND NOT BETWEEN AND AND BETWEEN
AND NOT NULL IS NOT NULL ;

This is both of the SQLs and the DROPs work as well of course (the second time you run them naturally!)

Roy Boxwell

SOFTWARE ENGINEERING GMBH and SEGUS Inc.
-Product Development-

Heinrichstrasse 83-85
40239 Duesseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]<mailto:[login to unmask email]>
http://www.seg.de http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert

From: suresh sane [mailto:[login to unmask email]
Sent: Wednesday, October 25, 2017 11:23 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.


Thanks Mike. For what it's worth, it still works on DB2 z/OS V12.



Thx

Suresh

________________________________
From: Vaughan, Mike <[login to unmask email]<mailto:[login to unmask email]>>
Sent: Wednesday, October 25, 2017 5:36 PM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.

I believe this might be the one you are thinking of?


Classification: Public

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf Of Lyon, Lockwood
Sent: Tuesday, February 10, 2009 7:10 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: Re: [DB2-L] [z/OS] DB2 Keywords List?

Dear Esteemed List:

Since the topic of Reserved Words has arisen again, I shamelessly pull out a copy of this old chestnut.



I attempted the following today (DB2 V8 NFM for z/OS):

CREATE TABLE FROM
(SELECT CHAR (7) NOT NULL,
WHERE CHAR (7) NOT NULL,
AND CHAR (7) NOT NULL,
BETWEEN CHAR (7) NOT NULL,
EQUALS CHAR (7) NOT NULL,
NULL CHAR (7))
IN ... ;

DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0

It was successful! (This was quite a surprise. I thought you had to enclose column names in quotes ("") if they were Reserved Words. I also thought that 'CREATE TABLE FROM' would generate a syntax error.)

I then inserted this row:

INSERT INTO FROM VALUES
('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ;

And now, the finale, my Reserved Word Query executed in SPUFI, with the
result:

SELECT SELECT
FROM FROM
WHERE NOT WHERE = EQUALS
AND NOT AND NOT BETWEEN AND AND BETWEEN AND NOT NULL IS NOT NULL ;


SELECT
---------+---
SELECT



Lock Lyon
Fifth Third Bancorp

-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [login to unmask email]<mailto:[login to unmask email]> and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://www.principal.com/do-not-contact-form any time.

If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://www.principal.com/do-not-email-request-canadian-residents any time.

-----End Original Message-----

-----End Original Message-----

Patrick Bossman

RE: (Off-topic) Request for an old post on SQL reserved words.
(in response to Roy Boxwell)

Are you sure you want me to share this with Chris Crone?  If he blocks it, how many applications will fail and RFEs get opened for a new system parameter to allow it?

Phil Grainger

(Off-topic) Request for an old post on SQL reserved words.
(in response to Patrick Bossman)
Personally I think it shows just how awesome the SQL parser is in Db2 – and should be used as a “pat on the back” for everyone involved/responsible

________________________________

Phil Grainger

Enablement Manager

[login to unmask email]

Direct



+44 (0)118 921 8000

Mobile



+44(0)7808 643 479


E2, Eskdale Road
Winnersh
Berkshire
RG41 5TS


[http://media.cms.bmc.com/images/corp_signature_bmclogo_2014.jpg] http://www.bmc.com

[cid:[login to unmask email]






From: Patrick Bossman [mailto:[login to unmask email]
Sent: 26 October 2017 14:53
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.


Are you sure you want me to share this with Chris Crone? If he blocks it, how many applications will fail and RFEs get opened for a new system parameter to allow it?

-----End Original Message-----
BMC Software Limited Registered Office: Building E2, Eskdale Road, Winnersh, Wokingham, Berkshire, United Kingdom, RG41 5TS Registered in England No. 1927903 The content of this email is confidential. If you are not the addressee, you may not distribute, copy or disclose any part of it. If you receive this message in error, please delete this from your system and notify the sender immediately.
Attachments

  • image001.jpg (8k)
  • image002.png (5.9k)

Philip Sevetson

(Off-topic) Request for an old post on SQL reserved words.
(in response to Patrick Bossman)
**please note my email address change**
Sure. Let’s See What Happens. ;-) [JOKE! JOKE! DON’T TOUCH THAT BUTTON!!!]

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: Patrick Bossman [mailto:[login to unmask email]
Sent: Thursday, October 26, 2017 9:53 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.


Are you sure you want me to share this with Chris Crone? If he blocks it, how many applications will fail and RFEs get opened for a new system parameter to allow it?

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
Attachments

  • image001.png (3.3k)

Patrick Bossman

RE: (Off-topic) Request for an old post on SQL reserved words.
(in response to Patrick Bossman)

Dan, if you could kindly change the date of my post to Friday Oct. 13, all would be right with the world.

In Reply to Patrick Bossman:

Are you sure you want me to share this with Chris Crone?  If he blocks it, how many applications will fail and RFEs get opened for a new system parameter to allow it?

Raymond Bell

(Off-topic) Request for an old post on SQL reserved words.
(in response to Patrick Bossman)
Or 1st April…

Raymond Bell
DB2 Database Administrator | IT Operations | Technology | RBS

From: Patrick Bossman [mailto:[login to unmask email]
Sent: 26 October 2017 15:35
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.


*********************************************
" This message originates from outside our organisation. Consider carefully whether you should click on any links, open any attachments or reply. If in doubt, forward to ~ Phishing"
*********************************************


Dan, if you could kindly change the date of my post to Friday Oct. 13, all would be right with the world.

In Reply to Patrick Bossman:

Are you sure you want me to share this with Chris Crone? If he blocks it, how many applications will fail and RFEs get opened for a new system parameter to allow it?

-----End Original Message-----
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. The Royal Bank of Scotland is authorised by the Prudential Regulation Authority, and regulated by the Financial Conduct Authority and Prudential Regulation Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 350, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions.

National Westminster Bank Plc. Registered in England No. 929027. Registered Office: 135 Bishopsgate, London EC2M 3UR. National Westminster Bank Plc is authorised by the Prudential Regulation Authority, and regulated by the Financial Conduct Authority and the Prudential Regulation Authority.

The Royal Bank of Scotland plc and National Westminster Bank Plc are authorised to act as agent for each other.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc, The Royal Bank of Scotland N.V., National Westminster Bank Plc or any affiliated entity (“RBS” or “us”) does not accept responsibility for changes made to this message after it was sent. RBS may monitor e-mails for business and operational purposes. By replying to this message you give your consent to the monitoring of your e-mail communications with us.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by RBS in this regard and the recipient should carry out such virus and other checks as it considers appropriate.

Visit our website at www.rbs.com http://www.rbs.com

William Favero

(Off-topic) Request for an old post on SQL reserved words.
(in response to Suresh Sane)
Check these out...  see if they help at all...

http://it.toolbox.com/blogs/db2zos/db2-for-zos-version-8-reserved-words-11263
http://it.toolbox.com/blogs/db2zos/reserved-words-revisited-13381
http://it.toolbox.com/blogs/db2zos/an-update-on-those-pesky-db2-for-zos-reserved-words-db2-10-edition-48761


--
*Willie*
--
Alternate E-Mail --> *[login to unmask email]* <mailto:[login to unmask email]>
My Website --------> http://WillieFavero.com/MyBands/
http://williefavero.com/MyBands
Our Band -----------> https://HardlyPlayboys.com/
https://www.hardlyplayboys.com
My DB2 blog -------> http://it.toolbox.com/blogs/db2zos/

Houston, TX, USA
My QR code
On 10/25/2017 12:11 PM, suresh sane wrote:
>
> Team - I am looking for a really old post (could be 10 years or so). 
> I think it may have been from Lockwood Lyon but I am not sure. 
> Basically, it was using reserved words in SQL such as creating a table
> called "table" or naming a column as "integer" etc. It was quite amusing!
>
>
> Anyone recall and have it saved?
>
>
> Thx
>
> Suresh
>
>
> -----End Original Message-----

Horacio Villa

(Off-topic) Request for an old post on SQL reserved words.
(in response to Suresh Sane)
It looks  like Abbot and Costello's "Who's on first".Horacio Villa ----- Original message -----
From: "Boxwell, Roy" <[login to unmask email]>
To: "[login to unmask email]" <[login to unmask email]>
Cc:
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.
Date: Thu, Oct 26, 2017 2:32 AM


Found my old one as well..

DROP   TABLE SELECT ;                                        
CREATE TABLE SELECT (NULL CHAR (3),NOT CHAR (3),IS CHAR (2));
INSERT INTO SELECT VALUES ('ABC','XYZ','IS');               
SELECT NULL                                                 
FROM SELECT                                                 
WHERE NULL   IS NOT NULL                                      
  AND IS      = IS                                               
  AND NOT NOT = NOT;                                        

DROP   TABLE FROM ;                                         
CREATE TABLE FROM                                           
(SELECT  CHAR(7) NOT NULL,                                  
 WHERE   CHAR(7) NOT NULL,                                  
 AND     CHAR(7) NOT NULL,                                  
 BETWEEN CHAR(7) NOT NULL,                                  
 EQUALS  CHAR(7) NOT NULL,                                  
 NULL    CHAR(7))                                           
 ;                                                          
INSERT INTO FROM VALUES                                     
('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ; 
SELECT SELECT                                               
FROM FROM                                                   
WHERE NOT WHERE = EQUALS                                    
  AND NOT AND NOT BETWEEN AND AND BETWEEN                   
  AND NOT NULL IS NOT NULL ;                                

This is both of the SQLs and the DROPs work as well of course (the second time you run them naturally!)
Roy Boxwell

SOFTWARE ENGINEERING GMBH and SEGUS Inc.
-Product Development-

Heinrichstrasse 83-85
40239 Duesseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]
http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert

From: suresh sane [mailto:[login to unmask email]
Sent: Wednesday, October 25, 2017 11:23 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.

Thanks Mike.  For what it's worth, it still works on DB2 z/OS V12.

Thx
Suresh
From: Vaughan, Mike <[login to unmask email]>
Sent: Wednesday, October 25, 2017 5:36 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.
I believe this might be the one you are thinking of? 


Classification: Public

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf Of Lyon, Lockwood
Sent: Tuesday, February 10, 2009 7:10 AM
To: [login to unmask email]
Subject: Re: [DB2-L] [z/OS] DB2 Keywords List?

Dear Esteemed List:

Since the topic of Reserved Words has arisen again, I shamelessly pull out a copy of this old chestnut.



I attempted the following today (DB2 V8 NFM for z/OS):

 CREATE TABLE FROM      
   (SELECT  CHAR (7) NOT NULL,  
    WHERE   CHAR (7) NOT NULL,  
    AND     CHAR (7) NOT NULL,  
    BETWEEN CHAR (7) NOT NULL,  
    EQUALS  CHAR (7) NOT NULL,  
    NULL    CHAR (7))            
  IN ... ;

DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0

It was successful!  (This was quite a surprise. I thought you had to enclose column names in quotes ("") if they were Reserved Words. I also thought that 'CREATE TABLE FROM' would generate a syntax error.)

I then inserted this row:

INSERT INTO FROM  VALUES                                
('SELECT ', 'WHERE  ', 'AND    ', 'BETWEEN', 'EQUALS ', NULL) ;

And now, the finale, my Reserved Word Query executed in SPUFI, with the
result:

   SELECT  SELECT                                                    
     FROM  FROM                                                      
    WHERE NOT WHERE = EQUALS                                        
    AND NOT AND NOT BETWEEN AND AND BETWEEN AND NOT NULL IS NOT NULL ;


SELECT          
---------+---
SELECT    



Lock Lyon
Fifth Third Bancorp

-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [login to unmask email] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://www.principal.com/do-not-contact-form any time.

If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://www.principal.com/do-not-email-request-canadian-residents any time.
       
-----End Original Message-----       
-----End Original Message----- Site Links: View post online   View mailing list online   Start new thread via email   Unsubscribe from this mailing list   Manage your subscription  

This email has been sent to: [login to unmask email]
Setup a data refresh task in less time than it takes to make a cup of coffee + save up to 90% in CPU
ESAi's BCV5 & XDM fast data refresh & Test Data Mgmt products will make you a hero to users. See
http://www.ESAIGroup.com/idug

Use of this email content is governed by the terms of service at:
http://www.idug.org/p/cm/ld/fid=2

Daniel Luksetich

(Off-topic) Request for an old post on SQL reserved words.
(in response to Horacio Villa)
Hello,

Let’s please end this thread. There is a DB2-L social listserv if you care to continue.

Thanks,

Dan



Daniel L Luksetich

DanL Database Consulting



IBM GOLD Consultant

IBM Champion for Analytics

IDUG Content Committee Past-Chairman

IBM Certified Database Adminstrator – DB2 11 DBA for z/OS

IBM Certified System Administrator – DB2 11 for z/OS

IBM Certified Application Developer – DB2 11 for z/OS

IBM Certified Advanced Database Administrator – DB2 10.1 for Linux UNIX and Windows



From: Horacio Villa [mailto:[login to unmask email]
Sent: Thursday, October 26, 2017 10:51 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.



It looks like Abbot and Costello's "Who's on first".

Horacio Villa





----- Original message -----
From: "Boxwell, Roy" <[login to unmask email] <mailto:[login to unmask email]> >
To: "[login to unmask email] <mailto:[login to unmask email]> " <[login to unmask email] <mailto:[login to unmask email]> >
Cc:
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.
Date: Thu, Oct 26, 2017 2:32 AM


Found my old one as well..



DROP TABLE SELECT ;

CREATE TABLE SELECT (NULL CHAR (3),NOT CHAR (3),IS CHAR (2));

INSERT INTO SELECT VALUES ('ABC','XYZ','IS');

SELECT NULL

FROM SELECT

WHERE NULL IS NOT NULL

AND IS = IS

AND NOT NOT = NOT;



DROP TABLE FROM ;

CREATE TABLE FROM

(SELECT CHAR(7) NOT NULL,

WHERE CHAR(7) NOT NULL,

AND CHAR(7) NOT NULL,

BETWEEN CHAR(7) NOT NULL,

EQUALS CHAR(7) NOT NULL,

NULL CHAR(7))

;

INSERT INTO FROM VALUES

('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ;

SELECT SELECT

FROM FROM

WHERE NOT WHERE = EQUALS

AND NOT AND NOT BETWEEN AND AND BETWEEN

AND NOT NULL IS NOT NULL ;



This is both of the SQLs and the DROPs work as well of course (the second time you run them naturally!)



Roy Boxwell

SOFTWARE ENGINEERING GMBH and SEGUS Inc.
-Product Development-

Heinrichstrasse 83-85
40239 Duesseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: <mailto:[login to unmask email]> [login to unmask email]
http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert



From: suresh sane [mailto:[login to unmask email]
Sent: Wednesday, October 25, 2017 11:23 PM
To: [login to unmask email] <mailto:[login to unmask email]>
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.



Thanks Mike. For what it's worth, it still works on DB2 z/OS V12.



Thx

Suresh


_____


From: Vaughan, Mike <[login to unmask email] <mailto:[login to unmask email]> >
Sent: Wednesday, October 25, 2017 5:36 PM
To: [login to unmask email] <mailto:[login to unmask email]>
Subject: [DB2-L] - RE: (Off-topic) Request for an old post on SQL reserved words.



I believe this might be the one you are thinking of?


Classification: Public

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf Of Lyon, Lockwood
Sent: Tuesday, February 10, 2009 7:10 AM
To: [login to unmask email] <mailto:[login to unmask email]>
Subject: Re: [DB2-L] [z/OS] DB2 Keywords List?

Dear Esteemed List:

Since the topic of Reserved Words has arisen again, I shamelessly pull out a copy of this old chestnut.



I attempted the following today (DB2 V8 NFM for z/OS):

CREATE TABLE FROM
(SELECT CHAR (7) NOT NULL,
WHERE CHAR (7) NOT NULL,
AND CHAR (7) NOT NULL,
BETWEEN CHAR (7) NOT NULL,
EQUALS CHAR (7) NOT NULL,
NULL CHAR (7))
IN ... ;

DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0

It was successful! (This was quite a surprise. I thought you had to enclose column names in quotes ("") if they were Reserved Words. I also thought that 'CREATE TABLE FROM' would generate a syntax error.)

I then inserted this row:

INSERT INTO FROM VALUES
('SELECT ', 'WHERE ', 'AND ', 'BETWEEN', 'EQUALS ', NULL) ;

And now, the finale, my Reserved Word Query executed in SPUFI, with the
result:

SELECT SELECT
FROM FROM
WHERE NOT WHERE = EQUALS
AND NOT AND NOT BETWEEN AND AND BETWEEN AND NOT NULL IS NOT NULL ;


SELECT
---------+---
SELECT



Lock Lyon
Fifth Third Bancorp

-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [login to unmask email] <mailto:[login to unmask email]> and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

If you no longer wish to receive any further solicitation from the Principal Financial Group you may unsubscribe at https://www.principal.com/do-not-contact-form https://urldefense.proofpoint.com/v2/url?u=https-3A__www.principal.com_do-2Dnot-2Dcontact-2Dform&d=DwMFAw&c=jf_iaSHvJObTbx-siA1ZOg&r=iDzg1e4cJNTnuMYfRFydzmM64ql2mAx25Zf-E2GN8Eg&m=4FGQ0usCG7Zs9tmOYyWXC5BAQEUr5lB13TCYBldqwfo&s=XRrLfpNgFVB-S5LNAFS4JkE7Q6xVe-BXdESprhnNlZU&e= any time.

If you are a Canadian resident and no longer wish to receive commercial electronic messages you may unsubscribe at https://www.principal.com/do-not-email-request-canadian-residents https://urldefense.proofpoint.com/v2/url?u=https-3A__www.principal.com_do-2Dnot-2Demail-2Drequest-2Dcanadian-2Dresidents&d=DwMFAw&c=jf_iaSHvJObTbx-siA1ZOg&r=iDzg1e4cJNTnuMYfRFydzmM64ql2mAx25Zf-E2GN8Eg&m=4FGQ0usCG7Zs9tmOYyWXC5BAQEUr5lB13TCYBldqwfo&s=67CoO2wZO-eOIG78bmZumF4LeEmEDfi45uR82sYTN5Q&e= any time.

-----End Original Message-----



-----End Original Message-----



-----End Original Message-----





-----End Original Message-----