July 13, 2017 at 7:15 am
The prior DBA used FoxPro for a utility. I am rewriting it in SQL and need assistance with a command. At a certain time he uses Sys(2017, '',0, 3) for a CRC value. I do not know how to compute the same value in SQL. Any help would be much appreciated. I know the Sys(2017) has something to do with the row where:
Sys(2017) is the command.
'' is the expression and means it does not exclude fields except for memo and general fields.
0 is the nseed where it does nothing because for CRC32 VFP disregards this.
3 is the flag where I tells it to be based on the current record including memo fields using CRC32.
Thanks
July 13, 2017 at 7:24 am
bswhipp - Thursday, July 13, 2017 7:15 AMThe prior DBA used FoxPro for a utility. I am rewriting it in SQL and need assistance with a command. At a certain time he uses Sys(2017, '',0, 3) for a CRC value. I do not know how to compute the same value in SQL. Any help would be much appreciated. I know the Sys(2017) has something to do with the row where:
Sys(2017) is the command.
'' is the expression and means it does not exclude fields except for memo and general fields.
0 is the nseed where it does nothing because for CRC32 VFP disregards this.
3 is the flag where I tells it to be based on the current record including memo fields using CRC32.Thanks
I haven't touched VFP in a long time, but by the description, maybe CHECKSUM or BINARY_CHECKSUM could work for you.
July 13, 2017 at 7:29 am
MSDN info here
https://msdn.microsoft.com/en-us/library/aa977006(v=vs.71).aspx
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 13, 2017 at 7:32 am
J Livingston SQL - Thursday, July 13, 2017 7:29 AM
I am looking at the Checksum() but am not 100% sure how to use it.
July 13, 2017 at 12:16 pm
bswhipp - Thursday, July 13, 2017 7:32 AMJ Livingston SQL - Thursday, July 13, 2017 7:29 AMI am looking at the Checksum() but am not 100% sure how to use it.
CHECKSUM(Field1, Field2, Field3, ...)
Using it is as easy as adding as many fields from the table to the function as you want it to compute a checksum on. Just be aware that collisions ARE possible.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
July 14, 2017 at 5:47 am
Thanks, but you would think there would be a better way. I have several fields that need to be included to see if I can replicate the same checksum as the sys() function.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply