« first day (1525 days earlier)      last day (2793 days later) » 

3:01 PM
Hahahaha. @Shaneis
thanks buddy
bro, I can use
Left join instead of full outer join
right?
 
Well yes but they will return different result sets
Left join will return all of the left table
full outer join will return all of the left and all of the right
@ARr0w also you do realise you just said left join ... full outer join ... right
 
 
1 hour later…
4:25 PM
Hello.
Working with a query on a table that contains about 200K records, querying for a single field that returns about 20K rows, but takes over 30 seconds to return. This seems unusual. The field in the criteria is indexed. What kind of optimization would you check for?
 
 
3 hours later…
7:36 PM
Ohkay bro, Thanks <3.
when your online @Shaneis i'll discuss left join in detail.
 
8:20 PM
@ARr0w fair enough
 
8:36 PM
seriously, some people have issues without a reason
this amy user in c# banned me. She favor others and i've seen others being rude and using slang and swearing words
so what if i also am being sarcasm, why is it hitting her so much
 
Different rooms have different rules @ARr0w
I don't go on there so I don't know
 
yeah, i won't
but trust me. She got some mental Issues
 
haha! doesn't everyone that uses C#? ;)
 
hahahaha.
Well, Do you think ?
:P
Shaneis, is there a way to report a user?
 
I'm a database guy so I think you're all reckless
There is, via a moderator
but not sure you'll get anywhere @ARr0w
 
8:41 PM
alright then, nevermind. -_-
hahahaha. Well, fine by me.
But, there are exceptions everywhere too. :D
I can be an exception :D
 
you seem willing to learn different things so that's always a good start
 
Thank you :D
It was hard for you. But you did it :D lol
 
ha!
 
Hey, you on facebook?
 
hello there. anyone willing to take a stab at a weird Oracle behavior I'm seeing regarding comparing dates in a DATE column?
 
8:47 PM
Tamara, Post a picture of data in column and a query you are using when comparing dates
and what kind of weird behavior, explain briefly.
trust me, shaneis would love that :D
 
thanks, let me work on that summary for a few minutes. Can't wait to have this resolved, I've been banging my head for a few hours now :)
 
9:07 PM
@ARr0w More on Twitter to be honest
 
This is going to be a bit long... sorry about that, just trying to convey the issue in detail.
Hi Brian,

I'm facing a weird behavior in my Oracle database when it comes querying based on DATE columns. Thought you might know the reason. This has been taunting me for a couple of days now and I could use some help :)

So here's the story.
I insert a row to one of the tables, which has a column USER_ACCESS_DT of type DATE. I populate this column with 'SYSDATE'.
I'll see now how I can upload an image of the table data.
Here's my INSERT prepared statement, when I add a new row to the table. You can see that I insert SYSDATE into USER_ACCESS_DT.
String insert = "INSERT INTO PAMS.TMETRIC_USER_ACCESS (USER_ACCESS_USERID, "
				+ "USER_ACCESS_DT, USER_ACCESS_TYPE_CD, USER_NM, USER_ACCESS_CNT, ROW_PROG_UPDT_ID, "
				+ "ROW_STATUS_CD, ROW_UPDATE_TIME, ROW_LASTUPD_USERID, ROW_CREATE_TIME, ROW_CREATE_USERID) "
				+ "VALUES (? ,SYSDATE ,? ,? ,? ,? ,? ,CURRENT_TIMESTAMP ,? ,CURRENT_TIMESTAMP ,?)";
Connection con = PAMSServiceLocator.getInstance().getCon();
PreparedStatement pstmt = con.prepareStatement(insert);
....
However, when I come to query this table based on the date in USER_ACCESS_DT, I always get an empty result set.

Here's how I query to get a row that matches a specific date, which, from my research online, is pretty standard:
// Prepare the date object
Calendar cal = new GregorianCalendar(2016, Calendar.JULY, 20);
java.util.Date date = cal.getTime();
java.sql.Date sqlDate = new java.sql.Date(date.getTime());
System.out.println("sqlDate: " + sqlDate.toString());

String sql = "SELECT USER_ACCESS_CNT FROM PAMS.TMETRIC_USER_ACCESS "
				+ "WHERE USER_ACCESS_DT=? AND USER_ACCESS_USERID=? ";


// Exsecute query
con = PAMSServiceLocator.getInstance().getCon();
try {
    PreparedStatement pstmt = con.prepareStatement(sql);
rs always returns empty.

And here's the twist! Ready? Here it comes:
If I edit the value in USER_ACCESS_DT column (say, change the day of the month from 20 to 18, and then back to 20), all of a sudden the same Java code about returns the row. Meaning, it's now successfully able to compare the date I provide as java.sql.Date to the date that is now stored in USER_ACCESS_DT.

Have you ever encountered anything like this? Do you know what may be causing it?
If not, what is your way of inserting a current date value to a date column and querying based on that date?
Ignore the "Hi Brian" at the beginning. This is from an email I sent to my colleague :)
Here's the image of the table and the data: drive.google.com/file/d/0BwZBi1keATGQY0EwQ0JuelQ4cGs/…
 
9:28 PM
@Shaneis can you help out this fella, if it seems possible and understandable?
 
@TamaraAviv Hmm afraid I don't know Oracle so this could be better asked as a Question
But what does sqlDate return?
 
@Shaneis Here's the print out: sqlDate: 2016-07-21
 
@TamaraAviv Hmmm. But if you change the day and then change it back, it works?
to be honest, it sounds like you've got a time component on your date that is getting stripped when you change it but I can't see it
Sorry @TamaraAviv, but afraid I'm not much help here
 
9:57 PM
alright guys, im off. Goodnight
shaneis, see you tomorrow
 
@ARr0w Night man
 

« first day (1525 days earlier)      last day (2793 days later) »