| From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
|---|---|
| To: | "Foster, Stephen" <stephenlfoster(at)comcast(dot)net> |
| Cc: | <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Setting expire date on insert/modify |
| Date: | 2006-01-25 00:57:38 |
| Message-ID: | 65A75F84-1239-4EB3-9EAF-3105CE29ED31@myrealbox.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Jan 25, 2006, at 9:45 , Foster, Stephen wrote:
> ERROR: invalid input syntax for type date: "StartDate"
> CONTEXT: SQL statement "SELECT (date 'StartDate' + integer
> 'NumOfDays')"
> PL/pgSQL function "TF_BannerAd_Ads_InsMod" line 8 at assignment
Why are you single-quoting StartDate and NumOfDays? Single-quotes are
generally used for string literals (e.g., text and varchar types). If
you are trying to preserve the case of the variable name, you need to
(always) use double-quotes, including when you define them.
Hope this helps a bit. I haven't looked through all of the code, so
there may be other bugs lurking, but this is definitely one of the
problems.
Michael Glaesemann
grzm myrealbox com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Foster, Stephen | 2006-01-25 01:12:55 | Re: Setting expire date on insert/modify |
| Previous Message | Foster, Stephen | 2006-01-25 00:45:58 | Setting expire date on insert/modify |