July 19, 2011 at 10:53 am
There is a built in method for sql server. This function or method uses a special sequence of numbers. This sequence of numbers allows you to add any set of numbers together and never get the same value as another set. So you can take a number from the set and pass it into this method along with the total and sql will return a true if that number is in the set of numbers that equal the total. This may be a vague explanation but I hope it is enough for the answer. Thanks for the replies.
July 19, 2011 at 12:06 pm
homework?
interview?
You are correct that this is vague.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 19, 2011 at 12:15 pm
maybe you are referring to checksum or binary_checksum,
that method can provide a unique value based on one or more columns of data, but I cannot think anything that does this part: " pass it into this method along with the total and sql will return a true if that number is in the set of numbers that equal the total."
Lowell
July 19, 2011 at 12:53 pm
No homework or interview.
Used this before in a previous position.
July 19, 2011 at 12:55 pm
Maybe if you shed some light on the context we might be able to come up something.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 19, 2011 at 1:00 pm
It was used in setting rolls on a website. There were different parts of the site assigned to a particular number. If I could remember the sequence of numbers this would help terrifically but I cannot so helping the situation is only by further explanation in what it was used for. I am pretty sure that the way i described is the way it works. Thanks for the replies
July 19, 2011 at 1:05 pm
The only other things I can think would be "exists" "not exists" or "in". I have no clue what would do the things you say it did. Could it have been a user defined function or a stored proc?
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 19, 2011 at 2:20 pm
This vaguely sounds like one of the old encryption/hashing methods in SQL 2000 and before that have long-since-been-dropped-from-the-product. Which version of SQL Server were you on at the time?
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
July 19, 2011 at 4:50 pm
I was using 2k5. The stored procedure is not using any encryption it is a specific method function that checks if a particular number in this sequence of numbers matches to what is the answer. This sequence is sorta like the Fibinocci sequence but opposite where no combination of numbers added together equals a number in the list plus any set of numbers added together are unique. This means that if number 2 of the sequence is not in the total then it does not match the criteria. Dang I surely wish I saved a copy of this function. All it is a simple call similar to getdate(). Thanks for the replies.
July 19, 2011 at 5:18 pm
I was thinking of built-in functions...what you just described now has me thinking it was a user-defined function.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
July 19, 2011 at 5:27 pm
No sir it is indeed built in function. Apparently it is rather obscure. Thanks for the replies.
July 19, 2011 at 5:34 pm
Please post back when you find out...I am always interested in these neat little oddities
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
July 19, 2011 at 5:42 pm
In SSMS look in master under Programmability>Functions>System Functions>Scalar-valued Functions
Interesting one:
SELECT sys.fn_numberOf1InVarBinary(0xEF0207)
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
July 19, 2011 at 7:34 pm
This is a built in function. 2k5 is the version. I need to figure out what in the world this sequence is called that should shed some light on this. I think it might start with an H. thanks for the replies
July 19, 2011 at 7:50 pm
No this is a built in function. I think it starts with an h or g. There is a high possibility those are the letters that it starts with. Thanks for the reply.
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy