1. <tfoot id='oTxbq'></tfoot>

    <small id='oTxbq'></small><noframes id='oTxbq'>

      <bdo id='oTxbq'></bdo><ul id='oTxbq'></ul>
    <i id='oTxbq'><tr id='oTxbq'><dt id='oTxbq'><q id='oTxbq'><span id='oTxbq'><b id='oTxbq'><form id='oTxbq'><ins id='oTxbq'></ins><ul id='oTxbq'></ul><sub id='oTxbq'></sub></form><legend id='oTxbq'></legend><bdo id='oTxbq'><pre id='oTxbq'><center id='oTxbq'></center></pre></bdo></b><th id='oTxbq'></th></span></q></dt></tr></i><div id='oTxbq'><tfoot id='oTxbq'></tfoot><dl id='oTxbq'><fieldset id='oTxbq'></fieldset></dl></div>

    1. <legend id='oTxbq'><style id='oTxbq'><dir id='oTxbq'><q id='oTxbq'></q></dir></style></legend>

      仅使用 SQL 将 Base 36 转换为 Base 10

      Base 36 to Base 10 conversion using SQL only(仅使用 SQL 将 Base 36 转换为 Base 10)

      <i id='HmLW5'><tr id='HmLW5'><dt id='HmLW5'><q id='HmLW5'><span id='HmLW5'><b id='HmLW5'><form id='HmLW5'><ins id='HmLW5'></ins><ul id='HmLW5'></ul><sub id='HmLW5'></sub></form><legend id='HmLW5'></legend><bdo id='HmLW5'><pre id='HmLW5'><center id='HmLW5'></center></pre></bdo></b><th id='HmLW5'></th></span></q></dt></tr></i><div id='HmLW5'><tfoot id='HmLW5'></tfoot><dl id='HmLW5'><fieldset id='HmLW5'></fieldset></dl></div>
    2. <tfoot id='HmLW5'></tfoot><legend id='HmLW5'><style id='HmLW5'><dir id='HmLW5'><q id='HmLW5'></q></dir></style></legend>
      • <small id='HmLW5'></small><noframes id='HmLW5'>

            <bdo id='HmLW5'></bdo><ul id='HmLW5'></ul>
                <tbody id='HmLW5'></tbody>

                本文介绍了仅使用 SQL 将 Base 36 转换为 Base 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                出现了一种情况,我需要在 SQL 语句的上下文中执行 base 36 到 base 10 的转换.Oracle 9 或 Oracle 10 中似乎没有内置任何内容来解决此类问题.我的 Google-Fu 和 AskTom 建议创建一个 pl/sql 函数来处理该任务.在这一点上,这对我来说不是一个选择.我正在寻找可能有助于我解决此问题的方法的建议.

                A situation has arisen where I need to perform a base 36 to base 10 conversion, in the context of a SQL statement. There doesn't appear to be anything built into Oracle 9, or Oracle 10 to address this sort of thing. My Google-Fu, and AskTom suggest creating a pl/sql function to deal with the task. That is not an option for me at this point. I am looking for suggestions on an approach to take that might help me solve this issue.

                把它变成一个视觉形式...

                To put this into a visual form...

                WITH
                Base36Values AS
                (
                    SELECT '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' myBase36 FROM DUAL
                ),
                TestValues AS
                (
                    SELECT '01Z' BASE36_VALUE,
                            71   BASE10_VALUE FROM DUAL
                )
                SELECT *
                FROM Base36Values,
                     TestValues
                

                我正在寻找根据输入 01Z 计算值 71 的东西.编辑 - 这是向后......给定 01Z 将其转换为 71.

                I am looking for something to calculate the value 71, based on the input 01Z. EDIT - that is backwards... given 01Z translate it to 71.

                作为贿赂,每一个有用的答案都会得到一个免费的赞.

                As a bribe, each useful answer gets a free upvote.

                谢谢

                邪恶.

                推荐答案

                select sum(position_value) from
                (
                  select power(36,position-1) * case when digit between '0' and '9' 
                                                     then to_number(digit)
                                                     else 10 + ascii(digit) - ascii('A')
                                                end
                          as position_value
                    from (
                          select substr(input_string,length(input_string)+1-level,1) digit, 
                                 level position
                            from (select '01Z' input_string from dual)
                            connect by level <= length(input_string)
                         )
                )
                

                这篇关于仅使用 SQL 将 Base 36 转换为 Base 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                SQL query to group by day(按天分组的 SQL 查询)
                What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                Include missing months in Group By query(在 Group By 查询中包含缺失的月份)
                  <bdo id='n2Gpv'></bdo><ul id='n2Gpv'></ul>

                  <small id='n2Gpv'></small><noframes id='n2Gpv'>

                    <tbody id='n2Gpv'></tbody>
                    <legend id='n2Gpv'><style id='n2Gpv'><dir id='n2Gpv'><q id='n2Gpv'></q></dir></style></legend>

                          <tfoot id='n2Gpv'></tfoot>
                          <i id='n2Gpv'><tr id='n2Gpv'><dt id='n2Gpv'><q id='n2Gpv'><span id='n2Gpv'><b id='n2Gpv'><form id='n2Gpv'><ins id='n2Gpv'></ins><ul id='n2Gpv'></ul><sub id='n2Gpv'></sub></form><legend id='n2Gpv'></legend><bdo id='n2Gpv'><pre id='n2Gpv'><center id='n2Gpv'></center></pre></bdo></b><th id='n2Gpv'></th></span></q></dt></tr></i><div id='n2Gpv'><tfoot id='n2Gpv'></tfoot><dl id='n2Gpv'><fieldset id='n2Gpv'></fieldset></dl></div>