<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无码片在线观看| 亚洲国产精品成人综合久久久| 亚洲综合精品第一页| 亚洲一级毛片免费观看| 亚洲高清美女一区二区三区| 日韩插啊免费视频在线观看 | 视频一区在线免费观看| 免费的涩涩视频在线播放| 午夜亚洲WWW湿好爽| 国产乱子影视频上线免费观看| 亚洲Aⅴ在线无码播放毛片一线天| 日本a级片免费看| 精品在线视频免费| 久久久久亚洲精品无码网址| 成人毛片100免费观看| 91久久亚洲国产成人精品性色| 亚欧免费视频一区二区三区| 亚洲中文无码a∨在线观看| 性xxxx视频播放免费| 亚洲国产精华液2020| 亚洲精品国产日韩无码AV永久免费网| 国产精品免费久久久久影院| 亚洲AV无码成人网站久久精品大| 8888四色奇米在线观看免费看| 亚洲av永久无码精品天堂久久| 国产美女无遮挡免费视频网站| caoporn成人免费公开| 久久国产精品亚洲综合| 午夜宅男在线永久免费观看网| 国产成人 亚洲欧洲| 亚洲人成色77777| 美女视频黄的全免费视频| 久久精品国产亚洲AV未满十八 | 久久免费福利视频| 亚洲中文字幕日本无线码| 亚洲人成网站18禁止一区| 又大又硬又爽又粗又快的视频免费| 亚洲精品成a人在线观看夫| 亚洲av无码精品网站| 免费无码黄动漫在线观看| 抽搐一进一出gif免费视频|