Loading ...
Sorry, an error occurred while loading the content.

Re: HOWTO: Check DDLs Instantiated Properly

Expand Messages
  • Mark
    You can use a query against the data dictionary views for your database. E.g. DBA/ALL/USER_TAB_COLUMNS in Oracle, SYS.COLUMNS in SQL Server (or the
    Message 1 of 2 , Jun 30, 2012
    • 0 Attachment
      You can use a query against the data dictionary views for your database. E.g. DBA/ALL/USER_TAB_COLUMNS in Oracle, SYS.COLUMNS in SQL Server (or the INFORMATION_SCHEMA views), DBC.COLUMNS in Teradata.

      Or try Inspect Table (I think this only works in Flow Mode):

      http://www.fitnesse.info/dbfit:reference:commandreference:inspectcommand


      --- In fitnesse@yahoogroups.com, "GibsonBG" <bggibson@...> wrote:
      >
      > Before running additional tests I would like to confirm my database tables are correct.
      >
      > I thought this would work, but it does not:
      >
      > |Query|DESCRIBE TABLE EDWDIM.DIM_STORE|
      > |Column name|Data type schema|Column Data type name|Length|Scale|Nulls|
      > |STORE_IDENTIFIER|SYSIBM |INTEGER|4|0|N|
      > |STORE_MANAGER_FNAME|SYSIBM |VARCHAR|25|0|N|
      > |STORE_MANAGER_LNAME|SYSIBM |VARCHAR|25|0|N|
      > |STORE_MANAGER|SYSIBM |VARCHAR|50|0|N|
      > |STREET_ADDRESS_1|SYSIBM |VARCHAR|30|0|N|
      > |STREET_ADDRESS_2|SYSIBM |VARCHAR|30|0|N|
      > |CITY|SYSIBM |VARCHAR|30|0|N|
      > |STATE_ABBREVIATION|SYSIBM |VARCHAR|7|0|N|
      > |STATE_NAME|SYSIBM |VARCHAR|20|0|N|
      > |ZIP|SYSIBM |VARCHAR|10|0|N|
      > |COUNTY_NAME|SYSIBM |VARCHAR|90|0|N|
      > |STORE_PHONE_NUM|SYSIBM |CHARACTER|10|0|N|
      > |DIVISION_CODE|SYSIBM |VARCHAR|10|0|N|
      > |REGION_CODE|SYSIBM |VARCHAR|10|0|N|
      > |AREA_CODE|SYSIBM |INTEGER|4|0|N|
      > |OPEN_DATE|SYSIBM |DATE|4|0|N|
      > |DIM_STORE_EFFECTIVE_DATE|SYSIBM |DATE|4|0|N|
      > |DIM_STORE_EXPIRATION_DATE|SYSIBM |DATE|4|0|N|
      > |CURRENT_IND|SYSIBM |CHARACTER|1|0|N|
      > |LATITUDE_NUM|SYSIBM |DECIMAL|31|10|N|
      > |LONGITUDE_NUM|SYSIBM |DECIMAL|31|10|N|
      > |LOAD_USER_ID|SYSIBM |VARCHAR|35|0|Y|
      > |DATE_LOADED|SYSIBM |TIMESTAMP|10|6|Y|
      > |UPDATE_USER_ID|SYSIBM |VARCHAR|35|0|Y|
      > |DATE_LAST_UPDATE|SYSIBM |TIMESTAMP|10|6|Y|
      > |BATCH_ID|SYSIBM |INTEGER|4|0|Y|
      >
      > It throws Standard Error:
      > com.ibm.db2.jcc.a.SqlException: [jcc][10103][10941][3.52.95] Method executeQuery cannot be used for update. ERRORCODE=-4476, SQLSTATE=null
      > at com.ibm.db2.jcc.a.ad.a(ad.java:650)
      > at com.ibm.db2.jcc.a.ad.a(ad.java:60)
      > at com.ibm.db2.jcc.a.ad.a(ad.java:120)
      > at com.ibm.db2.jcc.a.rl.a(rl.java:3636)
      > at com.ibm.db2.jcc.a.sl.e(sl.java:2958)
      > at com.ibm.db2.jcc.a.sl.Ob(sl.java:569)
      > at com.ibm.db2.jcc.a.sl.executeQuery(sl.java:543)
      > at dbfit.fixture.Query.getDataTable(Query.java:34)
      > at dbfit.fixture.RowSetFixture.doRows(RowSetFixture.java:70)
      > at fit.Fixture.doTable(Fixture.java:162)
      > at fitlibrary.traverse.AlienTraverseHandler.doTable(AlienTraverseHandler.java:18)
      > at fitlibrary.traverse.workflow.DoTraverse.interpretWholeTable(DoTraverse.java:98)
      > at fitlibrary.DoFixture.interpretWholeTable(DoFixture.java:63)
      > at fitlibrary.suite.InFlowPageRunner.run(InFlowPageRunner.java:39)
      > at fitlibrary.DoFixture.interpretTables(DoFixture.java:40)
      > at dbfit.DatabaseTest.interpretTables(DatabaseTest.java:24)
      > at fit.Fixture.doTables(Fixture.java:75)
      > at fit.FitServer.process(FitServer.java:76)
      > at fit.FitServer.run(FitServer.java:52)
      > at fit.FitServer.main(FitServer.java:43)
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.