An acronym for "Structured Query Language" (it's not the name of a specific DBMS product), SQL can be used in relational database management systems (RDBMS) to query, update, delete, and insert data as well as modify the structure of the database. It can also be used to manage schemas and data ...

learn more… | top users | synonyms (1)

0
votes
0answers
62 views

PostgreSQL: Merge rows with the same date and time but different numeric values in one row with average of the values

I am working on a financial software where we have huge table of ticks with more than 800M rows. A single row: symbol_id, broker_id, date, time, bid, ask The problem is the table has many ticks ...
0
votes
0answers
50 views

SQL Server Mirroring send/receive ack time not normal

I have a problem that arises during the performance test by microsoft team in my client. The report that is given to us provide information about whether or not a parameter is good based on the Object ...
0
votes
0answers
49 views

Attendance Database using sql in MS Access

I'm currently working with a simple database for the attendance of the professor in our college. I'm using MS Access 2010 with a Main table that includes the Attendance log of all the professor with ...
0
votes
0answers
28 views

Filemaker to Firebird data exchange

I want to connect from filemaker to a firebird 2.x DB. Firebird ODBC is not supported, only MYSQL, MS SQL etc. Is there any way to have a translator in between or maybe to connect through a PHP ...
0
votes
0answers
8 views

Unknown _TransactionIndex table in Azure SQL Database

Just noticed today that there is a random table in my Azure SQL Database that is named "_TransactionIndex_{guid}" It has 1 column, Id, that contains 8 GUIDs. Couldn't find any information about this ...
0
votes
0answers
33 views

Backup is getting failed with following error

Msg 3202, Level 16, State 1, Line 1 Write on "\w-mum-fp\SQLBKP\Weekly-FL\Interactions_26_01_2014.bak" failed: 1130 (Not enough server storage is available to process this command.) Msg 3013, ...
0
votes
0answers
79 views

Optimize tables & schemas & sql query - mysql

I have a mysql querying the following tables: CREATE TABLE `products` ( `id` int(11) NOT NULL AUTO_INCREMENT, `page_id` int(11) NOT NULL DEFAULT '0', `category_id` int(11) NOT NULL, ...
0
votes
0answers
24 views

Error in configuration sql server replication

I am configuring replication for a sql server 2005 on win server 2003. I get this error: TITLE: New Publication Wizard SQL Server could not configure 'aaaa' as a Distributor. ...
0
votes
0answers
217 views

Cannot read property Collation.This property is not available on SQL Server 7.0

I'm not able to add administrator role in SQL Server 2008 R2. When I try to add new user it throws me the following error: Cannot read property Collation.This property is not available on SQL ...
0
votes
0answers
38 views

non-optimized regex and substr with injected list in mysql query

edit: I can replace phone, -10 (that is last 10 digits of phone ) with full phone digits. on tip i got is SELECT….FROM… WHERE phone IN (…) UNION SELECT … FROM … WHERE email IN (…) edit end I am ...
0
votes
0answers
18 views

Bring relevant results based on an input search query - full text search?

The database contains information about businesses : title,name, categories, services, description ... to bring the relevant businesses to the user according to his search query I'm thinking about ...
0
votes
0answers
12 views

How to categorize pairs of tags?

I have a table containing pairs of tags (say html tags) such as id tag tag_match 1 <div class="first"> 1 2 <div class="second"> 2 3 </div> ...
0
votes
0answers
67 views

Order before Group

I have this query: SELECT HOTEL.hotelname AS NAME, HOTEL.`boardbasis` AS board, HOTEL.`engine`, HOTEL.`itemcode`, Group_concat(Round(((hotel.cheapestprice / 2) + ...
0
votes
0answers
39 views

How to write query using case statement

I have two mysql tables then i need to write a query to do the following I'm trying to achieve this by following query but i don't know how to complete this query. can someone help me on this ...
0
votes
0answers
9 views

Updating Document in MongoDB without Alphabetically order

I am making one project on MongoDB and inserted some documents and now i am updating the documents by this code.. bson_init( query ); bson_append_string(query, "First", "A"); ...
0
votes
0answers
130 views

SQL Server 2012: Login failed for user. Reason: Failed to open the database configured in the login object

Every so often, my SQL Server 2012 throws the following errors: Error (likely related to the one below): Source: spid99 The client was unable to reuse a session with SPID 99, which had been ...
0
votes
0answers
153 views

Oracle 10g xe database error when connecting ORA-12528

I am trying to connect to my local database Oracle 10g XE however i am getting the following error ORA - 12528. This connection was working and this issue suddenly arose. I did LSNRCTL status the ...
0
votes
0answers
52 views

Same table for real persons and fictional one

In my application stores both real and fictional persons (from movies, etc.) as well as stage names and alter egos. These entities have almost the same properties and are often referenced via foreign ...
0
votes
0answers
64 views

What are the steps to change tables engines from MyISAM to InnoDB?

I have a Datebase with 10MB size . The Tables' engines were MyISAM (table-lock level). So I deiced to change them to InnoDB (row-lock level). I used the sql query for each table : ALTER TABLE t ...
0
votes
0answers
85 views

SQL Server 2008 R2 replication server runs faster than primary

I run a simple query like select * from table and i take the following results: primary database : 90 seconds replication database : 2 seconds The tables are identical and have the same indexes in ...
0
votes
0answers
166 views

SQLite Loop from SELECT QUERY

I have this long query which works one for processing one sale. What I'm trying to do is loop it until no more B.boughtPending = 0 and S.soldPending = 0 and then Select all the ones that ...
0
votes
0answers
178 views

SQLite UPDATE two tables from VIEW or TEMPORARY TABLE

Here is the query that doesn't compile just to show how it should look like. But since I can't do Multiple table UPDATE's. This fake query should be able to run the inner UPDATE's for both tables if ...
0
votes
0answers
55 views

Making cloned copies of a innoDB mySQL database

I'm trying to find a better way to clone innodb mysql database then using regular import. We use an innoDB mySQL database in production. A backup is created daily from production. Currently each ...
0
votes
0answers
39 views

“Show table data” option to edit compact database

I have installed sql server compact edition 3.5 and i am sql server management studio to edit table.I am using "Show table data" option which comes on right click to a table of compact database. But i ...
0
votes
0answers
45 views

Error adding constraint foreign key to bridge table

Hi there I am fairly new to sql development. I am current following the head first into mysql book and is on chapter 6. On chapter 6 there is a table in third normal form but it does not contains the ...
0
votes
0answers
98 views

how I can set tmp_table_size for 16GB long table?

I am posting the same question as I posted in SO, but somebody advice me to post it here. I have a 16GB big table with 8 partition. And RAM 4 GB. I am running a query - SELECT ...
0
votes
0answers
30 views

Tips for improving my particular batch processing

I'm working with mail data from the USPS, which contains 10 related tables to make up a single mailing, as well as a single table containing all of the scans that each mail piece may receive. Once per ...
0
votes
0answers
119 views

How to determine if SQL Server Reporting Services database is being used?

I have a SQL 2005 server that needs to be decommissioned. For regular databases, I have a couple scripts that look at sys.dm_db_index_usage_stats to determine last access. My normal process is to make ...
0
votes
0answers
92 views

MySQL Workbench entity-entity relations and ENUM data type

So I'm creating an EER model diagram using MySQL Workbench. I have a table task_types with only one column task_type_id, where I store a list of different types type A, type B,... That may be updated ...
0
votes
0answers
92 views

How does tablespace sizing works in Oracle

Let's say I have an input of 20 gigabytes of raw data (text file) which in turn I would into an external table and would then swap partition in order to place them on my database. The question now is ...
0
votes
0answers
30 views

Recommended plan for 0min RTO and RPO

I have a Windows Server 2008R2 Server, running SQL Server 2008R2 SP2. The server currently only does a full backup once daily. The server's operational hours are between 8am and 5pm. The server's new ...
0
votes
0answers
37 views

Query for inserting into temporary table

I have a table absences that has the following fields id , utilisateurs_id, date_debut , date_fin,type, `statut I will explain my problem based on example : ...
0
votes
0answers
94 views

Self Referencing Table, Child and Master, Update Cascade Through Stored Procedure in SQL Server

Basically I am expanding an existing system that has every template as its own template, however there is becoming a lot of overlap (same template exists in multiple categories and has a new record ...
0
votes
0answers
96 views

Oracle - How can I improve this query?

We have performance problems with some queries. We always use the rank() function to get the latest entries with a status. The question is, how to speed up things. CREATE TABLE PAYMENT ( CLIENT ...
0
votes
0answers
92 views

Alternatives for UPDATE statement Oracle 11g

I'm currently using Oracle 11g and let's say I have a table with the following columns (more or less) Table1 ID varchar(64) Status int(1) Transaction_date date tons of other columns And this ...
0
votes
0answers
23 views

How to store UserName who is Updating the value of a table in For Update Trigger?

In my web application, am creating a log process. I have created an update trigger, its working perfectly but I need to know who updated this data i.e the user who performed this action. How to store ...
0
votes
0answers
29 views

sql server 2000 linked server works locally but not from remote machine

sql server 2000 linked server works locally but not from remote machine ,i am not able to use linked server remotely (from my desktop). i enabled TCP/IP for the sql Server and i enabled win&sql ...
0
votes
0answers
41 views

Is there a syntax to access the table name in the select query?

In MYSQL. I want to select the records which has the same contents with the table name. for example, consider the following table. <TABLE : tbl_1> +-------+------+ | id | no | ...
0
votes
0answers
44 views

All databases restoring in Suspect Mode in SQL Server 2012

I've just re-installed SQL Server 2012 (removed the evaluation copy and installed a licenced version) and now every database I try to restore, it fails to completely restore and the database sits in ...
0
votes
0answers
88 views

My queries are slow under load

I am performing a load test for my application. All my SQL queries which are fired from my application, individually look better and perform fast. The same SQL are becoming bottleneck when they are ...
0
votes
0answers
48 views

Compare elapsed time for 2 oracle Sql files. (2300 pairs of sql files)

Version ORA 11G I have some timing comparisons that I want to do on about 2300 Pairs of Oracle SQL statements. I'm trying to convince management that tuning of these 2300 would give them a ...
0
votes
0answers
42 views

Expanding the database in SQL Server 2008 R2

I have a database server DBA with .mdf and .ldf files on a SAN. Often one of my database will not list out the tables (unable to extend the db), Every time I have to take it offline and bring back ...
0
votes
0answers
28 views

Replace minus symbol across whole document

A program I use has SQL & RTF files to generate reports and I'm wanting to remove all instances of the - (minus) symbol from the resulting document. I'd tried a SELECT REPLACE but I'm not very ...
0
votes
0answers
59 views

In mySQL possible to change auto-increment ids that have huge gaps and if so how?

I am importing a 50 table relational database (I'm not a dba) with 250,000+ records in most of the tables, yet the auto increment is off in most tables, some for example showing the last ID at 5 ...
0
votes
0answers
84 views

Using an enum as part of an index definition

When I use an ENUM column in a table the ORDER BY uses the ordinal of the ENUM not its value. I wasn't aware of that. So my question is what are the subtle issues when an ENUM is part of an index ...
0
votes
0answers
73 views

Select the top N products from each category, but where the merchant hasn't already been picked

this isn't the usual Select top N results from each category question - there's a little bit more to it. I have the Select top N query as follows: SELECT tmp.id, tmp.name, tmp.category_id, ...
0
votes
0answers
23 views

SQL Server 2012 Live Database Backups

I want to take backups from our live servers which i working 24x7 is there any precautions i should take ? Or is there any special ways to take backups of live databases? We're using SQL Server 2012 ...
0
votes
0answers
56 views

MySQL server vs client isolation levels

What is the difference between setting the transaction isolation level in the client configuration and the server configuration? If I set the client isolation level to be serializable while the ...
0
votes
0answers
83 views

Postgres binary replication: Standby takes a long time to start

I am using the Postgres binary replication tutorial, and have rsynced all the data files from my master to standby rsync -av --exclude pg_xlog --exclude postgresql.conf data/* ...
0
votes
0answers
22 views

Cloning rows with minor changes

I am attempting to clone a row in the database, not that difficult. However the row has a reference to another row in the database that when inserted needs to use a different value, perhaps provided ...