Viewing 15 posts - 16 through 30 (of 67 total)
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
Thank...
July 14, 2010 at 9:08 am
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
46411473972010-07-14 13:08:00.000
46411473972010-07-14 13:08:00.000
46411473972010-07-14 13:08:00.000
46411473972010-07-14 13:08:00.000
46411473972010-07-14 13:08:00.000
46411973982010-07-14 13:08:00.000
46411973982010-07-14 13:08:00.000
46411973982010-07-14 13:08:00.000
46511984002010-07-14...
July 14, 2010 at 8:51 am
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...
July 14, 2010 at 7:58 am
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))
...
July 14, 2010 at 3:03 am
WHERE BarStamp > '7/13/2010'
ok this works to select the current day, now i need to join it
July 13, 2010 at 9:33 am
What is wrong with the post, it is orderly?
July 13, 2010 at 9:29 am
I dont know how to do the check for today only
July 13, 2010 at 9:12 am
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...
July 13, 2010 at 9:10 am
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,...
July 13, 2010 at 8:54 am
Thank you for thank simple explanation, I understand it now.
What minimizing the RAM usage?
May 20, 2010 at 9:06 am
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...
May 12, 2010 at 1:54 pm
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
May 12, 2010 at 12:44 pm
(
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...
May 12, 2010 at 12:24 pm
very close
BarStamp TickID AskSideRWsize BidSideRWsize
2010-05-12 17:14:00.00039972182NULL
2010-05-12 17:14:00.00039973NULL215
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...
May 12, 2010 at 10:19 am
Viewing 15 posts - 16 through 30 (of 67 total)