Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Extensions » View Thread |
Messages 1 to 7 of 7 total |
Calculating a Hash Value |
Tue, Sep 29 2009 2:51 AM | Permanent Link |
Steve Forbes Team Elevate | Hi Guys,
Is it possible to pass the equivalent of a dynamic array to an extension function? I want to create a function that calculates a hash value based on the array (of column values) passed to it. The function will be called by a trigger whenever a record is created or updated and the resulting hash value inserted into a column of the same table. Best regards Steve |
Tue, Sep 29 2009 3:48 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Steve
Any reason why you can't just pass in all the columns? AFAIK there's no restriction on the number of columns you can pass in. Roy Lambert [Team Elevate] |
Tue, Sep 29 2009 8:44 AM | Permanent Link |
Steve Forbes Team Elevate | Hi Roy,
Is there a way to do that generically? I want to use the function for a hash value on records in a number of different tables. Best regards Steve Roy Lambert wrote: > Steve > > Any reason why you can't just pass in all the columns? AFAIK there's no restriction on the number of columns you can pass in. > > Roy Lambert [Team Elevate] > |
Tue, Sep 29 2009 9:46 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Steve
>Is there a way to do that generically? I want to use the function for a >hash value on records in a number of different tables. Not until Tim gets the array/row values thingy working. Until then how about passing in a single delimited parameter and splitting in the function eg PROCESSFIELDS(field1+'¬'+field2+'¬'+CAST(field3 as varchar)) Roy Lambert [Team Elevate] |
Tue, Sep 29 2009 4:19 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Steve,
<< Is it possible to pass the equivalent of a dynamic array to an extension function? I want to create a function that calculates a hash value based on the array (of column values) passed to it. The function will be called by a trigger whenever a record is created or updated and the resulting hash value inserted into a column of the same table. >> You won't be able to do so until we figure out a way to get a TParam to do arrays. In the meantime, Roy is correct, you simply need to pass the data in as a VARCHAR that is delimited with a special character. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Sep 29 2009 5:33 PM | Permanent Link |
Steve Forbes Team Elevate | Thanks Tim
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:EE3FCBF4-F931-4B2E-9856-BA4782218F66@news.elevatesoft.com... > Steve, > > << Is it possible to pass the equivalent of a dynamic array to an > extension function? I want to create a function that calculates a hash > value based on the array (of column values) passed to it. The function > will be called by a trigger whenever a record is created or updated and > the resulting hash value inserted into a column of the same table. >> > > You won't be able to do so until we figure out a way to get a TParam to do > arrays. In the meantime, Roy is correct, you simply need to pass the data > in as a VARCHAR that is delimited with a special character. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Tue, Sep 29 2009 5:34 PM | Permanent Link |
Steve Forbes Team Elevate | Hi Roy,
Thanks mate Stevo "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message news:A3F59325-1C38-44B6-8B9A-02A0589C8126@news.elevatesoft.com... > Steve > >>Is there a way to do that generically? I want to use the function for a >>hash value on records in a number of different tables. > > Not until Tim gets the array/row values thingy working. Until then how > about passing in a single delimited parameter and splitting in the > function eg > > PROCESSFIELDS(field1+'¬'+field2+'¬'+CAST(field3 as varchar)) > > Roy Lambert [Team Elevate] |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |