9
votes
Accepted
Build WHERE clause for search conditions
Sanitizer is a dangerous misnommer IMO. A better name could be NameQuoter, since that's what it does: it uses the RDBMS-specific ...
5
votes
Build WHERE clause for search conditions
Just one thing...
Use db-provider's sanitizer
There is already a sanitizer that the DbCommandBuilder provides. You can use it like this:
...
4
votes
Accepted
File names to database table
folder = r'\\my\network\folder'
subfolder_list = [r'\DRAWINGS', r'\DOCUMENTS', r'\VIDEOS']
Don't write the type into the variable name. The type should be able to ...
4
votes
Accepted
Generating and storing a unique salt in Oracle database using Java
Please use best practices in general when dealing with password hashing.
If you have to verify the database for your generated salt to be unique, you're using a bad salt generator. Make sure to focus ...
3
votes
Accepted
Select non-task workorders, but include the costs of the tasks
I know you say that
I plan to use the view for multiple reports. So I've included all 265 columns in the view via select *
but given the truly absurd column count in that table, I would consider a ...
3
votes
Clubbing three queries that return mutually exclusive records
You can use aggregation like this:
...
3
votes
Accepted
Clean up verbose code for Oracle SQL
tidy data
Column names like FY17 or FY24 are not helpful.
You want just a single FY column, which has values like 2017 or 2024 in different rows.
Hadley Wickham
describes
the concept in some detail.
...
2
votes
Accepted
Exception handling and releasing of OracleDB connection
There really isn't too much to say about your posted code.
Answering your specific question:
Yes, the connection will always be released as either your then or your catch method will always run. ...
2
votes
Accepted
Update pass-through query from a form (an alternative to stored procedures)
The first thing I would suggest is to avoid as much as possible depending on the DoCmd object. The DoCmd object is essentially ...
2
votes
Compare Oracle Table with SQL Server Table and Update/Insert
This code queries the SQL server 15K times (for each and every employee in the Oracle view). Suggest generating the SQL query based on the Oracle view data set and retrieve the data from SQL in one go ...
2
votes
Refactoring the legacy code which is using '§' char in the code
I don't see you using std::, surely you didn't put using namespace std somewhere in your code right?
I find your parameter ...
2
votes
Accepted
Calling an Oracle Stored Procedure with C# Code
I could see using it for the connection, command and reader since they implement IDisposable and the documentation for them does say to always call Dispose().
For the parameters it seems not only ...
2
votes
Query for customer quotes by date range
I think the query is optimal enough. The truth is query can retrieve a result only by accessing 2 years data, so given WHERE condition is must. And the query access ...
2
votes
Bulkloading xml's into Oracle table
As the ctl file can't be parameterized you'll have to create them for each infile.
As it is quite small, I'd create it on the fly from a here string with the format operator.
This sample script just ...
2
votes
String manipulation over 2 tables in database to application
Even if I don't know the actual content, joining tables on client-side is basically a bad idea because you have to load the whole content to the client.
As BCdotWEB mentioned in the comment, the ...
2
votes
Accepted
Seek to get acceptable performance of SQL request (SOLVED)
The query plan seems to be too complicated because all_constraint is a view and not table. So it's difficult to derive what it's doing.
But from common sense it ...
2
votes
Updating a huge hashmap from a resultset
there was an issue with the code, I was obligated to add the SQLException to the method, since the code was not compiling otherwise.
Before
...
2
votes
Accepted
capturing counts of open items between dates
In looking at your query, I think there may be a few things you can do to improve your performance. The first is that you can aggregate your ticket_table ahead of time based on the request interval. ...
2
votes
Is this PL/SQL Stored proc optimal?
As mentioned, consider MERGE to handle the conditional INSERT and UPDATE actions. Doing so, ...
1
vote
Select non-task workorders, but include the costs of the tasks
It looks like you are trying to get the cost of a work order including its children, if it has any, by joining from workorder nt to your in-line view ...
1
vote
Updating a huge hashmap from a resultset
It is possible to join the queries into one query by having two separate queries on table1 that join on the primary key:
...
1
vote
Updating a huge hashmap from a resultset
My first question has to be: Why Java 7? If this is production code, then your environment urgently needs to be upgraded since 7 hasn't beeen supported by Oracle for over 5 years. And if this is just ...
1
vote
Calculate the midpoint of a polyline
Check this function which returns the mid point X,Y in WKT format. Please note this function uses the SDO_LRS of Oracle which is part of Oracle Spatial.
...
1
vote
Calculate the midpoint of a polyline
I would recommend to try re-writing the procedure with Buffer and Centroid functions as below.
procedure mindpoint (in_line_geometry)
...
1
vote
Bulkloading xml's into Oracle table
After looking back at it again, I realized I didn't need all those different dataFiles,
as all those dataFiles hold only a ...
1
vote
Accepted
1
vote
Oracle SQL Code - Multiple Joins used
You open with
SELECT DISTINCT
. Is this really necessary? This is a performance killer. Perhaps duplicates can only occur between certain tables. If that were ...
1
vote
Query for customer quotes by date range
To optimize this query, I would only perform the date checks once, regardless of how Oracle optimizes internally.
...
1
vote
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
oracle × 76sql × 49
performance × 15
plsql × 13
c# × 12
java × 9
jdbc × 6
datetime × 4
sql-server × 4
python × 3
beginner × 3
.net × 3
csv × 2
database × 2
entity-framework × 2
stored-procedure × 2
c++ × 1
php × 1
array × 1
vba × 1
python-2.x × 1
mysql × 1
unit-testing × 1
node.js × 1
hash-map × 1