How to drop an alias table named alias

135305 pts.
Tags:
.NET
AS/400
iSeries
SQL statements
I needed to access a specific file member of a DB2 file, so I created an alias in my library via a SQL statement using a iDB2Connection. Now I cannot drop it. Here is my create statement.
CREATE ALIAS MYLIB/ALIAS  FOR OPTIOFILE/FXFORM (MYFORM)
I can now run my selects and load my datagrids using my .NET app. Now that I'm done, I cannot drop the alias. It tell me that alias is a reserved word when I try to use that for the file name. If so why does it let you use it when naming it? How can I get rid of it?


Software/Hardware used:
.NET, as/400 SQL, i-series
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    You can try specifying the name as "ALIAS" (i.e., using double-quote marks around the name) to tell SQL not to try to interpret the name. Of course, remember not to use 'reserved words as names whenever creating things in the future.
    36,340 pointsBadges:
    report
  • philpl1jb

    In the future don't name alias, alias. You can name it MyAlias or ThisAlias or BOB.

    54,090 pointsBadges:
    report
  • ToddN2000
    Thank, the quotes around the name worked. Just went to do something quick and temporary did not think the name would be an issue. Now that I had this problem I will not use reserved words for file names in the future.
    135,305 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: