fun debugging stuff on a friday

From: <TESTAJ3_at_nationwide.com>
Date: Fri, 10 Apr 2009 10:47:11 -0400
Message-ID: <OFC318F470.BDE5E90A-ON85257594.0050D68B-85257594.0051396F_at_lnotes-gw.ent.nwie.net>



I get this code below, first glance says, this should work, Oracle is so much like C, gives you a gun, ammo, takes off the safety and has the trigger most of the way pulled while pointing the gun at your foot and assists you in pulling the trigger the rest of the way.

declare
current_date date;
ctr number;

begin

current_date:='30-OCT-07';

SELECT count(distinct SECURITY_ALIAS)
into ctr
FROM DATAMARTDBO.SECURITY_DETAILS
WHERE EFFECTIVE_DATE = current_date;

dbms_output.put_line('CTR1:'||ctr);

SELECT count(distinct SECURITY_ALIAS)
into ctr
FROM DATAMARTDBO.SECURITY_DETAILS
WHERE EFFECTIVE_DATE = '30-OCT-07'; dbms_output.put_line('CTR2:'||ctr);

end;
/

CTR1: 0
CTR2: 35178



Joe Testa, Oracle Certified Professional Senior Consultant
Data Engineering and Administration
Nationwide Investments

(Work) 614-677-1668
(Cell) 614-312-6715

Interested in helping out your marriage? Ask me about "Weekend to Remember"
Dec 11-13, 2009 here in Columbus.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 10 2009 - 09:47:11 CDT

Original text of this message