zoukankan      html  css  js  c++  java
  • Excel数据导入PG库,字符串正则表达式

    1、Excel数据导入到PG库的某张表中:
    先将Excel文件转换为CSV格式,打开SQL Shell(psql),连接数据库(输入server,database,Port,username),然后再执行以下命令
    copy sdm_nbev_base_fyp_life_assess(organization,plan_code,fyp,version_id) from 'D:UsersEX-JINZHI001Desktop考核寿险基准FYP.csv' with csv header;

    2、字符串正则表达式处理:
    函数:regexp_matches(string text, pattern text [, flags text])
    说明:Return all captured substrings resulting from matching a POSIX regular expression against the string. See Section 9.7.3 for more information. 对字符串按正则表达式进行匹配,如果存在则会在结果数组中表示出来
    例子:regexp_matches('foobarbequebaz', '(bar)(beque)') = {bar,beque}

    函数:regexp_replace(string text, pattern text, replacement text [, flags text])
    说明:Replace substring(s) matching a POSIX regular expression. See Section 9.7.3 for more information. 利用正则表达式对字符串进行替换
    例子:regexp_replace('Thomas', '.[mN]a.', 'M') = ThM

    函数:regexp_split_to_array(string text, pattern text [, flags text ])
    说明:Split string using a POSIX regular expression as the delimiter. See Section 9.7.3 for more information. 利用正则表达式将字符串分割成数组
    例子:regexp_split_to_array('hello world', E'\s+') = {hello,world}

    函数:regexp_split_to_table(string text, pattern text [, flags text])
    说明:Split string using a POSIX regular expression as the delimiter. See Section 9.7.3 for more information. 利用正则表达式将字符串分割成表格
    例子:regexp_split_to_table('hello world', E'\s+') =
    hello
    world
    (2 rows)

  • 相关阅读:
    时空地图TimeGIS 可编辑ArcGIS的Shape矢量文件的地理信息系统
    快手 KSCAD 5.0 矢量图形设计软件
    DWG2SHP DXF2SHP 如何把AutoCAD的DWG,DXF文件转换为Esri ArcGIS的Shape文件
    火了网址
    GIS 网站参考
    快手4.0 (KSCAD)
    用词法分析器Flex过滤日志
    编译器工具 Flex Bison for Windows 简单入门例子
    针对于网络安全领域中基于PCAP流量的数据集
    RBAC权限框架_MVC权限框架
  • 原文地址:https://www.cnblogs.com/jilly324/p/9228764.html
Copyright © 2011-2022 走看看