|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Friday, November 09, 2012 8:46 AM
Points: 459,
Visits: 180
|
|
| Comments posted to this topic are about the item TSQL
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 5:50 PM
Points: 1,308,
Visits: 3,899
|
|
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
|
|
|
|
|
SSC-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.
|
|
|
|
|
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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
|
|
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"
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, June 13, 2012 1:23 AM
Points: 2,162,
Visits: 170
|
|
Hi
Can we get any poinsts for such questions ?
|
|
|
|
|
SSC 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...
|
|
|
|
|
Old 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"....
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Friday, November 09, 2012 8:46 AM
Points: 459,
Visits: 180
|
|
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.
|
|
|
|
|
Old 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 ???
|
|
|
|