0 Populating "First visit" date 2 Michael Garrison posted 9 Years Ago I'm working on a report which will rely heavily on the "First visit" date- but my problem is that for most of the data imported via Excavator, those dates are blank. I have a Group set up in rock with people who I want to fill in the "First Visit" date to be equal to the "Date Record Created" attribute. Using the Batch Update function I could set the "First Visit" date to a single arbitrary date for every person in the group, but I'd like it to be just a little more accurate. I see that the "First visit" attribute is type 717, so I started experimenting with using an INSERT statement to create the value for each person. But the GUID is required and isn't auto-generated like the Id is upon insert. Is there a function I can call to generate a GUID on the fly? And is there somewhere else that GUID needs to get stored in another table? (I tried searching through the entire database to find another reference of a GUID Rock created when I added a "First visit" date to someone's profile for the first time but came up empty - but I'm not confident that I might not have missed it and that it will turn out to be necessary for Rock to function properly. Any insight would be helpful, thanks!
Michael Garrison 9 years ago Helps a lot- thanks. I'm curious about the need/difference for both a Row ID and a GUID. But that's probably a discussion for another time... and now I know that's all it's used for I'll run my query and go on my merry way.
David Leigh 9 years ago The Row ID is used internally to create links (foreign keys) between related records in different tables. It is an integer value, very efficient for performing index lookups and only unique for a single table in a single database. The GUID is (almost certainly) unique across database instances, so very useful for using as a portable reference to a record - but it is also a very large, unsequenced value that is (comparatively) inefficient to use for database lookups and join operations. So they are both useful in different scenarios, if that makes sense.