Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 9 of 9 total |
Copy Generated Timestamp field |
Tue, Apr 1 2008 4:52 PM | Permanent Link |
"Jianfei Xu" | Hi, Tim
What if I need to copy table and would like the Timestamp field value get copied too rather than generate. This way I can get two exactly same tables with generated timestamp field inside of the table? I thought I see something like disable generate field somewhere!! Thanks Jianfei |
Tue, Apr 1 2008 5:37 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jianfei,
<< What if I need to copy table and would like the Timestamp field value get copied too rather than generate. This way I can get two exactly same tables with generated timestamp field inside of the table? I thought I see something like disable generate field somewhere!! >> It sounds like what you want is a default value, not a generated value. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Apr 1 2008 6:36 PM | Permanent Link |
"Jianfei Xu" | Yes. I want Generated Value, when user modify records, I would like keep
tracking the lastest time the records get modified. Only if I copy records, I would like the timestamp keep the same as the lastest value, since the record did not change when it gets copied. If I disable generate timestamp before I copy record, of couse, allow me to override the timestamp field, that is what I want. Jianfei "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:C5B3DC31-AF7C-4DEB-9BA3-DD21762FC87D@news.elevatesoft.com... > Jianfei, > > << What if I need to copy table and would like the Timestamp field value > get copied too rather than generate. This way I can get two exactly same > tables with generated timestamp field inside of the table? > > I thought I see something like disable generate field somewhere!! >> > > It sounds like what you want is a default value, not a generated value. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Wed, Apr 2 2008 2:26 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jianfei
From what you describe I'd suggest 1) a default value of CURRENT_TIMESTAMP and 2) an on update trigger for the field. 1) will pick up the current time when the record is created and 2) will allow you to keep it up to date when anyone changes the record. Roy Lambert [Team Elevate] |
Wed, Apr 2 2008 2:07 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jianfei,
<< Yes. I want Generated Value, when user modify records, I would like keep tracking the lastest time the records get modified. >> Okay, in that case the Generated columns will work the way that you want once the fix for 1.09 is done and we add the copying facilities in 2.0. The copying facilities will allow rows to be copied without causing the generated column to be re-generated. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 2 2008 2:51 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
I didn't know GENERATED values would be updated when the record was which I think Jianfei is asking for. Roy Lambert |
Wed, Apr 2 2008 3:44 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< I didn't know GENERATED values would be updated when the record was which I think Jianfei is asking for. >> Yes, they are. The issue is what happens with generated columns that don't reference other columns in the table, such as what Jianfei was doing. The SQL standard talks about updating generated columns when referenced columns are updated, which is what we are currently doing (and why there is a bug for his usage), but I can't find anything yet that talks about what to do about expressions that don't reference other columns. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 2 2008 3:51 PM | Permanent Link |
"Jianfei Xu" | Thanks, Tim
Jianfei "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:94C295C5-B937-4463-A706-7938B5671653@news.elevatesoft.com... > Jianfei, > > << Yes. I want Generated Value, when user modify records, I would like > keep tracking the lastest time the records get modified. >> > > Okay, in that case the Generated columns will work the way that you want > once the fix for 1.09 is done and we add the copying facilities in 2.0. > The copying facilities will allow rows to be copied without causing the > generated column to be re-generated. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Thu, Apr 3 2008 1:56 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>Yes, they are. That's interesting and very useful. The issue is what happens with generated columns that don't >reference other columns in the table, such as what Jianfei was doing. The >SQL standard talks about updating generated columns when referenced columns >are updated, which is what we are currently doing (and why there is a bug >for his usage), but I can't find anything yet that talks about what to do >about expressions that don't reference other columns. I do love standards Roy Lambert |
This web page was last updated on Wednesday, May 15, 2024 at 08:40 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |