Skip to content

iBATIS and dblink?

I am using PostgreSQL, and I use the dblink feature to update data on remote database. My project using iBATIS to work with database. I need to run the query statement with parameter but the problem is the db_link require SQL to be enclosed in quote. And iBATIS do not understand it.. I have iBATIS sql: But du…

SQL query to classify triangles into Equilateral, Isosceles, etc

Please tell me what is wrong in this code? I’m getting “ERROR at line 2: ORA-00907: missing right parenthesis” for the following snippet. Please help me out. Answer Keep in mind that CASE statements are evaluated IN ORDER – the first WHEN clause that fits “wins” and no furt…

Run-time Error 3131 Syntax Error in FROM clause

Tried scouring the forums for threads similar to mine but couldn’t really find anything that would lead me in the right direction. Basically I have a table that has the QA scores for each of the 10 regions and I am trying to populate a text box with a specific region’s score depending on the month…

How to do SQL from Akka?

What is the idiomatic Akka way to issue SQL statements from an Akka application? Specifically, I have an Akka Http REST endpoint that wants to do SQL commands. Is there some official SQL support or async or message passing style SQL library? Answer Answering your specific question, “what is the idiomati…

Get all payment transactions recursively using SQL

I have a series of records. Based on the data below, how to get all transaction (XZ) for specific customer invoice (XR)? Legend Example 1 Condition Desired output Explanation above: There is Customer invoice (XR) with the amount of 36,247.62. There is payment recorded (XZ) with the value of 4.76 for document …

Find all companies located in every city SQL

Question: Assume that the companies may be located in several cities. Find all companies located in every city in which “Small Bank Corporation” is located. Answer: Select S.company_name from …