How to handle Huge numbers greater than bigint datatype

  • Hi Everybody,

    I am developing a tree in that according to the position each node will be displayed. So my nodes posiontion are exceedes the range of bigint of SQL Server.

    Please help me to overcome this problem.

    Thanks in advance!

     

    Haresh

  • Try "decimal (38, 0)"

    Gives 10 ^ 38 or so.

  • Thanks for your reply.I really Appreciate you.

    It's really helpful to me.

    But by using decimal(38,0) I can make a tree of 1422 level and I am sure that my tree exceeds this level. I tried to make User Defined Data Types in SQL Server but those are also dependent on SQL Datatypes, so that's also not useful to me.

    Please be helpful me to solve this Limitation of tree levels.

     

    Haresh

  • Float is probably out because it's not exact.

    What about a composite key, say

    2 decimal (38,0) fields, defined as the PK

    It'd need some trigger or sp code to count up but that would give 10^76. If I remember my maths right.

    I

  • It's really helpful to me.

    After some implementation and testing, I will ping to you if you are not bored.

     

    Thanks again for your better help.

  • No problems.

    Always nice to be able to help and practise some coding.

  • What are you doing exactly that will need more than 1400 levels???

  • Thanks for your reply.

    I am making a tree of contacts in which I have to show all the contacts to a user, added by himself, his priors and below persons but in the same leg. Means if prior, user itself and below persons add contacts in the same leg those contacts should be visible by User.

     

  • For some reason I beleieve that if you need an integer number greater than max bigint you  have probably bigger problems!

    why 1500 nodes need a number greater than:

    9,223,372,036,854,775,807

    I probably don't even know how to pronounce that

     


    * Noel

  • I think bigger problems here is an understatement... how the hell do you expect the users to navigate through that?????

  • FINALLY...something that even noeld admits to (maybe) not knowing!

    btw - noeld - did you know that remi's hero - the great jc is going to be at the PASS summit - will you be giving him a piece of your mind if you meet him ?!?!







    **ASCII stupid question, get a stupid ANSI !!!**

  •  .... - will you be giving him a piece of your mind if you meet him ?!?!

    I don't even want to think about that

    9,223,372,036,854,775,807 ...FINALLY...something that even noeld admits to (maybe) not knowing

    but I can always find  out

    nine quintillion,

    two hundred twenty-three quadrillion,

    three hundred seventy-two trillion,

    thirty-six billion,

    eight hundred fifty-four million,

    seven hundred seventy-five thousand,

    eight hundred seven

     


    * Noel

  • 9,223,372,036,854,775,807...I could go cross-eyed just reading that darn thing and counting the # of digits...so I'll just wisely leave the knowledge of the quintillion #s to you....

    I don't even want to think about that....what a shame! I was hoping you would perform some more heroics....in your own inimitable way!







    **ASCII stupid question, get a stupid ANSI !!!**

  • BTW: What happened to your disguise threat? is it not going to happen ?


    * Noel

  • It IS going to happen!!!...tener paciencia...quiero mas tiempo...(????) - my spanish is very rusty!







    **ASCII stupid question, get a stupid ANSI !!!**

Viewing 15 posts - 1 through 15 (of 30 total)

You must be logged in to reply to this topic. Login to reply