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 123»»»

The Percent Sign in T-SQL Expand / Collapse
Author
Message
Posted Saturday, February 26, 2011 10:57 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 3:46 PM
Points: 598, Visits: 3,821
Comments posted to this topic are about the item The Percent Sign in T-SQL

______________________________________________________________________
The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking
Post #1070114
Posted Saturday, February 26, 2011 10:57 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 2:03 PM
Points: 2,278, Visits: 3,806
Easy one

Mohammed Moinudheen
Post #1070115
Posted Sunday, February 27, 2011 11:46 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 19, 2011 1:59 AM
Points: 1,042, Visits: 234
Thanks for easy question.
Post #1070337
Posted Monday, February 28, 2011 1:04 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, November 13, 2014 3:36 AM
Points: 1,012, Visits: 1,000
easy one, thanks

Iulian
Post #1070352
Posted Monday, February 28, 2011 1:36 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 11:18 PM
Points: 13,545, Visits: 11,360
Nice and easy, good for a Monday morning. Thanks.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1070361
Posted Monday, February 28, 2011 2:52 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, August 27, 2013 4:28 AM
Points: 1,248, Visits: 779
Nice easy one to start of the week, cheers.

_____________________________________________________________________
"The difficult tasks we do immediately, the impossible takes a little longer"
Post #1070386
Posted Monday, February 28, 2011 4:05 AM
SSC Eights!

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

Group: General Forum Members
Last Login: Monday, October 20, 2014 6:19 AM
Points: 985, Visits: 351
Thanks.

It would have been nice to have a shortcut for 0/0 (divide zero by zero) .
Post #1070408
Posted Monday, February 28, 2011 8:02 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:42 AM
Points: 3,688, Visits: 72,435
I got this right but...

SELECT 0%0

gives

Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.


So it seems you can use it to divide 0 by 0 and get an error.




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #1070541
Posted Monday, February 28, 2011 8:41 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 9:33 PM
Points: 1,359, Visits: 1,728
mtassin (2/28/2011)
I got this right but...

SELECT 0%0

gives

Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.


So it seems you can use it to divide 0 by 0 and get an error.




This makes sense, since a modulus can be defined as a product of division, you have to be able to do the division. Some systems, though, define x mod 0 as x (i.e, the difference between x and the nearest multiple of 0 [which is 0 (because 0 is the only multiple of 0.)])
Post #1070590
Posted Monday, February 28, 2011 9:05 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,228, Visits: 1,046
So happy that over 80 percent of us know math.

Can you imagine how hard it would be a SQL developer or DBA if you didn't learn higher level math?
Post #1070608
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse