fun debugging stuff on a friday

  • From: TESTAJ3@xxxxxxxxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 10 Apr 2009 10:47:11 -0400

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.

Other related posts: