当前位置:网站首页>Chapter 119 SQL function right
Chapter 119 SQL function right
2022-04-22 18:15:00 【yaoxin521123】
List of articles
The first 119 Chapter SQL function RIGHT
Scalar string function , It starts at the end of the string expression ( The rightmost position ) Returns a specified number of characters .
The outline
{
fn RIGHT(string-expression,count)}
Parameters
string-expression- String expressions , It can be a column name 、 String literal or the result of another scalar function , The basic data type can be expressed as any character type ( for exampleCHARorVARCHAR).count- Integers , Specify fromstring-expressionThe end of ( Far right ) Number of characters returned from position .
describe
RIGHT From the end of the string expression ( The rightmost position ) return count Characters . If you pass... For any parameter NULL value ,RIGHT Will return NULL.
RIGHT Can only be used for ODBC Scalar function ( Use brace Syntax ).
Example
The following example returns Sample.Person The rightmost two characters of each name in the table :
SELECT Name,{fn RIGHT(Name,2)}AS MiddleInitial
FROM Sample.Person

The following embedded SQL The example shows RIGHT How to handle a count longer than the string itself :
/// d ##class(PHA.TEST.SQLFunction).Right()
ClassMethod Right()
{
&sql(
SELECT Name,{
fn RIGHT(Name,40)}
INTO :a,:b
FROM Sample.Person
)
if SQLCODE '= 0 {
w !,"Error code ",SQLCODE
} else {
w !,a,"=original",!,b,"=RIGHT 40"
}
}
DHC-APP> d ##class(PHA.TEST.SQLFunction).Right()
Adams,Diane F.=original
Adams,Diane F.=RIGHT 40
Do not perform population .
版权声明
本文为[yaoxin521123]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221810464946.html
边栏推荐
- leetcode--806. 写字符串需要的行数
- leetcode-470. 用 Rand7() 实现 Rand10()
- leetcode 108:将有序数组转换为二叉搜索树
- 国产芯片DP9637-K总线收发器替代L9637D芯片和SI9241
- Notes on soft test high items | contents of detailed feasibility study
- Esprima ECMAScript parsing architecture
- What is the development trend of 5g chip in 2022?
- [Lane] ultra fast lane detection (2) custom model test
- Configuring test libraries for JUnit
- Fastjson 2 is coming, the performance continues to improve, and it can fight for another ten years
猜你喜欢

接口协议之抓包分析 TCP 协议

秒雲助力中電科32所發布“基於擬態應用集成框架的SaaS雲管理平臺解决方案”

膨胀卷积论文笔记

【论文泛读】Easing Embedding Learning by Comprehensive Transcription of Heterogeneous Information Networks
![[thinking and progress]: regret about yourself](/img/e4/1658eae714440ccc1800aee5b2048c.jpg)
[thinking and progress]: regret about yourself

I still don't understand the relative path and absolute path. This article takes you to analyze it briefly

Notes on soft test high items | contents of detailed feasibility study

构建中国云生态 | 华云数据与百信完成产品兼容互认证 携手推动信创产业高质量发展

208. 实现 Trie (前缀树)

Secyun assisted the "SaaS cloud management platform solution based on pseudo application integration framework" released by CETC 32
随机推荐
Dynamic programming: multiple knapsack problem
[Lane] ultra fast lane detection (2) custom model test
第119章 SQL函数 RIGHT
Youqilin 22.04 lts version is officially released | ukui 3.1 opens a new experience!
This API hub is powerful. It contains open APIs such as nailing enterprise wechat, and can be debugged directly!
208. 实现 Trie (前缀树)
Interface test mock practice (II) | complete batch manual mock in combination with JQ
学习文档。
What data indicators should app focus on?
【bat】查看文件md5
构建中国云生态 | 华云数据与百信完成产品兼容互认证 携手推动信创产业高质量发展
Pytorch Note57 Pytorch可视化网络结构
Secyun assisted the "SaaS cloud management platform solution based on pseudo application integration framework" released by CETC 32
反射:newInstance()根据包名加类名得到具体类对象接口,调用指定类中的方法.
golang-gin-websocket问题
接口测试 Mock 实战(二) | 结合 jq 完成批量化的手工 Mock
After calling Bapi many times, what is the problem with the last one-time commit work?
电脑硬件中最重要的部分是什么?
Esprima ECMAScript 解析架构
接口测试 Mock 实战(二) | 结合 jq 完成批量化的手工 Mock