suche 36x36
  • Admin-Scout-small-Banner
           

    CURSOR Admin-Scout

    get the ultimate tool for Informix

    pfeil  
Latest versionsfixlist
14.10.xC10 FixList
12.10.xC16.X5 FixList
11.70.xC9.XB FixList
11.50.xC9.X2 FixList
11.10.xC3.W5 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

Informix - Problem description

Problem IT27614 Status: Closed

DROP TABLE/VIEW WITH 'IF EXISTS' RESULTING IN ERROR -523/-394 WHEN
VIEW/TABLE NAME GIVEN

product:
INFORMIX SERVER / 5725A3900 / C10 - IDS 12.10
Problem description:
You have different databases where an object exists. In some
databases this object is a view and in other databases this is a
table.
In the SQL update scripts to change this object to a table you
want to execute:

DROP TABLE IF EXISTS object_name;
DROP VIEW IF EXISTS object_name;
CREATE TABLE object_name;

You expect that the query should not generate any (error)
message following the documented specification of this
functionality... so that the construction with "IF EXISTS"
should be possible.

In our documentation we state the following:

1)
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com
.ibm.sqls.doc/ids_sqs_0744.htm - DROP VIEW statement:
   "If you include the optional IF EXISTS keywords, the database
server takes no action (rather than sending an exception to the
application) if no view of the specified name is registered in
the current database".

2)
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com
.ibm.sqls.doc/ids_sqs_0736.htm - DROP TABLE statement:
   "If you include the optional IF EXISTS keywords, the database
server takes no action (rather than sending an exception to the
application) if no table of the specified name is registered in
the current database".

a) Running the following query:

          create view 'informix'.test1 (tabid) as select tabid
from systables where tabid = 1;
          create table test2 (col1 int);
          drop view if exists test2; --test2 is a table

   You get the error "394: View (informix.test2) not found".

b) Running the following query:

          create view 'informix'.test1 (tabid) as select tabid
from systables where tabid = 1;
          create table test2 (col1 int);
          drop table if exists test1; --test1 is a view

   You get the error "523: Can only recover, repair, truncate of
drop table".
Problem Summary:
****************************************************************
* USERS AFFECTED:                                              *
* Users of IDS prior to 12.10.xC13.                            *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* Drop table/view with 'IF EXISTS' resulting in error          *
* -523/-394 when view/table name given.                        *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
Local Fix:
Solution
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
27.12.2018
03.10.2019
03.10.2019
Problem solved at the following versions (IBM BugInfos)
12.10.xC13
Problem solved according to the fixlist(s) of the following version(s)
Informix EditionsInformix Editions
Informix Editions
DocumentationDocumentation
Documentation
IBM NewsletterIBM Newsletter
IBM Newsletter
Current BugsCurrent Bugs
Current Bugs
Bug ResearchBug Research
Bug Research
Bug FixlistsBug Fixlists
Bug Fixlists
Release NotesRelease Notes
Release Notes
Machine NotesMachine Notes
Machine Notes
Release NewsRelease News
Release News
Product LifecycleProduct Lifecycle
Lifecycle
Media DownloadMedia Download
Media Download