By Chris on August 9, 2014
When you are handling string you sometime have single quote in your string. I was looking on how to handle that in Oracle and it’s not pretty but you can cover that case with the chr(39) function, 39 being the code for the single quote. So it you are looking the “it’s” you have to […]
Posted in db, prog | Tagged oracle, quote, single quote, sql |
By Chris on August 2, 2014
I had in the past had to work with oracle and had to convert it to mysql. Unfortunately (or fortunately) that project was cancel but here are the bit of information I’ve found that I didn’t know about and made me lost a lot of time. Oracle vs mySQL datatype edition From mySQL […]
Posted in db, prog | Tagged db, migration, mysql, oracle |
By Chris on July 19, 2014
The to_date function we talked earlier make a come back. The wrong way to do it is : SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time = ’12-04-27′ you end up comparing string in that case to work you need to do the following: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time = […]
Posted in db, prog | Tagged date, oracle, search, to_date |
By Chris on July 12, 2014
I was having problem making one of my SQL query work in ORACLE until I realize that I got the check on the date wrong. It seem that Oracle didn’t interpreted my query has I expected when handling a date with a greater or lesser than operator (< or >). So this won’t work : […]
Posted in db | Tagged date, datetime, oracle, to_date |
By Chris on July 9, 2014
Really quick post to a problem I’ve got un hibernate when converting to mySQL, I’ve found that the problem was because we were using a generator class “sequence” and in mySQL we needed to use “assigned” or “increment” instead. Note you might not have that problem in your project but that was preventing me from […]
Posted in db | Tagged hibernate, java, mysql, oracle |
Recent Comments