![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
![]() |
Thu, Jan 27 2011 6:17 AM | Permanent Link |
Adam Brett Orixa Systems | I am migrating from DBISAM.
I have a COLUMN DateSent TIMESTAMP. In DBISAM I use DEFAULT Current_Date. This sets the DateSent field's value to the current date with TIME portion = "00:00:00". When the User actions the record the DateSent field is updated to the precise NOW Timestamp. This is useful, as it means that users can see all the items which haven't been actioned. I realise it is not perfect DB design ... but the users like it & are used to it. -- I cannot use the COLUMN DEFINITION: DateSent TIMESTAMP DEFAULT Current_Date in ElevateDB ... it chokes, seeing a mismatch between the data-type of the column and its default value. How can I fix this or work around it? Can I define the accuracy of the Current_Timestamp variable for example? |
Thu, Jan 27 2011 7:16 AM | Permanent Link |
John Hay | Adam
> I have a COLUMN DateSent TIMESTAMP. > In DBISAM I use DEFAULT Current_Date. > This sets the DateSent field's value to the current date with TIME portion = "00:00:00". > When the User actions the record the DateSent field is updated to the precise NOW Timestamp. > This is useful, as it means that users can see all the items which haven't been actioned. I realise it is not perfect DB design ... but the users like it & are used to it. > -- > I cannot use the COLUMN DEFINITION: > DateSent TIMESTAMP DEFAULT Current_Date > in ElevateDB ... it chokes, seeing a mismatch between the data-type of the column and its default value. > How can I fix this or work around it? Can I define the accuracy of the Current_Timestamp variable for example? > How about Datesent TIMESTAMP DEFAULT CAST(Current_Date AS TIMESTAMP) John |
Thu, Jan 27 2011 8:40 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | And if that doesn't work use a trigger where you can easily set it to whatever you want.
Roy Lambert [Team Elevate] ps let us know if it does work - it could be useful to know about. |
Thu, Jan 27 2011 5:09 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Adam,
<< in ElevateDB ... it chokes, seeing a mismatch between the data-type of the column and its default value. >> I'll make sure this is fixed for the next build. The workaround is to use: CAST(CURRENT_DATE() AS TIMESTAMP) as the default expression. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jan 27 2011 5:43 PM | Permanent Link |
Adam Brett Orixa Systems | SUPER GOOD Tim ... Thanks.
The CAST is the biz for now. I am going to have to do a lot of work to figure out the niceties of TRIGGERS, JOBS etc., etc. so much functionality! (and now I've read the posts about using Elevate as a WebDB with an on-line DBAdmin tool on another thread, which sounds brilliant!) Adam |
Fri, Jan 28 2011 5:09 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Adam,
<< I am going to have to do a lot of work to figure out the niceties of TRIGGERS, JOBS etc., etc. so much functionality! >> Yes, there's a ton of new stuff. ![]() << (and now I've read the posts about using Elevate as a WebDB with an on-line DBAdmin tool on another thread, which sounds brilliant!) >> Yep, and it will be ready as soon as I'm done messing with the HTML interface (I hate doing web front-end work). -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |