I realize I need this for LINQ, as from http://stackoverflow.com/questions/11135820/convert-oracle-query-as-of-timestamp-to-linq
SELECT --DISTINCT MAINSERNO, to_char(TIMESTAMP, 'MM/DD/YYYY HH24:MI:SS') as TIMESTAMP
COUNT(DISTINCT MAINSERNO) AS TOTAL
FROM PPL_PRODUCT_TESTID2
WHERE (MONO = '5750327') AND (ITNO = '132959') AND (SYSTEMTYPE = '0036') AND (TESTFLAG = '1')
AND (TIMESTAMP > to_timestamp('08/05/2013 23:30:00', 'MM/DD/YYYY HH24:MI:SSFF2'))
AND (TIMESTAMP < to_timestamp('08/06/2013 00:30:00', 'MM/DD/YYYY HH24:MI:SSFF2'))
Order by TIMESTAMP ASC
Loading

Iftikar HussainRank #423 · 5.9K reputationPosted Aug 9, 2013, 8:49 PM EDT
Regards,
Iftikar
Posted Aug 6, 2013, 12:45 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 6, 2013, 12:58 AM EDT
try like this
Regards,
Iftikar
Posted Aug 6, 2013, 12:59 AM EDT
var result = from x in times
wheren (TIMESTAMP > ConvertToTimeStamp('08/05/2013 23:30:00', 'MM/DD/YYYY HH24:MI:SSFF2')
select x;
Create a new method to convert datetime into timestamp.
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 9, 2013, 11:29 PM EDT
In my C# application code, I have this:
This application code would sometime give a count that is greater than what is the correct value, I have though the Distinct().Count() would have taken care of that?
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 9, 2013, 11:35 PM EDT
Regards,
Iftikar
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 9, 2013, 11:39 PM EDT
you can join.in if you want, I can show you....a short while..:)
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 9, 2013, 11:45 PM EDT
while below shows the correct count.
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 9, 2013, 11:46 PM EDT
Regards,
Iftikar
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 9, 2013, 11:50 PM EDT
Is my Distinct used correctly above?
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 10, 2013, 12:17 AM EDT
Regards,
Iftikar
TAN WhoAMIRank #5,790 · 286 reputationPosted Aug 10, 2013, 12:24 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 10, 2013, 12:42 AM EDT
Regards,
Iftikar