Start a new topic

@ddl with SYBASE IQ don't get precision and scale of numeric datatype

[This topic is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

@ddl table="dbo.AirmilesEDBInfo? Displays the DDL CREATE TABLE AirmilesEDBInfo ( time_mth_id integer DEFAULT NULL NOT NULL, airmiles_nbr char(11) DEFAULT NULL NOT NULL, min_EDB_dly_bal numeric DEFAULT NULL NOT NULL, PRIMARY KEY (time_mth_id, airmiles_nbr) ) min_EDB_dly_bal ends up with numeric(126,38) since it's created without specification of precision and scale. The actual definition is numeric(17,2), as you can see on the attached snapshot. I tried different driver (jConnect) and got the same result. Is it because the database type if Generic? thx, ------------------------- Product Information ------------------------ Product: DbVisualizer Personal 8.0.9 Build: #1751 (2012/04/30 11:38) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_31 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1 ------------------------- Connected Databases ------------------------ Database Type: Generic Major Version: 11 Minor Version: 0 Profile: generic Connection Message: Sybase IQ 11.00.0000 JDBC-ODBC Bridge (DBODBC11.DLL) 2.0001 (11.00.0001) --------------------------- Debug Printouts -------------------------- 08:50:54 [DEBUG Thread-28 N.?] DbConnection='PROD_MBA' Catalog='prod_mba' Schema='dbo' Table='AirmilesEDBInfo' Column='%' 08:50:54 [DEBUG pool-3-thread-3 E.?] DefaultEditor-0: JdbcOdbcDatabaseMetaData.getColumns("prod_mba", "dbo", "AirmilesEDBInfo", "%") 08:50:55 [DEBUG Thread-28 N.?] DbConnection='PROD_MBA' Catalog='prod_mba' Schema='dbo' Table='AirmilesEDBInfo' 08:50:55 [DEBUG pool-3-thread-3 E.?] DefaultEditor-0: JdbcOdbcDatabaseMetaData.getPrimaryKeys("prod_mba", "dbo", "AirmilesEDBInfo") 08:50:55 [DEBUG Thread-28 N.?] DbConnection='PROD_MBA' Catalog='prod_mba' Schema='dbo' Table='AirmilesEDBInfo' ExportedKeys='false' 08:50:55 [DEBUG pool-3-thread-3 E.?] DefaultEditor-0: JdbcOdbcDatabaseMetaData.getImportedKeys("prod_mba", "dbo", "AirmilesEDBInfo") 08:50:55 [DEBUG AWT-EventQueue-1 F.?] Edit not allowed: Is not a SELECT statement 08:54:51 [DEBUG AWT-EventQueue-1 A.?] Returning cloned generic Command for idref: getColumns 08:54:51 [DEBUG AWT-EventQueue-1 A.?] Returning cloned generic Command for idref: getPrimaryKeys 08:54:51 [DEBUG AWT-EventQueue-1 A.?] Returning cloned generic Command for idref: getIndexes 08:54:51 [DEBUG AWT-EventQueue-1 A.?] Returning cloned generic Command for idref: getPrivileges 08:54:51 [DEBUG AWT-EventQueue-1 A.?] Returning cloned generic Command for idref: getBestRowIdentifier 08:54:52 [DEBUG AWT-EventQueue-1 B.execute] CommandId: getColumns 08:54:52 [DEBUG AWT-EventQueue-1 N.?] DbConnection='PROD_MBA' Catalog='null' Schema='dbo' Table='AirmilesEDBInfo' Column='%' 08:54:52 [DEBUG pool-3-thread-6 E.?] RootConnection: JdbcOdbcDatabaseMetaData.getColumns(null, "dbo", "AirmilesEDBInfo", "%") 08:54:53 [DEBUG AWT-EventQueue-1 B.execute] Total rows/columns: 3/18. Rows after filtering: 3

[This reply is migrated from our old forums.]

Re: @ddl with SYBASE IQ don't get precision and scale of numeric datatype
Hi Richard, Yes, it's because the Generic database type does not recognize the NUMERIC data type (as opposed to DECIMAL, DOUBLE, FLOAT and REAL). I've opened a ticket for this so it will be fixed in the next maintenance release. Until then, maybe you can use DECIMAL instead of NUMBER as a work around. Best Regards, Hans
[This reply is migrated from our old forums.]

Re: @ddl with SYBASE IQ don't get precision and scale of numeric datatype
Richard, Just to inform you that this is now fixed in the 8.0.11 version. Regards Roger