Some Trials & a lot of Errors
I tried a bunch of framework and other language and I usually feel overwhelm when its time to do something real with what I've learned. So that why I created this site, to write my progress and help some noob like me that stumble into the sames problems.
Browse: Home / oracle

oracle

How to give a list of value in a where clause in sql (on oracle) ?

By Chris on July 24, 2018

I have a list of guild but I don’t want to call that sql for each guild. (check previous post for the structure) This one is a little easier, you just have to use the IN (PARAMETER, OPERAND, KEYWORD) instead of equal (=) and you give your list of guild you want in it. select […]

Posted in db | Tagged List, oracle, sql, where | Leave a response

How to turn a list from a select into a column of another select (Oracle) ?

How to turn a list from a select into a column of another select (Oracle) ?

By Chris on April 2, 2018

A old process we had was fetching a list from a query for each player one by one, and adding it in a excel file with other data needed on the player.   Seeing that process was slow, we decided to turn it into a query. If we take a close look at the model we […]

Posted in db | Tagged batch, listagg, oracle, sql | Leave a response

Oracle doesn’t support limit

By Chris on September 20, 2014

My god sometime I bang my head on the wall to do something simple on oracle. So oracle don’t support limit so to do something simple has : SELECT f_name, l_name, age from employee_data ORDER BY age DESC LIMIT 20 become : SELECT f_name, l_name, age FROM ( SELECT f_name, l_name, age, ROWNUM r FROM […]

Posted in db, prog | Tagged limit, oracle, sql | Leave a response

Update table using Inner Join return ORA-00933

By Chris on September 13, 2014

I was trying to update a table that using sql join but I kept getting ORA-00933   I tried the following: Using A SQL JOIN In A SQL UPDATE Statement Using A SQL JOIN In A SQL UPDATE Statement (www.bennadel.com) update table using inner join (venushuynh.wordpress.com) but I kept getting the ORA-00933 then tried this Oracle […]

Posted in db | Tagged db, error, oracle | Leave a response

Oracle have no Boolean, how to fix this

By Chris on August 30, 2014

For some reason Oracle have no Boolean Since there is no BOOLEAN datatype in Oracle, as far as tables are concerned. CREATE TABLE BooleanTable (MyBool BOOLEAN); return : ORA-00902: invalid datatype But there is a BOOLEAN datatype in PL/SQL. What should we do instead? According to Tom at ThinkOracle you could create the table using […]

Posted in db | Tagged boolean, oracle, pl/sql, sql | 1 Response

How to handle a single quote in Oracle SQL

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 | Leave a response

[Oracle Fun] Converting ORACLE to mySQL datatype

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 | Leave a response

How to search by date in 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 | Leave a response

ORACLE Date won’t work with greater or lesser than operator

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 | Leave a response

Hibernate Oracle to MySQL: changing the generator class

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 | Leave a response

Tags

2018 2022 app apparment baby book books cleaner date daycare db fantasy draft fantasy sports food foods fridge games gifts grocery hibernate hockey hockey pools ideas inspiration java java.util.List learning List meal plan meal planner motivation mysql oracle productivity retail shopping reviews service social games sql String students The Practice to_date uber wedding

Recent Comments

  • pawan on How to update an entry in an array in mongodb with java MongoTemplate?
  • kevin on Oracle have no Boolean, how to fix this

Calendar

May 2025
MonTueWedThuFriSatSun
 1234
567891011
12131415161718
19202122232425
262728293031 
« Dec  

Archives

  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • March 2021
  • February 2021
  • May 2020
  • January 2019

Copyright © 2025 Some Trials & a lot of Errors.

Powered by WordPress and Hybrid.

 

Loading Comments...