Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Microsft SQL Queries- One Works One Does Not :|

843840Jul 28 2008 — edited Jul 29 2008
Hi,
I have the following query which works...
The results are displayed properly on the web page. No Errors, etc.


var rs = new ActiveXObject("ADODB.Recordset")

rs.Open("SELECT USERNAME, COUNT(USERNAME) FROM SDB_PROCESS INNER JOIN LU_USER ON SDB_PROCESS.FK_USERID = LU_USER.PK_USERID INNER JOIN LU_PROCESS ON SDB_PROCESS.FK_PROCESSID = LU_PROCESS.PK_PROCESSID INNER JOIN LU_PROCESSNAME ON LU_PROCESS.FK_PROCESSNAMEID = LU_PROCESSNAME.PK_PROCESSNAMEID WHERE SDB_PROCESS.ENDTIME between '"+myDate1+"' and '"+myDate2+"' and LU_PROCESSNAME.PROCESSNAME = '"
myProcess"' GROUP BY USERName ORDER BY USERName", conn);

The below Query does not work unless I replace (SELECT APPNAME, COUNT (APPNAME) with SELECT * But then I cannot get the GROUP BY to work :|

var rs = new ActiveXObject("ADODB.Recordset")

rs.Open("SELECT APPNAME, COUNT(APPNAME) FROM SDB_APPHISTORY INNER JOIN LU_APPNAME ON SDB_APPHISTORY.FK_APPNAMEID = LU_APPNAME.PK_APPNAMEID WHERE LU_APPNAME.APPNAME NOT LIKE 'Copy%' and LU_APPNAME.APPNAME NOT LIKE 'PWMGR%' and APPNAME NOT LIKE 'STAGING%' and LU_APPNAME.APPNAME NOT LIKE '%test%' and LU_APPNAME.APPNAME NOT LIKE 'Password Manager%' and APPNAME NOT LIKE '%^%' and LU_APPNAME.APPNAME NOT LIKE 'WS08%' and LU_APPNAME.APPNAME NOT LIKE '%troubleshoot%' and STARTTIME between '"+myDate1+"' and '"+myDate2+"' GROUP BY APPNAME ORDER BY APPNAME", conn);

Any advice would be appreciated!
Thanks!
Peer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2008
Added on Jul 28 2008
2 comments
144 views