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




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 unqualified"
from Project_ CHECK a,project_check_detail b 
where a.id = B.libaolijianid and B. Shifouhege = 0  group by suoshudanweiid


in the Metric rapid development platform, we set variables in the business table with [: variable name], so in the way of a square bracket, An error occurs when the business table is saved.
 
If you really want a special number to be listed, you can name it in the business table as not a number, and then re-name the column on the form interface. For example, a grid part can set the field display Name: Grid Part 1. Setcolumncaption ("Video not Qualified", "3G video not qualified"). The

is also implemented by means of method two. With     as   column name

Original address: http://plat.delit.cn/thread-619-1-1.html

Reprint please specify the source:

Author: metric Technology 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.