Forum Replies Created

Viewing 15 posts - 16 through 30 (of 67 total)

  • RE: Between Statment only for current day

    you right that cant be it either

  • RE: Between Statment only for current day

    DECLARE @TT INT

    SET @TT =(SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK)where BarStamp >= '7/14/2010')

    SELECT

    min(upvolume),

    min(downvolume),

    min(upvolume),

    min(downvolume)

    from DBVaskVbid

    WHERE TotalTrades

    BETWEEN

    @TT -1000

    AND

    @TT

    Thank you that is it sorted 🙂

  • RE: Between Statment only for current day

    SELECT upvolume as UPVol,

    downvolume as DNVol,

    TotalTrades as TTrades,

    Barstamp as BStamp

    from DBVaskVbid WITH (NOLOCK) where BarStamp >= '7/14/2010'

      UPVol DNVol TTrades BStamp

      464 1147 397 2010-07-14 13:08:00.000

      464 1147 397 2010-07-14 13:08:00.000

      464 1147 397 2010-07-14 13:08:00.000

      464 1147 397 2010-07-14 13:08:00.000

      464 1147 397 2010-07-14 13:08:00.000

      464 1197 398 2010-07-14 13:08:00.000

      464 1197 398 2010-07-14 13:08:00.000

      464 1197 398 2010-07-14 13:08:00.000

      465 1198 400 2010-07-14...

    • RE: Between Statment only for current day

      SELECT min(upvolume),min(downvolume),min(upvolume),min(downvolume)

      FROM

      (SELECT upvolume,downvolume,TotalTrades from DBVaskVbid WITH (NOLOCK) where BarStamp >= '7/14/2010') as XDtable

      WHERE TotalTrades

      BETWEEN

      (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK) where BarStamp >= '7/14/2010') -1000

      AND

      (SELECT MAX(TotalTrades)FROM DBVaskVbid...

    • RE: Between Statment only for current day

      SELECT min(upvolume),min(downvolume),Max(upvolume),Max(downvolume)

      FROM

      (SELECT upvolume,downvolume,TotalTrades from DBVaskVbid WITH (NOLOCK) where BarStamp >= '7/13/2010') as XDtable

      WHERE TotalTrades

      BETWEEN

      (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK)) -1000

      AND

      (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK))

      ...

    • RE: Between Statment only for current day

      WHERE BarStamp > '7/13/2010'

      ok this works to select the current day, now i need to join it

    • RE: Between Statment only for current day

      What is wrong with the post, it is orderly?

    • RE: Between Statment only for current day

      I dont know how to do the check for today only

    • RE: Between Statment only for current day

      SELECT

      min(upvolume),

      min(downvolume),

      max(upvolume),

      max(downvolume)

      FROM

      DBVaskVbid WITH (NOLOCK)

      WHERE TotalTrades

      BETWEEN

      (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK)) -1000

      AND

      (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK))

      The above code is working, the field TotalTrades is reset to...

    • RE: Between Statment only for current day

      SELECT min(upvolume),min(downvolume),MAX(upvolume),max(downvolume)

      FROM DBVaskVbid WITH (NOLOCK)

      WHERE TotalTrades

      BETWEEN

      (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK)) -1000

      AND

      (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK))

      A better statement, but how can i link today's date only,...

    • RE: No Lock explatation

      Thank you for thank simple explanation, I understand it now.

      What minimizing the RAM usage?

    • RE: select Last not null field in a datetime range

      Thankyou thats it

      Just 1 more question

      using (SqlCommand myCommand = new SqlCommand(sSQL,dbconnection))

      {

      SqlDataReader reader = myCommand.ExecuteReader();

      if (reader.Read())

      {

      // BarStamp=(DateTime)reader.GetValue(0);

      if (!reader.IsDBNull(0)) Asksidevalue=((int)reader.GetDecimal(0));

      reader.NextResult();

      if (!reader.IsDBNull(1)) Bidsidevalue=((int)reader.GetDecimal(1));

      }

      reader.Close();

      }

      When I call SQL using OleDB, I bring back an object, how do I...

    • RE: select Last not null field in a datetime range

      using (SqlCommand myCommand = new SqlCommand(sSQL,dbconnection))

      {

      SqlDataReader reader = myCommand.ExecuteReader();

      if (reader.Read())

      {

      // BarStamp=(DateTime)reader.GetValue(0);

      if (!reader.IsDBNull(0)) Asksidevalue=((int)reader.GetDecimal(0));

      reader.NextResult();

      if (!reader.IsDBNull(1)) Bidsidevalue=((int)reader.GetDecimal(1));

      }

      reader.Close();

      }

      This will access the next record in the object?

      reader.NextResult();

      Thanks

      nearly there

    • RE: select Last not null field in a datetime range

      (

      SELECT AskSideRWsize AskSideRWsizeTickID, BidSideRWsize BidSideRWsizeTickID

      FROM FullOrderBookES

      WHERE TickID=(SELECT MAX(TickID) FROM FullOrderBookES WHERE AskSideRWsize IS NOT NULL)

      OR

      TickID=(SELECT MAX(TickID) FROM...

    • RE: select Last not null field in a datetime range

      very close

      BarStamp TickID AskSideRWsize BidSideRWsize

      2010-05-12 17:14:00.000 39972 182 NULL

      2010-05-12 17:14:00.000 39973 NULL 215

      However my reader is very limited

      if (!reader.IsDBNull(0)) Asksidevalue=((int)reader.GetDecimal(0));

      if (!reader.IsDBNull(1)) Bidsidevalue=((int)reader.GetDecimal(1));

      I can only pull the first row on an object

      thats why i have to avoid nulls

      my select...

    Viewing 15 posts - 16 through 30 (of 67 total)