<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    我的家園

    我的家園

    Returning Updated Rows?? 返回更新的行 ????? (page 280)
    ??? In Listing 9-7, just four rows were returned even though there are rows for other weeks. The clause
    RETURN UPDATED ROWS? controls this behavior and provides the ability to limit the cells returned by the
    SQL statement. Without this clause, all rows are returned regardless of whether the rules updates the
    cells or not.
    The rule in Listing 9-7 updates only four cells and other cells are untouched, and so just
    four rows are returned.?
    ??? 在列表9-7中,只返回了四行,盡管有其它week的行。子句RETURN UPDATED ROWS控制該行為且為SQL語句提供限制返回單元格的能力。沒有這個子句,將返回所有行,不論規則是否更新了單元格。 在列表9-7的規則只更新了四行而其它的單元格沒有觸及,因此只返回了四行。
    ??? What happens if you don’t specify the clause return updated rows ? Listing 9-9 shows the output
    without the? return updated rows? clause. The output in this listing shows that both updated and non-
    updated rows are returned from the SQL statement. The rule updates cells for the weeks 1, 52, and 53
    only, but the output rows in Listing 9-9 shows rows with other column values such as 2, 3, 4, too.
    ??? 如果你沒有指定子句 return updated rows 會怎樣?列表9-9展示了沒有 return updated rows 子句的輸出。這個列表的輸出顯示從SQL語句中更新和沒有更新的行都返回了。規則只更新單元格weeks 1,52和53,但是列表9-9的輸出顯示其它的列值如2,3,4的行也輸出了。
    Listing 9-9.? SQL without RETURN UPDATED ROWS
    ? 1??? select product, country, year, week, sale
    ? 2??? from sales_fact
    ? 3??? where country in ('Australia') and product ='Xtend Memory'
    ? 4??? model?
    ? 5??? partition by (product, country)
    ? 6??? dimension by (year, week)
    ? 7??? measures ( sale)
    ? 8??? rules(
    ? 9?????????? sale [ year in (2000,2001), week in (1,52,53) ] order by year, week
    ?10??????????????????? = sale [cv(year), cv(week)] * 1.10
    ?11??? )
    ?12*?? order by product, country,year, week
    PRODUCT????? COUNTRY???? YEAR? WEEK?????? SALE
    ------------??????? ----------????????? ----- ? ?? ----????????? ----------
    ...
    Xtend Memory Australia?????? 2000?????? 50????????? 21.19
    Xtend Memory Australia?????? 2000?????? 52???? ? ?? 74.20
    Xtend Memory Australia?????? 2001??????? 1??? ? ? ? 101.49
    Xtend Memory Australia?????? 2001?? ? ?? 2??? ? ? ? 118.38
    Xtend Memory Australia?????? 2001??????? 3?????????? 47.24
    Xtend Memory Australia?????? 2001?? ? ?? 4????????? 256.70
    ...
    ??? The clause RETURN UPDATED ROWS? is applicable to statements using positional notation also. In the
    Listing 9-10, a rule using a positional notation is shown, inserting a row.? Note that there are more
    rows in the table matching with the predicate country in ('Australia') and product ='Xtend
    Memory'.? But, just one row is returned as only one cell is inserted by the rule in line 9. Essentially,
    RETURN UPDATED ROWS? clause is a limiting clause—it only fetches the rows modified by the rule.?
    ??? 子句RETURN UPDATED ROWS也可以應用于使用位置標記的語句。 在列表9-10中,展示了一使用位置標記的規則,插入一行。注意表中有多行匹配謂詞country in ('Australia') and product ='Xtend Memory'。但是,只返回了一行,作為按第9行規則插入的唯一單元格。本質上,RETURN UPDATED ROWS子句是一限定子句--它僅取按規則修改的行。
    Listing 9-10.? RETURN UPDATED ROWS and UPSERT
    ? 1??? select product, country, year, week, sale
    ? 2??? from sales_fact
    ? 3??? where country in ('Australia') and product ='Xtend Memory'
    ? 4??? model? return updated rows
    ? 5??? partition by (product, country)
    ? 6??? dimension by (year, week)
    ? 7??? measures ( sale)?
    ? 8??? rules(
    ? 9???????????????? sale [2002, 1] = 0
    ?10?????? )
    ?11 *???? order by product,country,year, week
    /

    PRODUCT?????????? COUNTRY?????????? YEAR?????? WEEK?????? SALE
    ------------??????? ----------????????? ----- ? ?? ----????????? ----------
    Xtend Memory???? Australia????? ? ? ? 2002 ??????? 1 ??????????? .00

    ?

    ?

    ?

    ?

    ?



    已有 0 人發表留言,猛擊->>這里<<-參與討論


    ITeye推薦




    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 国产福利电影一区二区三区,亚洲国模精品一区 | 亚洲福利在线视频| 大妹子影视剧在线观看全集免费| 国产精品色午夜视频免费看| 久久亚洲精品无码av| 国产精品免费视频播放器| 国产亚洲精品美女2020久久| 免费亚洲视频在线观看| 一级特级女人18毛片免费视频| 亚洲成a人片在线观看日本麻豆| 成年大片免费高清在线看黄| 亚洲午夜精品一级在线播放放| 国产成人自产拍免费视频| 国产亚洲av片在线观看播放| 无码人妻一区二区三区免费看 | 在线观看亚洲免费| av网站免费线看| 亚洲avav天堂av在线不卡| 99国产精品永久免费视频| 亚洲精品无码mⅴ在线观看| 在线观看永久免费视频网站| 2022国内精品免费福利视频| 亚洲av伊人久久综合密臀性色| 69xx免费观看视频| 菠萝菠萝蜜在线免费视频| 亚洲人成人77777网站| 成人免费视频69| 偷自拍亚洲视频在线观看 | 亚洲日韩乱码中文无码蜜桃臀| 日本视频免费在线| 免费人成网站在线观看不卡| 亚洲伊人久久大香线焦| 亚洲AV无码一区二三区| 狼群影院在线观看免费观看直播| 99亚洲精品卡2卡三卡4卡2卡| 国产专区一va亚洲v天堂| 国产成人无码免费看视频软件| 免费一级特黄特色大片| 亚洲日韩中文字幕天堂不卡| 亚洲色婷婷综合开心网| 四虎国产精品免费久久|