IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Unless you change the logic
to include a +1, as you indicated. If you use a trunc, however, you always know where you stand.

Of course, you might need to add a functional index to the table as well.

Personally, I might throw sysdate into a variable and use that instead, depending on where this is being used.

Side note: in our system, we have a function to wrap sysdate. This lets us actually set sysdate to whatever we want for testing purposes. We're also guaranteed to always get the exact same date within the same session call. This doesn't work for sessions that aren't ended between calls, of course.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
Expand Edited by admin Aug. 4, 2004, 11:10:14 PM EDT
New sysdate wrapper - nice touch
I'm about to embark on a fullfillment tracking / automation system.
Will need well controlled Oracle table updates, etc.
Been YEARS since I've written anything like this.
Would you happen to have a guideline doc handy for for things such at update wrappers, etc?
New Guideline doc for DML wrappers:
"Use them."

:-)

Flippancy aside, we've had reasonably good results with using object wrappers for table DML.

Apparently there's such a thing as "upsert" now, which should come in handy.

Depends on the situation as to what you need to do. I'd suggest the Feuerstein books if you don't have them.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
Expand Edited by admin Aug. 5, 2004, 12:06:53 AM EDT
New Re: Unless you change the logic
My suggested fix was something like:
\n  SYSDATE BETWEEN start_date AND NVL(end_date, TO_DATE('31-DEC-2999'))\n

But it would then have a Y3K problem :-)

Some systems have "infinity" constants for this kind of thing.
________________
oop.ismad.com
Expand Edited by tablizer Aug. 7, 2004, 05:14:31 AM EDT
     risky use of Oracle SYSDATE? - (tablizer) - (11)
         Hmm. Order of evaluation - (broomberg)
         If only the date matters... - (admin) - (5)
             Still could cross over -NT - (broomberg) - (4)
                 Unless you change the logic - (admin) - (3)
                     sysdate wrapper - nice touch - (broomberg) - (1)
                         Guideline doc for DML wrappers: - (admin)
                     Re: Unless you change the logic - (tablizer)
         Another thought - (admin)
         It would surprise me if the SYSDATE wasn't in a closure - (ChrisR) - (2)
             Brief testing says this might be correct. - (admin) - (1)
                 FWIW - (ChrisR)

And don't forget the fire ants.
95 ms