1

It is possible to assign a GUID value to each existing record in a dynamic way?

I'm recently add a hidden field with this value in a register form, but I need to assign a unique value to records that exists before this change.

3
  • Does the DE already have a primary key?
    – EazyE
    Nov 4 '19 at 22:52
  • Yes, I'm using email address as primary key
    – Fernando
    Nov 5 '19 at 15:03
  • 1
    since you have a PK you can use Jackson query below and populate the field
    – EazyE
    Nov 5 '19 at 15:23
3

You can query the data extension and assign a GUID to each record. Also take into account EazyE's question on whether or not it already has a Primary Key. I'm assuming the GUID won't be the PK since it doesn't exist on records before your change.

SELECT NewId() AS GUID
FROM DataExtension
3
  • Thanks Jackson Chen, I have tried with this and it show me this error: "Failed to save the Query field. The 'Email' field is mandatory for the extension of destination data. Make sure this field is specified in the text of your query." Any idea?
    – Fernando
    Nov 5 '19 at 15:32
  • I'm pretty new with sql, but I've already read the documentation and I achieve the goal with your help, thanks a lot @Jackson Chen
    – Fernando
    Nov 5 '19 at 16:39
  • 1
    Looks like you figured it out @Fernando. Sounds like your 'Email' field is non-nullable so you'll need to include that in your query. Nov 5 '19 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.