⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sp_chartopinyin.sql

📁 Delphi6开发的HIS程序
💻 SQL
字号:
create or replace function sp_chartopinyin
(
  c char
)
return char
is
  i integer;
  result char;
begin
  i := ascii(c);

  if i >= ascii('啊') and i < ascii('芭') then 
    result := 'A';
  elsif i >= ascii('芭') and i < ascii('擦') then
    result := 'B';
  elsif i >= ascii('擦') and i < ascii('搭') then 
    result := 'C';
  elsif i >= ascii('搭') and i < ascii('蛾') then 
    result := 'D';
  elsif i >= ascii('蛾') and i < ascii('发') then 
    result := 'E';
  elsif i >= ascii('发') and i < ascii('噶') then 
    result := 'F';
  elsif i >= ascii('噶') and i < ascii('哈') then 
    result := 'G';
  elsif i >= ascii('哈') and i < ascii('击') then 
    result := 'H';
  elsif i >= ascii('击') and i < ascii('喀') then 
    result := 'J';
  elsif i >= ascii('喀') and i < ascii('垃') then 
    result := 'K';
  elsif i >= ascii('垃') and i < ascii('妈') then 
    result := 'L';
  elsif i >= ascii('妈') and i < ascii('拿') then 
    result := 'M';
  elsif i >= ascii('拿') and i < ascii('哦') then 
    result := 'N';
  elsif i >= ascii('哦') and i < ascii('啪') then 
    result := 'O';
  elsif i >= ascii('啪') and i < ascii('欺') then 
    result := 'P';
  elsif i >= ascii('欺') and i < ascii('然') then 
    result := 'Q';
  elsif i >= ascii('然') and i < ascii('撒') then 
    result := 'R';
  elsif i >= ascii('撒') and i < ascii('塌') then 
    result := 'S';
  elsif i >= ascii('塌') and i < ascii('挖') then 
    result := 'T';
  elsif i >= ascii('挖') and i < ascii('昔') then 
    result := 'W';
  elsif i >= ascii('昔') and i < ascii('压') then 
    result := 'X';
  elsif i >= ascii('压') and i < ascii('匝') then 
    result := 'Y';
  elsif i >= ascii('匝') and i <= ascii('座') then 
    result := 'Z';
  else
    result := c;
  end if;
  return result;
end;
/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -