Is it possible to determine when an object within an Oracle database became invalid?
I have tried looking at the DBA_OBJECTS view, but none of its date stamp columns seem to be affected when the STATUS changes to 'INVALID'.
...
Hi,
I'm trying to find a lib to access a DB from an Ocaml program. After trying ocaml-sqlite, I'm not satisfied since it's somewhat slow.
I've seen a mysql module but it doesn't seem to be maintained.
thanks.
...
I have some SQL scripts that I'm trying to automate. In the past I have used SQL*Plus, and called the sqlplus binary manually, from a bash script.
However, I'm trying to figure out if there's a way to connect to the DB, and call the script from inside of the bash script... so that I can insert date and make the queries run relative to a...
So I wrote a Python program to handle a little data processing
task.
Here's a very brief specification in a made-up language of the computation I want:
parse "%s %lf %s" aa bb cc | group_by aa | quickselect --key=bb 0:5 | \
flatten | format "%s %lf %s" aa bb cc
That is, for each line, parse out a word, a floating-point number, an...
I have an nhibernate query which generates a query like this. I just extracted the example scenario
SELECT ID FROM EMPLOYEE
WHERE EMPLOYEE.NAME = @P1 AND
AND MANAGER_ID IN (@p2, @p3, @p4...@pn )etc.
Using NHprofiler I found the query takes around 500 ms. Table has index on name and manager_id. Employee table is around 6 million record...
This feels like a dumb question, but I see the following in the Oracle concepts guide on transaction management:
A transaction ends when any of the
following occurs:
A user issues a COMMIT or ROLLBACK
statement without a SAVEPOINT clause.
A user runs a DDL statement such as
CREATE, DROP, RENAME, or ALTER. If the
cur...
I'm trying to randomly insert values from a list of pre-defined values into a table for testing. I tried using the solution found on this StackOverflow question:
stackoverflow.com/.../update-sql-table-with-random-value-from-other-table
When I I tried this, all of my "random" values that are inserted are exactly the same for all 3000 re...
Is there a way for me to force a specific join order in Postgres?
I've got a query that looks like this. I've eliminated a bunch of stuff that was in the real query, but this simplification demonstrates the issue. What's left shouldn't be too cryptic: Using a role/task security system, I'm trying to determine whether a given user has pr...
Hi,
I'm porting a medium-sized CRUD application from .Net to Qt and I'm looking for a pattern for creating persistence classes. In .Net I usually created abstract persistence class with basic methods (insert, update, delete, select) for example:
public class DAOBase<T>
{
public T GetByPrimaryKey(object primaryKey) {...}
public ...
Hi,
I need to create a database that would have the spatial data of countries, sub-regions (states, districts ...) of the World.
Which would be the best way to approach this?
Is there a pre-defined logic (probably using latitude/longitude) to achieve this?
Appreciate any help in this regard :)
Thanks a lot!
...
I find the need to send SQL statements by email often and I was wondering if anyone had a tool that would color code the Oracle Reserved Words, Keywords, and Namespaces so that when the code is copied from the tool into say Lotus notes it would appear in the email as it does in the tool.
...
I'm trying to write a relatively simple algorithm to search for a string on several attributes
Given some data:
Some data:
1: name: 'Josh', location: 'los angeles'
2: name: 'Josh', location: 'york'
search string: "josh york"
The results should be [2, 1] because that query string hits the 2nd record twice, and the 1st record once.
...
Let me try to explain this to the best of my ability:
I have a table in which there is a userID column and a program column (along with other columns of non importance). I need to find the users within this table that have multiple instances within this table where that user has a program of X associated with it.
Can anyone help me ple...
SQL Question
I wonder if I can write a single sql INSERT statement to insert a row into a table where some of the fields come from variables and others come from another table. Currently I select from tableA, store the fields in variables and then insert them into tableB.
In the following example I'd like to get field1, field2, and fie...
For example:
Given columns A,B,C,D,
IX_A is an index on 'A'
IX_AB is a covering index on 'AB'
IX_A can be safely removed, for it is redundant: IX_AB will be used in its place.
I want to know if this generalizes:
If I have:
IX_AB
IX_ABC
IX_ABCD
and so forth,
Can the lesser indices still be safely removed?
That is, does IX_ABC ma...
I run the following query
select * from my t1 where c1 = 22
and query runs for ever.. How can I find out whats locking that row?
I tried runnning sp_who, sp_who2, sp_lock, and googled for information but still no resolution in sight.
Please help.
I am using sql server 2000.
...
here is the whole picture. There is a table (table programparticipants) that stores all participants of all programs, there is another table (table programs) that stores all the programs. What I need to accomplish is the following:
Acquire the programs where a user has attended more than one program (done)
Acquire the other programs (f...
Dear all,
I need to apply an SQL query to CSV files (comma-separated text files). My SQL is predefined from another tool, and is not eligible to change. It may contain embedded selects and table aliases in the FROM part.
For my task I have found two open-source (this is a project requirement) libraries that provide JDBC drivers:
CsvJ...
I'm using the code below to insert data into a SQL table from a datagrid, the datagrid has 5 rows but only 4 are inserted into the table, the first row is missed off. I've narrowed the problem to updateTable below. Can you spot the problem? After an hour of trying I can't.
private void updateTable(OdbcConnection conn)
{
...
I would like to know what are the best practice programming tasks in relation to users submitting data through a web form to a website.
I am particularly interested in any C# or VB.NET commands that should be used through out the process from the moment the user hits the submit button until the data hits the database.
I have been readi...