Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 8 of 8 total |
Error #901 when adding a check constraint to a table |
Wed, Feb 15 2012 10:06 AM | Permanent Link |
Lucian | Hi
I am trying to add a check constraint to a table. The check looks like this: (BirthDate>=DATE '1930-01-01') AND (BirthDate<=DateAdd('YEAR',-18,CURRENT_TIMESTAMP)) BirthDate is a column DateAdd is a user function From the help file I'm getting that a <CheckExpression> = Any valid SQL expression that does not include any sub-queries What am I doing wrong? I'm using EDB Manager for the job and my Elevate version number is 2.05 build 11. Perhaps this has been fixed already? Thx, Lucian |
Wed, Feb 15 2012 10:47 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Lucian
What happens if you try and run the statement as part of a select sql? Also does the error message give you any more information? Roy Lambert [Team Elevate] |
Wed, Feb 15 2012 10:49 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Lucian
Can you show the definition for DateAdd. I'm just wondering about CURRENT_TIMESTAMP and if it should be CURRENT_DATE Roy Lambert [Team Elevate] |
Wed, Feb 15 2012 10:52 AM | Permanent Link |
Lucian | Sorry about that, I thout the error number was enough. here's the full deal:
ElevateDB Error #901 An error occurred with the routine at line 1 and column 48 (An attempt was made to execute the unprepared procedure dateadd) Works fine in SELECT. regards Lucian |
Wed, Feb 15 2012 10:54 AM | Permanent Link |
Lucian | >Can you show the definition for DateAdd
Do you still need that? It's the one in the extension ng, anyway |
Wed, Feb 15 2012 10:58 AM | Permanent Link |
Lucian | As a workaround I could probably use what David Cornelius suggested in the extension ng (the stuff with INTERVAL) ... however if this is a bug, it should get fixed, no?
regards Lucian |
Wed, Feb 15 2012 11:02 AM | Permanent Link |
Lucian | Well, anyway, the workaround works.
I don't care any more... regards Lucian |
Tue, Feb 21 2012 7:40 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Lucian,
<< I'm using EDB Manager for the job and my Elevate version number is 2.05 build 11. Perhaps this has been fixed already? >> Probably, but I'll double-check to make sure before the new EDB build goes out this week. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |