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
15 views

Microsoft Access Query: “System resource exceeded”

I have a simple query in my DB and I received this error message: "System resource exceeded". But the query is really simple! Here it is: PARAMETERS [@FILTRO] Text ( 255 ); SELECT [POLIZZE ...
0
votes
0answers
68 views

Using a `mysql_query` to insert category values

Ok I'm importing direct from a csv to MySQL, using a mysql_query to insert values. How do you insert category terms into the Wordpress database structure assigning them to a post. Below are two import ...
0
votes
0answers
13 views

Users_With_Messages Table normal form

I have the following tables in my database: Above these tables (not pictured) is a Users table where the SendingUserId and ReceivingUserId are keyed onto (they are foreign keys). Are these tables ...
0
votes
0answers
25 views

IBM data studio 4 - how to open a new sql script editor?

I have to use IBM Data studio 4 and for the life of me I cannot figure how to open another SQL script editor window. Luckily it opens with one, but then I am constrained to that single window. I ...
0
votes
0answers
12 views

Securing database from intruder DUMP

What would be the best way to secure a MYSQL database that contains customer information from being dumped by say a injected SQL or Remote file inclusion? Can the DUMP function be turned off globally ...
0
votes
0answers
49 views

Finding duplicate data

I have noticed dup’s generated in my mail system. some service was causing duplicate calls to my insert proc and generated multiple duplicate messages with about a 4 mili-second difference in a date ...
0
votes
0answers
11 views

Organizing trending posts

I have a page where a user can see the most trending posts under a hashtag name (e.g. #soccer). My question is, how should I be organizing the most trending posts? Should I create a cron job that ...
0
votes
0answers
46 views

Match unique id's on import- csv to sql

I have a csv file that I would like to import into a phpMyAdmin database (Wordpress). The CSV file is formatted as shown below: list-id | post_title | slider | ...
0
votes
0answers
18 views

How to create a good membership database for OpenID

I would like to know if it exist patterns, samples or good practices for creating a good membership database compatible with OpenID or connection with facebook, Google, Yahoo, Windows, ...
0
votes
0answers
26 views

Return multiple results from one table in one row

I have a table of time sampled data as follows: Meter Number|Sample Date|Meter Reading 1 30/04/2014 123 1 22/05/2014 456 1 29/06/2014 789 2 ...
0
votes
0answers
33 views

Need to implement some logic in DB2

I need to implement the below logic in DB2. Please help how to do so as I am new to DB. LOGIC: 1.Find the last year using LastYear = Current Year - 2 years 2.Check if LastYear equals value in ...
0
votes
0answers
18 views

How to select full text in the blob type?

There's some large text segments stored in database table BLOB column, and when I query that column against database , usually only part of that large texts get displayed. I am not sure whether this ...
0
votes
0answers
55 views

Suppressing the removal of trailing zeros in numeric data type in sql server

I initially declared the data type of the columns for some of the tables i am working on as "NUMERIC". cause of that, trailing zeros are being removed. Is there anyway to suppress this behavior? i ...
0
votes
0answers
44 views

How to find the estimated time for ORACLE SQL Query

Help to find out the following I have 8 million rows in an Oracle table, and this is being queried by a BI tool every day and taking more time. Is there any like explain plan that will give me a ...
0
votes
0answers
40 views

dynamic sql: merge partitioned tables (annual tables into a single table of all years)

I need to merge (UNION) data from annual tables into one large table. I am confused about how dynamic SQL (or else) should be used for this. Below is an updated version of my question on ...
0
votes
0answers
30 views

Installing SQL Server 2012 failed setup administrator

Can anyone tell me why this keeps failing? I am logged in as "Administrator" on Windows Server 2008 r2 I added Administrator to the "Backup ... " Group And I checked to make sure everything is as it ...
0
votes
0answers
30 views

Difference between OID and Primary key

Although I understand basic difference that OID is external to the tuple and generated by the system and Primary key is inside the tuple and generated by the db designer, I want to understand why OID ...
0
votes
0answers
39 views

Multiple table rows in one row Informix

I have problem just like this one but in Informix. I have table with 2 attributes ID, email like this one: ID email 1 my_mail1@mail.com 2 my_mail2@mail.com 2 my_mail3@mail.com 2 ...
0
votes
0answers
26 views

MySQL Create Table Statements not being replicated

I have a one master 5 slave MySQL replication setup. When I create a table on my master, it gets replicated on 3 of the 5 slaves. The other slaves however do not replicate the "CREATE TABLE" ...
0
votes
0answers
47 views

How does the optimizer of Firebird determine join order?

As Most query optimizers determine join order via a dynamic programming algorithm pioneered by IBM's System R database project, I was wondering whether the optimizer of Firebird uses the same ...
0
votes
0answers
49 views

Why do non-integer joins in MYSQL take so long?

It seems that every time I try to run a query using a non-integer join in MYSQL, it destroys the speed of my queries. Is there a better way to join on text fields (especially ones that could be cast ...
0
votes
0answers
15 views

SQL Server 2008 database is not coming online after restore.. Pleae need help asap

I have restored a 1TB database and now it shows the restore completed 100% but the database is not accessible. sp_who2 has a SPID 50 performing this restore but current command its showing is ...
0
votes
0answers
51 views

Find out profile creation date

Our DBA says that a specific profile was created but we cannot find out its name (and it wasn't provided by the DBA). We want to find out by looking at the profile creation date. How does one find ...
0
votes
0answers
25 views

SQL Get result as a column

Is it possible to get a result as a column? The SELECT query will only need to return one record, however, at the time of querying the database it will not know what attributes are in the table, and ...
0
votes
0answers
110 views

MySQL Update Default Value of Column in Multiple Tables From An Inner Select Statement

I posted this question on stack overflow, but his might be a better place for it. Reference: ...
0
votes
0answers
30 views

Trying to import an addressbook

I'm trying to import a .sql-file that I got by converting an .dbf-file. The problem is this line: INSERT INTO address values ('', '', 'Dekanat', '', 'Fachhochschule Hildesheim/Holzminden/Göttingen', ...
0
votes
0answers
33 views

more queries vs storing results in database

Environment: Embedded (smartphones) Data Structures: Object Table A: id, field1, field2... Object Table B: id, field1, field2... Object Table C: id, field1, ... , Object A, Object B ... many ...
0
votes
0answers
48 views

Enterprise Policy Management Framework Issue

I am attempting to setup and configure EPM to work in our environment. I have all the components in place and when I run the powershell it completes without reporting any errors. However, the only ...
0
votes
0answers
16 views

result time long

İ lose 3-4 minute when this query running in mysql.How to write I this query more optimal: select u.*, d.device_id, d.name from users u inner join pass_logs p inner join devices d ...
0
votes
0answers
25 views

How to make a role from schema A “grantable” in schema B

There are two schemas in the same database: A and B. Schema A has a role A_ROLE. I want to be able to give grants to A_ROLE from schema B ( so that the users with A_ROLE were able to query tables from ...
0
votes
0answers
31 views

MySql query keep running for a long time

Following query keep running for a long time and I'm using MySql 5.5.34 on XAMPP on Windows SELECT id_package, `pck`.`fk_sales_order`, `pck`.`fk_picklist`, count(pci.id_package_item) as items, ...
0
votes
0answers
28 views

SQL Server 2008 R2 installation device error

I am trying to install SQL Server 2008 R2 to use along with Visual Studio for a website I am creating. However when I am installing SQL Server I am constantly getting the following error: The ...
0
votes
0answers
39 views

Time series indexing

Indexing time series (like in this article) is done by reducing dimensionality and indexing it using some spatial access method (like R-tree). How does that improve performance, though? It's not like ...
0
votes
0answers
32 views

Adding a new partition to the partitioned table is skipping the last filegroup

I have created one partitioned table and trying to add a new partition to that. I ran the following scripts to create a new filegroup and add a new partition to the table. But when I run the alter ...
0
votes
0answers
30 views

how to use joins in hierarchical queries

how to use joins in hierarchical queries my try SELECT cust_id AS child_id FROM customer c,cust_assoc_dnorm d on d.dsend_id=c.cust_id WHERE connect_by_isleaf=1 and ...
0
votes
0answers
41 views

MySQL Query for combobox

I have two tables in my database.namely books and bookidofid. where bookidofid from books table is referenced to bookidofid from bookidofid table Table books ...
0
votes
0answers
98 views

How to use Select query just right after Insert on master in a query.?

I have a question on mysql replication. As usual, I deployed my db structure like the Update on master db, the select on slave. My questions. If I use SELECT query just right after INSERT in a query, ...
0
votes
0answers
37 views

Retrieve result set with proportion of some column value

I have a table called PORTFOLIOS in which I have PORTFOLIO_ID, PORTFOLIO_NAME and SCORING_RULE columns. The SCORING_RULE column can have two different values (like double_scoring or single_scoring). ...
0
votes
0answers
157 views

SQL query to return a column per date in date range with sum of contract utilisations (value/duration)

My question is similar but more elaborate than another already in stackexchange.com "SQL query to return a column per date in date range?" I have the following data: Customer Start_date ...
0
votes
0answers
26 views

Access 2013 compare changes made to table

I am currently working on an Access 2013 database and trying to find the best solution to a problem I am having creating it (I am fairly new to databases so bear with me). Situation: Data is imported ...
0
votes
0answers
56 views

explain plan ,joins and optimization

I have to join 6 tables in sql query and each of these tables have 1 join to each of there master tables . Hence i have defined 5 subqueries within a sql query but i am seeing a lot of performance ...
0
votes
0answers
39 views

Why does the delete/update block each other in this case?

The following drives me crazy. I have: session1>begin; session2>begin; session2>update dummy set salary=1000 where id=11; session1>delete from dummy where id=1; id is the PK ...
0
votes
0answers
81 views

Name for SELECT equivalent of UPSERT

UPSERT means INSERT and\or UPDATE, is there a standard name for a sproc that will INSERT if necessary and then SELECT? e.g. I want to get the IS of a row that matches fields and give me the ID, if ...
0
votes
0answers
30 views

how can i achieve this

I have a access table for which i want to design a form, where user will enter the following info. User will enter this info on weekly basis Period No Week No Canadian Dollar rate US Dollar Rate ...
0
votes
0answers
165 views

Transaction Time out error C#

Database Type : SQL server 2008 R2 Issue description: There are two machines. One is server machine(OS- Windows server Enterprise) another one is client machine(OS- Windows 7 professional). In Both ...
0
votes
0answers
48 views

Reduce read write delays in specific database setup

I have a database with a large table with 15 columns (type double). It contains a large amount of data (~ 100 rows of data for every second. Holds 3 days of data). I also have a real-time program that ...
0
votes
0answers
52 views

MySQL import gets slower and slower until it virtually grinds to a halt, what can I do to maintain constant speeds?

I'm importing a large set of sql data into a MySQL (MariaDB 5.5) database, the files are from 200mb to 3g. I'm importing it one after the other, and it starts importing at speeds around 1MiB/s to ...
0
votes
0answers
16 views

Performance One Row With Total Vs Multiple Rows with Seperate Values?

Not 100% sure how to explain this situation but here it goes: I am building an Inventory Database that all items received are entered into and a label is created for each Container, that is going to ...
0
votes
0answers
59 views

Alphanumeric field in MySQL

I need to create a character field with some rules, they are, Field name: contract_number. Rules: Contract Number Contract number must be alphanumeric. Contract number must be unique. Contract ...
0
votes
0answers
21 views

How to Replicate data from read only sql database to Active one

We are applying logs in every 30 min to one SQL db which has to be in Restoration Mode/Read only mode as we are applying logs continuously. Now we have to Set up Replicaion of this Read only Db to ...