Building examples of special characters as column names in business table building

Source: Internet
Author: User

Metric rapid development platform, when the business table is built, the name of the set column may start with a number, and normally the database must not be listed as a number, such as:
Select A.suoshudanweiid,sum (case when B.jianchaxiangmu = ' gps not online ' then 1 else 0 end) GPS is not online,
SUM (case when b.jianchaxiangmu = ' 3G video unqualified ' then 1 else 0 end)3G Video not qualified
From Project_check A,project_check_detail b
where a.id = B.libaolijianid and B.shifouhege = 0 GROUP by suoshudanweiid


650) this.width=650; "id=" aimg_918 "src=" http://plat.delit.cn/data/attachment/forum/201601/15/ 101650f4y8vfp6683bd430.jpg.thumb.jpg "width=" 397 "height=" 101 "alt=" 101650f4y8vfp6683bd430.jpg.thumb.jpg "/>

In general, in Query Analyzer, we add brackets or double quotes to the list of numbers.
method One:
Select A.suoshudanweiid,sum (case when B.jianchaxiangmu = ' gps not online ' then 1 else 0 end) GPS is not online,
SUM (case when b.jianchaxiangmu = ' 3G video unqualified ' then 1 else 0 end)[3G Video not qualified]
From Project_check A,project_check_detail b
where a.id = B.libaolijianid and B.shifouhege = 0 GROUP by suoshudanweiid

Method Two:
Select A.suoshudanweiid,sum (case when B.jianchaxiangmu = ' gps not online ' then 1 else 0 end) GPS is not online,
SUM (case when b.jianchaxiangmu = ' 3G video unqualified ' then 1 else 0 end)As "3G video not qualified"
From Project_check A,project_check_detail b
where a.id = B.libaolijianid and B.shifouhege = 0 GROUP by suoshudanweiid


In the measurement rapid development platform, we set variables in the business table with [: variable name], so in the way of a square bracket, the business table will be saved when the error occurs.
650) this.width=650; "id=" aimg_919 "src=" http://plat.delit.cn/data/attachment/forum/201601/15/ 102214wz58njuj5j5oznee.jpg.thumb.jpg "alt=" 102214wz58njuj5j5oznee.jpg.thumb.jpg "/>
If you really want to have a special number as a list, you can name it in the business table as not a number, and then re-name the column on the form interface, such as the grid part can set the field display Name: Grid Part 1. Setcolumncaption ("Video not Qualified", "3G video not qualified").

the other is through the method of two ways to achieve. WithAs "column name"
Original address: http://plat.delit.cn/thread-619-1-1.html

Reprint please specify the source:

Author: metric Technology http://www.delit.cn

Building examples of special characters as column names in business table building

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.