You could write a Tcl (i.e. pltcl) function, and use that to do what you want:
CREATE FUNCTION remove(varchar) RETURNS varchar AS '
set input $1
regsub -- {-.*$} $input {} output
return $output
' language 'pltcl';
[NOTE: untested]
you may have to monkey with the reg
I couldn't resist, so I went ahead and did all of them. I might be using
these in a future app anyways. Again these are Tcl procs, but you may be
able to transfer the logical to another language, if you want.
proc getTG {year} {
set di \
[clock format [clock scan $year-11-30] -fo
Based on your criteria (I never really had thought about Thanksgiving
before, as far as when it hits), but here is a small Tcl proc that I
think will do it. You may need to add error checking. Takes the year
(i.e. 2001), and returns the day date (i.e. 22).
If I have a rule, is the rule inside a tranaction along with the table that
it references. For example, if I have a rule that deletes an entry from
table B, whenever an entry in table A gets deleted, then is the delete for
table A and table B wrapped inside the same transaction?
Same question I g
I have seen in the postings that it is not possible to return multiple rows
from a function.
However, when I look at the programmers guide (Ch. 4), it almost leads me to
believe otherwise:
-8<---
The following more interesting e