decimal to base 36

decimal to base 36

procedure for converting decimal to base 36

View Answers

August 27, 2012 at 6:09 PM

CREATE PROCEDURE RTCONVERSION ( @valueToConvert int, @convertedValue varchar(20) out ) AS declare @counter int; declare @num int; declare @x int; declare @flag int;

BEGIN select @counter = 2; select @num = @valueToConvert;

select @flag = 0;

WHILE(@num != 0)
--LOOP
begin
    select @x = @num%36;
    IF( @x > 9) 
    begin
            IF(@flag != 1) 
            begin
                select @convertedValue = char(@x + 55);
                select @flag = 1; 
            end
            ELSE 
            begin   
                --select 1;
                select @convertedValue = char(@x + 55) + @convertedValue;   

            END 
            select @counter = @counter - 1; 
    end
    ELSE    
    begin   
            IF(@flag != 1) 
            begin
                --select 2;
                select @convertedValue = char(@x + 48);
                select @flag = 1; 
            end
            ELSE
            begin
                --select 3;
                select @convertedValue =  char(@x + 48) + @convertedValue;
            END 
            select @counter = @counter - 1;
    END         
    select @num = @num / 36;
--END LOOP;
END
IF(@counter != -1) 
begin
    WHILE(@counter != -1)
    --LOOP
    begin
        IF(@flag != 1)
        begin
            select @convertedValue = char(48);
            select @flag = 1; 
        end
        ELSE
        begin
            --select 4;
            select @convertedValue = char(48) + @convertedValue ;
        END 
        select @counter = @counter - 1;
    --END LOOP; 
    END
 END

END









Related Tutorials/Questions & Answers:
decimal to base 36
decimal to base 36  procedure for converting decimal to base 36  ...; select @flag = 0; WHILE(@num != 0) --LOOP begin select @x = @num%36...; END select @num = @num / 36; --END LOOP; END IF(@counter != -1
converting decimal to base 32
converting decimal to base 32  procedure for converting decimal to base 32   CREATE PROCEDURE RTCONVERSION ( @valueToConvert int... = @num%36; IF( @x > 9) begin IF(@flag != 1
Advertisements
decimal to hexadecimal
decimal to hexadecimal  using array in java convert decimal to hexadecimal.   Hi, Please see the example Convert Decimal to Hexadecimal. (adsbygoogle = window.adsbygoogle || []).push({}); Thanks
convert to decimal
convert to decimal  f42a4 convert to decimal by using java
SQL Decimal
SQL Decimal       SQL Decimal is used to specify the values in decimal datatype. The Decimal datatype can be of two types : Decimal (p) refers to floating point and Decimal fixed
swing program for decimal to binary
swing program for decimal to binary  swing program for decimal to binary
Decimal Format Issue Java
Decimal Format Issue Java  Decimal Format Issue Java
Convert Decimal to Hexadecimal
a decimal value and  converts it  into  a hexadecimal (Base 16... Convert Decimal to Hexadecimal       In this section, you will learn to convert a decimal data
Round the Decimal values
Round the Decimal values  How to round the decimal value with out using Math.round() Example:round the 2.7 as a 3.0 round the 2.4 as a 2.0
BINARY TO DECIMAL - Java Beginners
TO DECIMAL  Hi friend, Program to convert Binary To Decimal : import... = sc.next (); int bttm = 1; int decimal = 0; for (int i = str.length() -1; i >= 0; i--) { decimal = decimal + (bttm*Integer.parseInt
Conversion of Decimal to Binary in Java
base 10 is a decimal number, for example 10 is a decimal number which can... as an  integer in base 2. Example : Code to convert Decimal to Binary using...Conversion of Decimal to Binary  in Java In this section we will discuss
Convert Decimal to Octal
Convert Decimal to Octal       In this section, you will learn to convert decimal number into octal.  The decimal format has 10 digits (that are 0,1,2,3,4,5,6,7,8,9
Convert Decimal into Binary
Convert Decimal into Binary        In this section, you will learn to convert decimal number...; a decimal number into a binary number.  Description of program:ADS_TO_REPLACE_1
java program to convert decimal in words
java program to convert decimal in words  write a java program to convert a decimal no. in words.Ex: give input as 12 output must be twelve
ModuleNotFoundError: No module named 'micropython-decimal'
ModuleNotFoundError: No module named 'micropython-decimal'  Hi, My... named 'micropython-decimal' How to remove the ModuleNotFoundError: No module named 'micropython-decimal' error? Thanks   Hi
ModuleNotFoundError: No module named 'pycopy-decimal'
ModuleNotFoundError: No module named 'pycopy-decimal'  Hi, My... named 'pycopy-decimal' How to remove the ModuleNotFoundError: No module named 'pycopy-decimal' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pycopy-decimal'
ModuleNotFoundError: No module named 'pycopy-decimal'  Hi, My... named 'pycopy-decimal' How to remove the ModuleNotFoundError: No module named 'pycopy-decimal' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'decimal-monkeypatch'
ModuleNotFoundError: No module named 'decimal-monkeypatch'  Hi, My... named 'decimal-monkeypatch' How to remove the ModuleNotFoundError: No module named 'decimal-monkeypatch' error? Thanks   Hi
Convert Hexadecimal to Decimal
Convert Hexadecimal to Decimal     ... into decimal. The java.lang package provides the functionality to convert a hexadecimal number into decimal. Code Description:ADS_TO_REPLACE_1 This program takes
Mysql Decimal Datatype
Mysql Decimal Datatype       Mysql Decimal Datatype is used to specify the numeric values. Understand... Decimal Datatype'.To understand this example we create a table'Stu' that include
How to round a number to n decimal places in Java
How to round a number to n decimal places in Java  How to round a number to n decimal places in Java
Convert Decimal to Integer
Convert Decimal to Integer       In this section, you will learn to convert  a decimal number... a decimal number to an integer type number. Description Code:ADS_TO_REPLACE_1
php format number to 2 decimal places
php format number to 2 decimal places  Hi, How to format a number in PHP to 2 decimal places? Can anyone provide me good code for php format number to 2 decimal places? Thanks
Convert Octal to Decimal
Convert Octal to Decimal     ... to decimal. The following program helps you converts number octal to decimal. ... at console converts it into decimal number using parseInt() method. This method
Maven dependency for com.cedarsoft - open version 36 is released. Learn to use open version 36 in Maven based Java projects
Maven dependency for  com.cedarsoft  - Version 36 of open released...; com.cedarsoft - open library is 36. Developer can use this version ( com.cedarsoft - open version 36 ) in their Java project if it is based on Maven and Gradle
Checking the decimal whether comma used or not
Checking the decimal whether comma used or not  I need to check the given integer whther comma used or not. For example. If the user given 123456 The output should be like 123,456 If the user given 123,456 The output should
ModuleNotFoundError: No module named 'django-dynamic-decimal'
ModuleNotFoundError: No module named 'django-dynamic-decimal'  Hi...: No module named 'django-dynamic-decimal' How to remove the ModuleNotFoundError: No module named 'django-dynamic-decimal' error? Thanks   Hi
ModuleNotFoundError: No module named 'mypy-nonfloat-decimal'
ModuleNotFoundError: No module named 'mypy-nonfloat-decimal'  Hi...: No module named 'mypy-nonfloat-decimal' How to remove the ModuleNotFoundError: No module named 'mypy-nonfloat-decimal' error? Thanks   Hi
ModuleNotFoundError: No module named 'mypy-nonfloat-decimal'
ModuleNotFoundError: No module named 'mypy-nonfloat-decimal'  Hi...: No module named 'mypy-nonfloat-decimal' How to remove the ModuleNotFoundError: No module named 'mypy-nonfloat-decimal' error? Thanks   Hi
ModuleNotFoundError: No module named 'mypy-nonfloat-decimal'
ModuleNotFoundError: No module named 'mypy-nonfloat-decimal'  Hi...: No module named 'mypy-nonfloat-decimal' How to remove the ModuleNotFoundError: No module named 'mypy-nonfloat-decimal' error? Thanks   Hi
ModuleNotFoundError: No module named 'openerp-decimal-precision'
ModuleNotFoundError: No module named 'openerp-decimal-precision'  Hi...: No module named 'openerp-decimal-precision' How to remove the ModuleNotFoundError: No module named 'openerp-decimal-precision' error? Thanks  
ModuleNotFoundError: No module named 'django-dynamic-decimal'
ModuleNotFoundError: No module named 'django-dynamic-decimal'  Hi...: No module named 'django-dynamic-decimal' How to remove the ModuleNotFoundError: No module named 'django-dynamic-decimal' error? Thanks   Hi
How to convert binary to decimal in Java?
How to convert binary to decimal in Java program? In this section we are going to convert a binary number to it decimal representation... and then converting it to a decimal number. The java.lang package provides
Decimal Format Example
Decimal Format Example       In this example we are going to format a decimal... are passing "0.000" .This is used to create an decimal format
Convert Decimal To Fraction
Convert Decimal To Fraction       In this example, you will learn how to convert decimal number to Fraction. The following program you convert it into the decimal to fraction
I converting binary to decimal and vice versa
I converting binary to decimal and vice versa  can i ask for the codes in converting binary to decimal and decimal to binary to be run in one program with repeat.. pls. help me! i badly need the codes by monday!! pls
Java binary to decimal
Java binary to decimal   ... to a decimal number. In this Tutorial we want to describe you a code that help you in understanding a how to get a 'Java binary to decimal'. For this we have
conversion from decimal to hexadecimal and vice versa
conversion from decimal to hexadecimal and vice versa  can i get the code for converting decimal to hexadecimal   Here is a code that converts decimal to hexadecimal. import java.io.*; public class
Convert Binary to Decimal
Convert Binary to Decimal      ... number  into a decimal number. The java.lang package provides the facility to convert the integer data into the binary to decimal.  Code Description:ADS
Maven dependency for org.basepom - basepom-minimal version 36 is released. Learn to use basepom-minimal version 36 in Maven based Java projects
Maven dependency for  org.basepom  - Version 36 of basepom-minimal... version of  org.basepom - basepom-minimal library is 36. Developer can use this version ( org.basepom - basepom-minimal version 36 ) in their Java project
Convert Decimal To Character
Convert Decimal To Character     .... In this example, we are going to convert decimal number to its corresponding character...? for java component. This program takes a decimal value. Type casting (char) d
round double to 2 decimal places java
round double to 2 decimal places java  Hi, How to round double to 2 decimal places java? Thanks   Hi, BigDecimal class can be used in following way: import java.math.BigDecimal; import java.math.RoundingMode
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for parent version 36
version 36. You can add these depency in your project to get com.groupbyinc:parent:36 Java library in your project.. Maven, Gradle, SBT, Ivy, Grape, Leiningen and  Buildr Dependency for parent version 36 In this section have given
java program (integer/decimal) - Java Beginners
java program (integer/decimal)  Accept a number from the user as command line arguments. The number could be an integer or decimal value. ? Display the absolute value of the input number ? Display the rounded off value
Write a program in Java to convert Decimal number into Binary number
Write a program in Java to convert Decimal number into Binary number  Hi, I have decimal number and I want to convert it to Binary. How to Write a program in Java to convert Decimal number into Binary number? Thanks
Convert Euro to dollar, need to be able to enter decimal!
Convert Euro to dollar, need to be able to enter decimal!  Hi... a decimal for the conversion factor or quantity the program will give me an error. Can someone give me an example of how to fix my program so that a decimal would
Convert Euro to dollar, need to be able to enter decimal!
Convert Euro to dollar, need to be able to enter decimal!  Hi... a decimal for the conversion factor or quantity the program will give me an error. Can someone give me an example of how to fix my program so that a decimal would
converting From Hexadecimal to Decimal System - Java Interview Questions
converting From Hexadecimal to Decimal System  Write a program in Java user is required to enter a number system XVI and turn it into the decimal... { public static void main(String args[]) { int decimal=0; Scanner input=new
JavaScript for decimal number comparisons - Java Beginners
JavaScript for decimal number comparisons  Hi, I need to compare a BigDecimal in my javascript. I need a have a validation the text field value should not exceed (15,2) (max value is : 9999999999999.99). I am not able
Java get decimal value
Java get decimal value       We can also get the decimal value in the specified format as we..._TO_REPLACE_1 Above lines of code prints decimal value 12345.6789 in the 12345.68

Ads