SQL将函数应用于列中的所有数据

时间:2017-06-09 23:08:19

标签: sql sqlite spatialite

我是SQL新手。我正在开发Spatialite,这是一个基于SQLite的空间数据库。我想将函数LineStringFromText()应用于名为“geometry”的列中的所有数据。我尝试了下面的SQL语句,但是我得到了synax错误:

  

SQL错误:“近”“选择”Synax错误“

.badgeq:after {
        content: "100";
        position: relative;
        background: rgba(0,0,255,1);
        height: 2rem;
        top: 0rem;
        right: 0.5rem;
        width: 2rem;
        text-align: -webkit-center;
        line-height: 2rem;
        font-size: 1rem;
        border-radius: 50%;
        color: white;
        border: 1px solid blue;
    }

    .badgeq {
        display: flex;
        min-width: 10px;
        padding: 3px 7px;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        color: #35BBE6;
        text-align: center;
        white-space: nowrap;
        vertical-align: middle;
        background-color: transparent;
        border-radius: 10px;
    }
    a.badgeq:focus, a.badgeq:hover {
        color: #27408b;
        text-decoration: none;
        cursor: pointer;
    }
    

1 个答案:

答案 0 :(得分:0)

你过度设计了它。改变这个:

SET geometry = SELECT LineStringFromText(geometry) from test1f

到这个

SET geometry = LineStringFromText(geometry)