Viewing 15 posts - 16 through 30 (of 73 total)
Awesome Lutz, thanks so much for your help once again! Perfect, elegant solution and thanks for the index tip too.
November 5, 2011 at 12:54 pm
LutzM (11/5/2011)
Based on your sample data, what would be the expected result?
Hi Lutz,
The expected result is
MONTH startBalance endBalance pctChange
============== ============ ==========...
November 5, 2011 at 9:20 am
I see, in that case there is not a 1:1 relationship between Intruments table and WhateverInstruments tables but a 0-1:1 one which makes things a little different. I can live...
July 5, 2011 at 6:57 am
Out of curiosity, may I ask why BondInstrument table was detached from Intrument table? blame it to my ocd but I have problems digesting 1:1 relationships 🙂
Because BondInstrument...
July 4, 2011 at 3:45 am
I have a couple of volunteers for this now, thanks very much for looking.
June 9, 2011 at 3:25 pm
That's great thanks a lot, I have amended it a little to cope with short trades by including a CASE statement. Thanks for your time.
The Dixie Flatline (6/6/2011)
June 7, 2011 at 3:07 am
Thanks, I'm wondering if I should be doing this in the application layer in C#. :-/ However it makes sense to me to do calculations on sets of data close...
June 6, 2011 at 3:02 pm
Wow CELKO, what a great reply, thanks! I learnt a lot from this. You asked for an example, well I gave one with trade_id 182. I can walk through it...
June 6, 2011 at 2:10 pm
Please ignore this, I hadn't realised that a logical definition of a constraint is bound to the physical manifestation (an index). It seems that dropping and recreating all indexes is...
January 25, 2011 at 3:03 am
Hi Craig,
I basically need to transpose columns to rows. So instead of the results looking like this:
largestDrawDownPct avgPctAccountChange maxPctAccountChange minPctAccountChange avgPctAccountChangeWinners avgPctAccountChangeLosers
------------------ ------------------- ------------------- ------------------- -------------------------- -------------------------
-3.49 ...
January 18, 2011 at 12:12 pm
Jeff Moden
Just to follow up on that... a good ol' fashioned cross-tab can make life real easy and "prettier".
SELECT Symbol,
SUM(CASE WHEN...
January 18, 2011 at 3:52 am
Sorry for the tardiness - here's some sample data and the actual query I am running:
set nocount on
CREATE TABLE #BaseTradeStats(
[tradeId] [int] NOT NULL,
[minOrderDateTime] datetime,
[symbol] [char](6) NOT NULL,
[pctAccountChange] [decimal](38, 6) NULL,
...
January 18, 2011 at 1:59 am
You might want to do a performance test or analyse the query plan, but my feeling is that the multi-proc approach would be better for the optimizer, and would not...
January 17, 2011 at 7:33 am
roi.reuven (1/12/2011)
I wrote Clr functionWhich copies XML
from Web server
to a file in the file system
The way I use the function
select dbo.downloadfile ('http://rates.fxcm.com/RatesXML','C:\Temp\RatesXML.xml')
Thanks, could you post...
January 17, 2011 at 7:15 am
Thanks Wayne, the problematic part is getting the XML data from the internet. I tried this query and it doesn't work:
select * from openrowset (bulk N'http://rates.fxcm.com/RatesXML', SINGLE_BLOB) rs
I get this...
January 12, 2011 at 12:46 am
Viewing 15 posts - 16 through 30 (of 73 total)