Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

TSQL Expand / Collapse
Author
Message
Posted Saturday, April 11, 2009 11:10 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, August 7, 2014 6:48 PM
Points: 459, Visits: 183
Comments posted to this topic are about the item TSQL
Post #695266
Posted Saturday, April 11, 2009 11:11 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 8:54 AM
Points: 1,778, Visits: 5,729
The answer is wrong - you click No - and get told you are wrong.then the explanation goes on to agree that you cannot use RAND...@?

MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #695267
    Posted Saturday, April 11, 2009 3:56 PM
    SSC-Enthusiastic

    SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

    Group: General Forum Members
    Last Login: Friday, December 14, 2012 4:59 PM
    Points: 138, Visits: 43
    I agree. The answer is wrong according to the given explanation.
    Post #695347
    Posted Saturday, April 11, 2009 9:03 PM
    SSC Eights!

    SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

    Group: General Forum Members
    Last Login: Friday, December 14, 2012 6:45 AM
    Points: 881, Visits: 324
    The correct answer is no, and I would imagine that the people in power will correct the issue soon. In addition to the explanation given in the answer, the following which is taken directly from the MSDN page used as a reference states you cannot use RAND (in addition to several other built-in functions) in UDFs:

    Built-in functions that can return different data on each call are not allowed in user-defined functions. The built-in functions not allowed in user-defined functions are:

    @@CONNECTIONS
    @@CPU_BUSY
    @@IDLE
    @@IO_BUSY
    @@MAX_CONNECTIONS
    @@PACK_RECEIVED
    @@PACK_SENT
    @@PACKET_ERRORS
    @@TIMETICKS
    @@TOTAL_ERRORS
    @@TOTAL_READ
    @@TOTAL_WRITE
    GETDATE
    GetUTCDate
    NEWID
    RAND
    TEXTPTR
    Post #695378
    Posted Sunday, April 12, 2009 11:41 PM


    SSCrazy

    SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

    Group: General Forum Members
    Last Login: Monday, September 1, 2014 6:55 AM
    Points: 2,365, Visits: 1,845
    Douglas Duncan (4/11/2009)
    The correct answer is no, and I would imagine that the people in power will correct the issue soon. In addition to the explanation given in the answer, the following which is taken directly from the MSDN page used as a reference states you cannot use RAND (in addition to several other built-in functions) in UDFs:

    Built-in functions that can return different data on each call are not allowed in user-defined functions. The built-in functions not allowed in user-defined functions are:

    @@CONNECTIONS
    @@CPU_BUSY
    @@IDLE
    @@IO_BUSY
    @@MAX_CONNECTIONS
    @@PACK_RECEIVED
    @@PACK_SENT
    @@PACKET_ERRORS
    @@TIMETICKS
    @@TOTAL_ERRORS
    @@TOTAL_READ
    @@TOTAL_WRITE
    GETDATE
    GetUTCDate
    NEWID
    RAND
    TEXTPTR


    i certainly hope so.


    "Keep Trying"
    Post #695558
    Posted Sunday, April 12, 2009 11:50 PM
    SSCrazy

    SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

    Group: General Forum Members
    Last Login: Tuesday, September 16, 2014 4:01 AM
    Points: 2,404, Visits: 198
    Hi

    Can we get any poinsts for such questions ?
    Post #695561
    Posted Monday, April 13, 2009 12:22 AM
    SSC Veteran

    SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

    Group: General Forum Members
    Last Login: Wednesday, September 30, 2009 3:26 AM
    Points: 299, Visits: 88
    that was confusing!

    like a lady who changes her mind very every now and then..

    but anyway, i think they should give the points on this one...
    Post #695566
    Posted Monday, April 13, 2009 1:15 AM
    Old Hand

    Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

    Group: General Forum Members
    Last Login: Tuesday, May 11, 2010 2:15 AM
    Points: 327, Visits: 364
    I think there is a approval process before this question comes in "QOD"....
    Post #695577
    Posted Monday, April 13, 2009 2:12 AM
    SSC-Addicted

    SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

    Group: General Forum Members
    Last Login: Thursday, August 7, 2014 6:48 PM
    Points: 459, Visits: 183
    don't cry too much this is not your Board exam. Regarding the point moderator will check for the point.. I can't modified the answer of this question and motive of QOD it just to update yourself on various SQL topic. So even the question’s answer was as wrong but you learn something about the RAND() function.
    Post #695588
    Posted Monday, April 13, 2009 3:00 AM
    Old Hand

    Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

    Group: General Forum Members
    Last Login: Tuesday, May 11, 2010 2:15 AM
    Points: 327, Visits: 364
    mverma4you (4/13/2009)
    don't cry too much this is not your Board exam. Regarding the point moderator will check for the point.. I can't modified the answer of this question and motive of QOD it just to update yourself on various SQL topic. So even the question’s answer was as wrong but you learn something about the RAND() function.


    What kind of explanation is that ???
    Post #695596
    « Prev Topic | Next Topic »

    Add to briefcase 1234»»»

    Permissions Expand / Collapse