This multiple SELECT QUERY runs consecutively. I need one report with multiple columns for [GBPMID] and [EURMID].
Query 1
SELECT
(([askPrice] - [bidPrice]) / 2) + [bidPrice] AS [EURMID]
FROM TicksForex
WHERE [Symbol] = 'EUR/USD'
AND [Time] >= CONVERT(datetime, '6/6/2011 12:00 AM')
Query 2
SELECT
[Time]
,[askPrice]
,[bidPrice]
,(([askPrice] - [bidPrice]) / 2) + [bidPrice] AS [GBPMID]
FROM TicksForex
WHERE [Symbol] = 'GBP/USD'
AND [Time] >= CONVERT(datetime, '6/6/2011 12:00 AM')
@Pranay & @Magnus – MY APOLOGIES! My Data tables do not share the same TIME Values… which was a surprise to me.. this is why the records do not line up.. so sorry!! I will run this as @Pranay describes below…
Forget it! It normalized the data (date) so they all shared the same date – ie.. updated prices at the same time.. and it still does not work!!
Make use of
Case...whenwill resolve you issue easily