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 HussainPosted Aug 10, 2013, 12:49 AM
Regards,
Iftikar
Iftikar HussainPosted Aug 10, 2013, 4:42 AM
Regards,
Iftikar
TAN WhoAMIPosted Aug 10, 2013, 4:24 AM
Iftikar HussainPosted Aug 10, 2013, 4:17 AM
Regards,
Iftikar
TAN WhoAMIPosted Aug 10, 2013, 3:50 AM
Is my Distinct used correctly above?
Iftikar HussainPosted Aug 10, 2013, 3:46 AM
Regards,
Iftikar
TAN WhoAMIPosted Aug 10, 2013, 3:45 AM
while below shows the correct count.
TAN WhoAMIPosted Aug 10, 2013, 3:39 AM
you can join.in if you want, I can show you....a short while..:)
Iftikar HussainPosted Aug 10, 2013, 3:35 AM
Regards,
Iftikar
TAN WhoAMIPosted Aug 10, 2013, 3:29 AM
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?
Posted Aug 6, 2013, 4:59 AM
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.
Iftikar HussainPosted Aug 6, 2013, 4:58 AM
try like this
Regards,
Iftikar
Posted Aug 6, 2013, 4:45 AM