as of timestamp sysdate-1/12  这是什么用法

解决方案 »

  1.   

    是FLASHBACK QUERY 9i以后提供的功能,功能是查询以前某时刻的表的数据
      

  2.   

    查询2个小时之前,该表的数据状态
    flashquery闪回查询
      

  3.   

    as of timestamp sysdate-1/12   这样的用法可不可以用到别的表
      

  4.   

    as of timestamp sysdate-1/12  这个的效果是什么啊
      

  5.   

    as of timestamp sysdate-1/12  看不懂,
      如果要查表t5001 的昨天的sql 操作如何写语句? 
    select * from t5001  as of timestamp sysdate-1/12
      

  6.   

    回lvpinging: 你试一下select sysdate-1/12 from dual就知道了,是2个小时前的时间点
    回楼上的:你要查昨天的sql?什么意思啊?如果要查t5001昨天的数据的话,你先要确定要查昨天什么时候的数据。
      

  7.   

    其实我不明白的是select * from dba_source as of timestamp sysdate-1/12  句子的语法。。
    sysdate-1/12   我知道意思的但是as of timestamp sysdate-1/12   能这样用。。
    要是我要查a表2小时以前的数据也可以这样用?
    select * from a as of timestamp sysdate-1/12
      

  8.   

    private void btnsubmit_ServerClick(object sender, System.EventArgs e)
    {
        Response.Cookies["LanguageVer"].Value = txtLanguage.Value;
        Response.Cookies["LanguageVer"].Expires = System.DateTime.Now.AddDays(30);
        LanguageVer = txtLanguage.Value;
        txtLanguage.Value = "";
        string str;
        str =  "\n<script language=javascript>";
        str += "\ntest();";
        str += "\n</script>";
        if(!this.IsStartupScriptRegistered("Startup"))
            this.RegisterStartupScript("Startup", str);
    // Page.RegisterStartupScript("Startup", "<Script Language='JavaScript'> test(); </Script>") ;
    }
    <SCRIPT language="javascript">
    <!--
    Function test()
    {
    top.location  =top.location ;
    }
    //-->
    </SCRIPT>
      

  9.   

    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER PROCEDURE [dbo].[rpt_1]
        @ShipId nvarchar(20)
    AS
    BEGIN
        DECLARE @ShipIdDesc nvarchar(20)
        IF @ShipId=''
        BEGIN
          SET @ShipIdDesc='All'
          SET @ShipId='%'
        End
        Else
        BEGIN
          SELECT @ShipIdDesc=@ShipId;
        End
      select ShipCard.ShipId,ShipCard.SONum,ShipCard.ProNum,ShipCard.Lot,ShipCard.CardGuid,
      CardBarCode=CASE WHEN isnull(ShipCard.CardBarCode,'0')='0' then ''
         WHEN ShipCard.CardBarCode='' then ''
         WHEN ShipCard.CardBarCode=' ' then ''
              Else: ShipCard.CardBarCode
                  end,
      ShipCard.CardBoxQty,
      ShipSO.StandardBoxQty,
      convert(varchar,isNull(tCount.coun1,0) )+'/'+ convert(varchar,ShipCard.CardBoxQty) as CardBoxQty_Conv,
      IfCompose=CASE WHEN ShipSO.StandardBoxQty=0 then 0
                     WHEN (ShipSO.StandardBoxQty<>0) and (ShipCard.CardBoxQty=ShipSO.StandardBoxQty)  then 0  else 1
                end,
      isNull(tCount.coun1, 0) As coun1,
      Ship.ShipDate,
      isNull(CardBox.BoxBarCode,'') as BoxBarCode
    from ShipCard left outer join ShipSO on ( ShipCard.ShipId = ShipSO.ShipId
      and ShipCard.SONum = ShipSO.SONum
      and ShipCard.ProNum =ShipSO.ProNum
      and ShipCard.Lot= ShipSO.Lot
       )
          left outer join Ship on ( ShipCard.ShipId= Ship.ShipId    )
          left outer join ( select CardGuid,count(*) as coun1 from CardBox where 1=1 group by  CardGuid) as tCount on (ShipCard.CardGuid =tCount.CardGuid )
          left outer join CardBox on ( ShipCard.CardGuid= CardBox.CardGuid    )Where 1 = 1
    ---   and Ship.ScanStatus='0'
       and ShipCard.ShipId  LIKE @ShipId;
    End
      

  10.   

    <img id=imgSearch style="CURSOR: hand; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none"
      onclick = "SearchGama_Sale_No('txt_SONum','txt_ProNum','txt_Lot','txt_BoxQty','txt_CusNum','txt_ProQty')"
      src="image/search.gif" align="absMiddle"></td><button id="btnReset2" onclick="document.all('imgSearch').disabled=false; txt_SONum.readonly=false;txt_SONum.value='';txtI.value='';txt_ProNum.value='';txt_ProQty.value='0'"
      type="button" runat="server"></button>