Posts

Showing posts from 2013

Oracle: Converting a string to a number

For a customer, I was converting an Access database to an Oracle relational structure. As it turned out, several of the Access number fields were strings and the users had entered number with errors (example: 12.900.000) and text (example: UNLIMITED). So I put together a Sql statement to display non-numbers so the users could correct the corrupt data. I didn't want to make any assumptions. So I came up with the following:  SELECT tbl.columnValidating  FROM tableName tbl  WHERE TRANSLATE(tbl.columnValidating,'~,$0123456789','~') IS NOT NULL    AND tbl.columnValidating <> 'UNLIMITED'    AND tbl.columnValidating <> 'any other text you want to filter out'

identifier 'PACKAGE.STORED_PROCEDURE_NAME' must be declared ORA-06550

I was updating the data access layer framework and when I began testing the changes I received this error: "identifier 'PACKAGE.STORED_PROCEDURE_NAME' must be declared ORA-06550". I checked the package name, the procedure name, parameters and their types and nothing.  So then I step-by-step went through the code and found that the connection.open() was not getting executed.  It was buried in a database object and was being skipped.  Painful Oracle error description.

XML Entity References

Some symbols cannot be used with XML because most XML parsers will choke on them usually throwing an error.  So you must replace these symbols with their entity reference.  An entity reference begins with an ampersand and ends with a semi-colon and in between includes a multi-character code that represents the original value. Less than (<): replace with &lt; Greater than (>): replace with &gt; Ampersand (&): replace with &amp; Apostrophe ('): replace with &apos; Quotation mark ("): replace with &quot;