incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r772084 - /incubator/stonehenge/branches/m1/stocktrader/wsas/common/src/org/apache/stonehenge/stocktrader/mssql/MSSQLMarketSummaryDAO.java
Date Wed, 06 May 2009 07:21:29 GMT
Author: shankar
Date: Wed May  6 07:21:29 2009
New Revision: 772084

URL: http://svn.apache.org/viewvc?rev=772084&view=rev
Log:
fixing MSSQL specific queries

Modified:
    incubator/stonehenge/branches/m1/stocktrader/wsas/common/src/org/apache/stonehenge/stocktrader/mssql/MSSQLMarketSummaryDAO.java

Modified: incubator/stonehenge/branches/m1/stocktrader/wsas/common/src/org/apache/stonehenge/stocktrader/mssql/MSSQLMarketSummaryDAO.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/branches/m1/stocktrader/wsas/common/src/org/apache/stonehenge/stocktrader/mssql/MSSQLMarketSummaryDAO.java?rev=772084&r1=772083&r2=772084&view=diff
==============================================================================
--- incubator/stonehenge/branches/m1/stocktrader/wsas/common/src/org/apache/stonehenge/stocktrader/mssql/MSSQLMarketSummaryDAO.java
(original)
+++ incubator/stonehenge/branches/m1/stocktrader/wsas/common/src/org/apache/stonehenge/stocktrader/mssql/MSSQLMarketSummaryDAO.java
Wed May  6 07:21:29 2009
@@ -43,11 +43,11 @@
 	private static final String SQL_SELECT_QUOTE_NOLOCK = "Set NOCOUNT ON; SELECT symbol, companyname,
volume, price, open1, low, high, change1 from dbo.quote with (NOLOCK) where symbol = ?";
 	private static final String SQL_UPDATE_STOCKPRICEVOLUME = "UPDATE dbo.QUOTE WITH (ROWLOCK)
SET PRICE=?, Low=?, High=?, Change1=?-open1, VOLUME=VOLUME+? WHERE SYMBOL=?";
 
-	private static final String SQL_SELECT_MARKETSUMMARY_GAINERS = "Set NOCOUNT ON; SELECT symbol,
companyname, volume, price, open1, low, high, change1 from dbo.quote with (NOLOCK) where symbol
like 's:1__' order by change1 desc";
-	private static final String SQL_SELECT_MARKETSUMMARY_LOSERS = "Set NOCOUNT ON; SELECT symbol,
companyname, volume, price, open1, low, high, change1 from dbo.quote with (NOLOCK) where symbol
like 's:1__' order by change1";
-	private static final String SQL_SELECT_MARKETSUMMARY_TSIA = "Set NOCOUNT ON; select SUM(price)/count(*)
as TSIA from dbo.quote where symbol like 's:1__'";
-	private static final String SQL_SELECT_MARKETSUMMARY_OPENTSIA = "Set NOCOUNT ON; select
SUM(open1)/count(*) as openTSIA from dbo.quote where symbol like 's:1__'";
-	private static final String SQL_SELECT_MARKETSUMMARY_VOLUME = "Set NOCOUNT ON; SELECT SUM(volume)
from dbo.quote where symbol like 's:1__'";
+	private static final String SQL_SELECT_MARKETSUMMARY_GAINERS = "Set NOCOUNT ON; SELECT symbol,
companyname, volume, price, open1, low, high, change1 from dbo.quote with (NOLOCK) where symbol
like 's:%' order by change1 desc";
+	private static final String SQL_SELECT_MARKETSUMMARY_LOSERS = "Set NOCOUNT ON; SELECT symbol,
companyname, volume, price, open1, low, high, change1 from dbo.quote with (NOLOCK) where symbol
like 's:%' order by change1";
+	private static final String SQL_SELECT_MARKETSUMMARY_TSIA = "Set NOCOUNT ON; select SUM(price)/count(*)
as TSIA from dbo.quote where symbol like 's:%'";
+	private static final String SQL_SELECT_MARKETSUMMARY_OPENTSIA = "Set NOCOUNT ON; select
SUM(open1)/count(*) as openTSIA from dbo.quote where symbol like 's:%'";
+	private static final String SQL_SELECT_MARKETSUMMARY_VOLUME = "Set NOCOUNT ON; SELECT SUM(volume)
from dbo.quote where symbol like 's:%'";
 
 	public MSSQLMarketSummaryDAO(Connection sqlConnection) throws DAOException {
 		super(sqlConnection);



Mime
View raw message