database-queries

Is there any way to send more than one postgresql sql prepared statement in one call in php?

Is there any way to execute more sql prepared statements at once? Or at least use something to achieve this result, can it be emulated with transactions? pg_send_query can execute more statements (from php docs "The SQL statement or statements to be executed.") but pg_send_execute and pg_send_prepare can work only with one statement. ...

How to create more than one stored procedure using ExecuteNonQuery?

The situation is: I want to create two stored procedures: query1 = CREATE PROCEDURE MyProc1 AS SELECT * FROM TEST1; and query2 = CREATE PROCEDURE MyProc2 AS SELECT * FROM TEST2; I can do it using command.CommandText = query1; command.ExecuteNonQuery(); command.CommandTest = query2; command.ExecuteNonQuery(); Is it possible t...

How to specify multiple OR conditions in android (sqlite3)?

Hi, I want to know how to specify something like in my database adapter: Select * from _myTable WHERE _columnValue IN ('2','3','4'); Is there a way to use any of the existing query methods specified in SQLiteDatabase? I can write the query in pure sql, but wondering whether there is a better (and easier) way to accomplish what I am a...

Speeding up large numbers of mysql updates and inserts

I have an app that needs to update a large amount of data over a large number of entries. Basically it does some 7,000 inserts and/or updates but it takes a looooong time (like almost 9 minutes... averaging about 0.08 seconds per query). Essentially I'm looking for general speed ups to making multiple such requests (I'm not expecting a s...

Is it possible to get database contents from any website without having DB access ?

I want to retrieve the database contents from a website and use it in another website. Is it possible to access the database contents using any scripts ? There are totally 500 + products in the website and they are going to remove those contents now. So before they remove them i want to download all the data and host it in my website. It...

Complex SQL Server Query between more than one database

Hello, I have Scenario and i want to convert it to a query. My Scenario: I have lot of dbs with same structure "Clientxxxx" i want to make loop for all these dbs to get data from one table exists in all these dbs called "EventLog" these event log recorded in this table for clients exists in another db called "Portal" I want to get eve...

DB2 REORG TABLE from client side with Migrator.NET

I'm using Migrator.NET with a DB2 database and my current migration executes an ALTER TABLE statement, which causes the table to go into the "reorg pending state". This state requires the reorganisation of the table with > REORG TABLE TableName before I can do anything else with it. I tried executing this with Database["DB2"].Execut...

SQL List Game Database By Most Likes

So my site's main page display's applications for a PMP. Users can rate these apps with 'Like', 'Dislike', or 'Neutral/None' (every app is rated Neutral/None by default.) On the main page I wanted to list the games by the highest difference (So it would take the total Like's and Dislike's then add them together.) I'm having difficulty m...

How do we optimize oracle database ?

Hello, We have a Oracle 9i Database with 7 tables each with 15+ Million records. There is no relation between the table i.e. no foreign keys. Here is an example of one of the tables CREATE TABLE GSS.SHOWPD ( INSERVID VARCHAR2(7 CHAR) NOT NULL, CAGEPOS VARCHAR2(8 CHAR) DEFAULT NULL, DETA...

Requiring parameters in a SQL where clause?

Imagine you have the following table (note: this is a contrived/simplified example): CREATE TABLE foo ( book_id number, page number, -- [a bunch of other columns describing a single page in a book] ); ALTER TABLE foo ADD (CONSTRAINT foo_pk PRIMARY KEY(book_id, page)); While (book_id, page) pairs are unique, the same page nu...

Berkeley DB: how does it compare to MongoDB?

Recently, I've been digging into various types of DBs. I need to store & query “relational, hierarchical, graph, document” hybrid data. I'm looking for the best DB solution. I can't find much data about Berkeley DB. Most of the stuff on their website is written by the marketing dept. One of the PDFs makes it sound like it handles relati...

MySQL syntax error

Hello, I get the following syntax error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* ,MATCH(city) AGAINST ('""' IN BOOLEAN MODE) FROM `` WHERE MATCH(city) AGAINST ' at line 1 The corresponding code for this error is the following...

Database - Query

I have two Database (eg. two .mdb file). both have same name, same table and same field. the difference is one is old and other is updated copy of .mdb file. i want to copy only new records from the updated copy of the .mdb to the older one. is there any way other than iterate trough all the records and compare and filter only newer one?...

How to convert TEXT data to DATE TIME in SQLITE in Android?

Hi! I am new to android. I am using a database to store my data. I also store date as TEXT in database. format of date is as follow... "Mon, 20 Oct 2010 12:30:00" So i stored them in TEXT datatype not in DateTime. Now i want to display them in following format "Mon, 20 Oct 2010" The main thing is that i want to ORDER them in DESC. I w...

Need strategy for managing aggregated data during large database table creation

Imagine collecting all of the world's high-school students' grades each month into a single table and in each student's record, you're required to include the final averages for the subject across the student's class, city and country. This can be done in a post-process, but your boss says it has to be done during data collection. Cons...

Entity Framework Foreign Key Queries

I have two tables in my entity framework, objects, and parameters which have a foreign key pointing to the object to which they belong. I want to populate a tree with all the attributes of a certain object. So in order to find those I want to do this: String parentObject = "ParentObjectName"; var getAttributes = (from o in myDB....

Performance Tweaks for a Windows Console Application

I have a windows console application that queries a single database and creates flat files of the data for another external system. I will use Task Scheduler to execute a batch that will start this data export. Each query is retrieving a few hundred thousand rows of data (200k+). What is the best way to make my application scalable so th...

Running SQL 2008 Express in '2005' mode

Hi, currently i have SQL 2005 Express installed and wish to upgrade to 2008 express to gain the extra dbase limit (10gb) my question is, if i run 2008 express in 2005 mode will this trunkate the dbase to the 2005 limit of 4gb or will it remain at the 2008 limit of 10gb? Chris ...