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…
SQL Server datasets [closed]
I would like to know if there are any SQL Server ready datasets which one can use. I know there’s AdventureWorks (which i’m already using), but i would like to know if there are more. I also open for …
Stop Access from asking for parameters in Query
Access keeps asking for parameters qTtlSalesbyParent!SumOfSales My query SELECT tblCMAP.Parent, Sum(tblCMAP.Sales) AS SumOfSales, IIf(Nz([qTtlSalesbyParent]!SumOfSales],0)>=1000,20, IIf([…
Entity Framework doesn’t provide DeleteAsync or AddAsync. Why?
I just noticed that EF (using version 5 here) doesn’t provide DeleteAsync()/AddAsync(). I also noticed that projects like this one: https://github.com/zzzprojects/EntityFramework-Plus do provide …
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…
(SQL) How do I differentiate 2 columns from different tables with the same name when selecting?
I’m using an Oracle 12c SQL server. The goal is to create a view containing each company and the drugs it produces. How can I differentiate two columns with the exact same name but located in …
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 …