Hi All,
If anyone's interested in using it, I made a little S-SQL extension
(def-sql-op :=if (a b)
`(,@(case a
(:null (sql-expand `(:is-null ,b)))
(nil (sql-expand t))
(otherwise (sql-expand `(:= ,a ,b))))))
I find it convenient when writing queries that take optional
parameters where if the parameter is not specified, you want to return
the row regardless of what value b takes. Does anyone else write
little extensions like these? Should we collect them in a contrib?
--
Andy Chambers
Software Engineer
(e) achambers(a)mcna.net
(t) 954-682-0573
CONFIDENTIALITY NOTICE: This electronic mail may contain information
that is privileged, confidential, and/or otherwise protected from
disclosure to anyone other than its intended recipient(s). Any
dissemination or use of this electronic mail or its contents by
persons other than the intended recipient(s) is strictly prohibited.
If you have received this communication in error, please notify the
sender immediately by reply e-mail so that we may correct our internal
records. Please then delete the original message. Thank you.