ad-u15> select sysdate from dual
  2  /

SYSDATE
---------
23-JUL-08

On Wed, Jul 23, 2008 at 3:09 PM, Payne, George <[EMAIL PROTECTED]> wrote:
> **
>
> ARS 7.0.01 P05
>
> DB Oracle 10g
>
>
>
> I'm looking to make a "Set Fields" Filter Action to Count the number of
> records in an ARS Table where the value of the field is '1' and the record
> is more than 1 week old.
>
>
>
> This SQL works fine (returns a value for $1$ of =392):
>
>
>
> SELECT Count(C18099) FROM T1116 WHERE C18099=1
>
>
>
> But it fails when I try to add the criteria for the age of the record
> (throws an error: ARERR [552] Failure during SQL operation to the database :
> ORA-00904: "07/23/08 14:06:46"-604800: invalid identifier):
>
>
>
> SELECT Count(C18099) FROM T1116 WHERE C18099=1 AND C3<"$TIMESTAMP$"-604800
>
>
>
> I've used the "$TIMESTAMP$"-604800 worked from an Advanced Search on the
> User Tool…I'm sure it's just something to do with either my SQL syntax or
> the way the "Create Date" (C3) is stored on the database.  I know it's out
> there as number of seconds since 1/1/70, but the error seems to indicate
> that the "$TIMESTAMP$" is being interpreted as "07/23/08 14:06:46".  Maybe I
> need to use a FUNCTION for Timestamp that Oracle understands??
>
>
>
> Thanks in advance,
>
> George
>
>
>
> George Payne
>
> Corporate Applications Developer
>
> Electric Reliability Council of Texas
>
> (512) 248-3940
>
> [EMAIL PROTECTED]
>
> __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
> html___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to