Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

List of RTA numbers based on the lucky number you

By Satyanarayana B,

Using this procedure you can get the list of 4 digit number and the sum of those 4 digits is equal to your given input number. its helpful when you choose your RTA (Regional Transportation Authority) Vehicle number.

Input For this procedure: Single Digit Number (May be your luck number)

Output From this procedure: it gives the list of 4 digits Number and the sum of the 4 digits is equal to your lucky number

Example:

Input Number: 5

The List of output values:

1    0005
2    0014
3    0023
4    0032
5    0041
6    0050
7    0059
8    0068
9    0077
10    0086
11    0095
12    0104
13    0113
14    0122
15    0131

Like this it gives the output values

Total article views: 71 | Views in the last 30 days: 1
 
Related Articles
FORUM

Parameterised Input stored procedure

Parameterised Input stored procedure

FORUM

maximum number of output parameters we can use in Stored procedure

maximum number of output parameters we can use in Stored procedure

FORUM

xml input for stored procedure

xml input for stored procedure

FORUM

How to add "dot" after every three digits in a number in sql 2005

How to add "dot" after every three digits in a number in sql 2005

Tags
miscellaneous    
t-sql    
 
Contribute