【问题标题】:SQL Virtual ColumnSQL 虚拟列
【发布时间】:2010-07-09 04:20:54
【问题描述】:

我收到“SQL 错误:ORA-01733:此处不允许虚拟列”

这是我的代码:

update (
   Select g.FIRST300BB from ( 
      select FIRST300BB, row_number() over (order by pitchandeventid) r
      from gamedata_me 
      where hitterid = 5000
      and (eventcode = 'BB')
   ) g
   where r between 0 and 300
) t
set t.FIRST300BB =1

有什么想法吗?我被卡住了,使用 Oracle,所以我发现我无法执行 Update/From 语法……所以我正式圈了马车

【问题讨论】:

    标签: sql oracle sql-update


    【解决方案1】:

    例如尝试等效查询

    update gamedata_me 
      set first300BB=1
    where rowid in(
              Select g.rid from ( 
                  select rowid rid, row_number() over (order by pitchandeventid) r
                      from gamedata_me 
                     where hitterid = 5000
                     and (eventcode = 'BB')
                   ) g
       where r between 0 and 300
        ) 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-08
      • 1970-01-01
      • 1970-01-01
      • 2016-10-09
      • 2021-12-19
      • 1970-01-01
      • 2011-07-09
      • 2020-12-04
      相关资源
      最近更新 更多