Today’s Date in PL/SQL

by fwhagen Fri, 25 July 2014

Here’s the other one I forget all the time.  Although it’s much easier than T-SQL, to get today’s date in an Oracle query, use:


as in:

SELECT TRUNC(sysdate) from dual;

Remember:  Don't pass a date as a string.  Use the system variables.


Filed Under: DataBase | Oracle | Programming

Looking for Oracle Developer Training for ASP.NET Developers

by fwhagen Fri, 20 March 2009

I am in the market for some quick, effective training in Oracle Development focused on consumption from a ASP.NET development point of view.  I don't need to know how to admin the Oracle server, just how to write effective, efficient queries, setup performant data models, optimize data access and fix our overabundance of foreign keys, indexes and CLOBs.  I am advanced in SQL Server development, but need to know the nuances that differ in Oracle.

Any recommendations?  Thanks in advance!

Keywords: ,

Filed Under: Oracle | Programming

Oracle.NET connector issues

by fwhagen Wed, 18 July 2007
Interesting problem:  I always use library functions in .NET apps to maximize code reuse, especially for Data Access calls.  So when I ran across the following error from Oracle when connecting to a server running 10.2, I was stymied.  Especially since it worked fine with a 10.1 server:
ORA-12571: TNS:packet writer failure

Looking this one up brings a whole lot of results, none of them helpful in this situation.  To make it worse, VS2005 ran the application just fine. 

The solution?  The server had the 8.1 connector installed, which for some reason connects to 10.1 just fine.  10.2 was different enough to through the error above.  We got IS to push the 10.2 client on the server, and everything is working.

Keywords: ,

Filed Under: .NET | Oracle