Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Chris Orlando
Starting Member
9 Posts |
Posted - 2005-08-02 : 10:58:28
|
| Table 1:ID (Identity), Event Time, Price, Symbol1, 9:15AM, $2, X2, 9:20AM, 2.50, X3, 9:25AM, 2.25, XTable 2:Event Time, Price a, Price b, Symbol9:14AM, $2.01, $2.30, x9:15AM, $2.01, $2.34, x9:16AM, $2.01, $2.45, xI have to find all PREVIOUS record (Event_Time) of the x record in table 2 where the price in table 1 is less than price a OR greater than price b.Any ideas? 4 million rows per table, 800 different symbols...Finding the previous Event time record in the other table is where I am having problems.thanks for your help... |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-08-02 : 13:50:26
|
| Sorry Chris, I'm not clear on what you need. could you please post the DDL of both tables, DML for some sample data for maybe 2 different symbols, and the expected results of the query?(DDL: script to create your tablesDML: insert statements so we can populate your tables with sample data)Be One with the OptimizerTG |
 |
|
|
|
|
|
|
|