0
votes
0answers
4 views

Using a subquery in a LIKE statement

I need to write a subquery inside a LIKE statement. This subquery would return me a word that I need to find in the middle of a sentence (that belongs to another field). Is it possible? This is how ...
0
votes
0answers
10 views

Why is the transaction log file not truncated though its simple recovery model?

My database is simple recovery model and when I view the free space in log file it shows 99%. Why doesn't my log file truncate the committed data automatically to free space in ldf file? When I shrink ...
0
votes
2answers
9 views

Passing passwords more securely to mysql utilities on the command line

I have been trying to use mysqldiff.exe, part of MySQL Utilities group of tools. The idea is to identify schema differences between two databases, or other contained objects (tables, routines, ...
1
vote
1answer
9 views

Database design for multiple user attributes

I am building an app with Laravel, and I have users which also have a profile. I am unsure about the best way to set up the database for the user attributes. For example: user_ud | name | ...
1
vote
1answer
19 views

Can't connect to EC2 Postgresql instance unless I change the default port 5432

I just created a brand new EC2 instance with a default security group allowing All Traffic from Anywhere. My listen_address is set to * I can SSH to it but I can't connect to the pgsql instance ...
0
votes
0answers
12 views

How does Relation works in NOSQL?

i was using SQL in all my previous application and to understand the Parse.com db storage, i wanted to know NOSQL. I tried searching the differences between SQL and NOSQL for past 2 days & i ...
1
vote
0answers
9 views

How to create raster from table containing cell values in PostGIS?

I am having a table with integer values. These values are in between 0 and 2. I want to create a raster out of that table with integers as cell values. Or else how to create polygons out of that table ...
1
vote
1answer
50 views

What is stored in a transaction log file?

What does the transaction log file store? Is it the blocks of transactions to be executed, is it the snapshot of records before beginning the execution of a transaction or is it just the statements ...
0
votes
1answer
8 views

Import lots of mysqldumps with missing create database

I have a bunch of mysqldumps of my old server with one database each. Unfortunately we forgot to add CREATE DATABASE ... in all those dumps. How can I import those files in one batch?
0
votes
0answers
19 views

Opinion on Database Design for Task [on hold]

Would like to know if this is a good database design. Once you see the picture it is pretty much self explanatory. But anyways I will keep it brief. Basically users signup to create a bet, users ...
-4
votes
0answers
29 views

Mysql 5.6 very slow on windows server 2012 compared to other platforms [on hold]

The below command takes 2-3 seconds in a Linux MySQL 5.6 server running Php 5.4. Also on windows 8. mysql --host=$db_host --user=$db_user --password=$db_password $db_name < $sql_file On windows ...
-4
votes
0answers
18 views

what the wrong in this stetment [on hold]

Dim sqlQRY As String = " Select invqu FROM invodet WHERE invsun = '" & DataGridView1.Item(i, j).ToString & "' AND invon = " & Val(TextBox1.Text) & ""
-2
votes
0answers
11 views

This query returning different result sets [on hold]

Hi is have this query (SELECT DISTINCT CONCAT (MONTH(`Date`),'-',YEAR(`Date`)) from wp_result_plugin WHERE Bet=$Bet AND month(`Date`) = EXTRACT(month FROM (NOW())) ORDER BY MONTH(`Date`) ASC LIMIT ...
0
votes
0answers
10 views

MYsql/PHP - max_user_connections

I sometimes have an error where I have reached my max_user_connections. My hosting company does not want to increase it further. If I create an additional user, and 50% of the time connect to that ...
0
votes
2answers
30 views

Refer to renamed columns in WHERE clause

SELECT name, gdp/population as capita FROM world w1 WHERE continent = 'Europe' AND capita > ( SELECT gdp/population FROM world WHERE name = 'United Kingdom' ); How come I ...
0
votes
0answers
20 views

What is the best Technical Advice to setup Microsoft SQL Server in an Entry Level Server with 2 SATA Disks? [on hold]

SOS!!! What is the best Technical Advice to setup Microsoft SQL Server in an Entry Level HP ML310e G8 E3-1220V3 Server with 2x500GB SATA 7.2K Disks, 16GB RAM, Intel® Xeon® ...
-2
votes
0answers
11 views

Calculate percentage of a column group by 2 columns in pivot table format using oracle 11g sql [on hold]

I would like to request help displaying count of a column and respective percentage of a column as in pivot table. I tried several options of which I yielded 18 rows when used kind of select first ...
2
votes
1answer
29 views

Can This Update Query Be Made Faster?

update line_items set product_id = dups.latest_product_id from line_items as li join products p on li.product_id = p.id join vendors v on p.vendor_id = v.id join vendorgroups vg on ...
0
votes
1answer
21 views

Error: Incorrect usage of UNION and ORDER BY

I have this query: SELECT DISTINCT CONCAT (MONTH(`Date`),'-',YEAR(`Date`)) from wp_result_plugin WHERE Bet=2 AND month(`Date`) = EXTRACT(month FROM (NOW())) ORDER BY MONTH(`Date`) ASC UNION ...
1
vote
1answer
18 views

Is this a good structure for a table?

Each user/person could know one or more languages. All I can think is a table like +----------+------+-----+------------+-----+-----+-----+-------+ | PersonID | Java | PHP | Javascript | C++ | C | ...
0
votes
1answer
29 views

Indexes in a big table. (About 400 mil of rows)

I have a little deal. I have this table in a SQL Server 2012 Standard edition database. The table contains about 400 mil of rows. CREATE TABLE [dbo].[prodeje] ( [id] [int] IDENTITY(1,1) NOT ...
0
votes
1answer
35 views

Limit the number of votes

I have a table of content. Users can vote on a content row. They can vote up to three times. I'm looking for the most efficient way to make sure they don't go over three votes. I can think of two ...
0
votes
0answers
7 views

How to Extract suffix from the table column names [on hold]

I have 2 tables , 1 contains answers and columns are A1, A2, A3 so 3 in A3 means this is answer to the question 3. tblAnswers Personid A1 A2 A3 =============================== ...
-1
votes
0answers
18 views

Add one column from another table [on hold]

I have query which works fine, but I wanted to Add one column from another table. Here is my query:- select Id,username,email,usertype,active,(CASE WHEN usertype='1' THEN 'Admin' WHEN usertype='0' ...
0
votes
1answer
29 views

create table from another table

I have master categories table like this category_id category_name parent_name parent_id 1 animals & pet supplies null 0 2 ...
0
votes
0answers
6 views

How to calculate sum of a column in a table accessed with multiple joins and where condition

I am unable to find correct sum of vaccinated based on campaign id. no matter which campaign I choose to get sum of vaccinated on the basis of that campaign id it always returns the same data. Please ...
-1
votes
0answers
17 views

Stored procedure

I want to write a stored procedure that will insert data into two tables in SQL Server 2008 R2 but I am getting error. create table custlogin1 ( custid int primary key identity(1,1) not null, ...
0
votes
1answer
12 views

best way to store tags

I'm a university student building a web application for a project with three collegues , I took the database portion. Our site is basically a link sharing site and supports tags, what is an efficient ...
0
votes
0answers
29 views

Decompose table into third normal form

Tables X and Y are given as below : X (A, B, D, E, F, G, H, J) with A and B as primary key Y (K, L, M, N, O, P, Q, R) with K and L as primary key Now we need to decompose these tables into tables ...
0
votes
0answers
13 views

Fetch data from second table based on first table [migrated]

I'm new to the world of databases and I've just started making my first DB powered site with php and MySQL. I've got it working with data from one table but now I need to get a url to the users ...
0
votes
0answers
10 views

Distributed Replay DCOM issue

I have 2 SQL Servers in a Domain. Windows Firewall is disabled on both servers and there is no hardware firewall. Both servers are in the same subnet. One server, called Controller is configured as a ...
1
vote
0answers
16 views

debugging PostgreSQL serialization failures

I am trying to migrate our PostgreSQL 9.4 database from transaction level READ COMMITTED to either REPEATABLE READ or SERIALIZABLE. In either case, I'm exposed to a new set of errors with the format: ...
0
votes
0answers
19 views

How to extract common subqueries to simplify?

I have a query like this: select S.ID, S.name student as S where not exists ( (select course_id from course where department_name = 'Biology' ) except (select course_id from S where ...
1
vote
1answer
19 views

PostgreSQL JSON data type used as NOSQL, But VIEW as Relational Data Structure

Could I create a VIEW from the JSON data type but have it as a relational structure? Example: SELECT * FROM json_test; Results [ { "name": "Roy", "Country": "USA", ...
0
votes
0answers
9 views

indexable JSON datatype in MySQL/MariaDB

In PostgreSQL 9.4 there is a JSONB datatype which allows you to index on fields in the stored JSON objects. Does MySQL/MariaDB have an equivalent? I'm specifically interested in the MariaDB Galera ...
1
vote
2answers
59 views

When doing an update on a set of records, how do i get previous updates to show on current row to update in UDF

SO i have a rowset of 10 UIDs. They are all dupes, lets say DUPEUID. I have a UDF that will take the UID, check it against the table to see if there is a dupe, and update the UID to DUPEUID01. The ...
-4
votes
0answers
32 views

What are the smartest companies doing nowadays for business reporting and analytics? [on hold]

We are an innovation company and we pride ourselves with disrupting industries and forward thinking. Our challenges: Find the easiest way to connect to and combine data from multiple sources that ...
0
votes
1answer
30 views

Why people often said nosql has better write performance than sql? [on hold]

I have been hearing these comments all around the internet. But I cannot see a good justification for it. Agree that nosql use de-normalized scheme to store data, which does not require join (for ...
-1
votes
1answer
16 views

Connect to Oracle remote Database by only installing a client on my laptop?

Is it possible to connect to remote oracle database from my laptop if I only install instant client, without installing oracle database? I have the tnsnames.ora and listener.ora files in ...
0
votes
0answers
40 views

sp_WhoIsActive is not displaying results

I'm trying to use the sp_WhoIsActive stored procedure that I've downloaded from here: http://sqlblog.com/files/folders/release/tags/who+is+active/default.aspx I'm running the procedure without ...
0
votes
0answers
17 views

SQL Server service crashes when i run a linked server query

I'm using SQL Server 2012 on a Windows 7 Professional, 32 bit system. With the SQL Server service running, I run a linked server query and the service crashes. The OS is already updated and I change ...
1
vote
1answer
8 views

MySQL 5.6 upgrade - reducing code changes / developer burden

Does anyone know the key things that should be done when moving to MySQL 5.6 to reduce the amount of code changes required? I found that new installations of it have STRICT_TRANS_TABLES set for ...
2
votes
1answer
34 views

Can't seem to understand why STUFF isn't working

I've got two tables that store questions and possible answers. The questions table can have multiple possible answers to it. I want to display the possible answers it can have per question.. For ...
1
vote
1answer
29 views

Combine multiple query into 1 query

I have a message table that contains words field, array type, with random words of a message. Now I have an array of words [A, B, C]. I need to find the number of messages that the words contains ...
-1
votes
0answers
28 views

MySQL - Combining multiple rows as one in one table [duplicate]

I have one table employeeId | attribute | value 1 name John Doe 1 email john@example.com 1 age 28 2 name Jane Doe 2 ...
0
votes
0answers
10 views

How to interpret Mongo MMS Stats?

The following image contains all of the charts from the Status tab in MMS. How does a noob looking at these charts navigate these waters, so to speak? The mongo box is a standalone installation ...
0
votes
0answers
6 views

Load key/value set into redis

I have a semi-large (around 30 million records) key/value list which I want to load into redis. The data is stored into PostgreSQL (as master data) and we want to distribute this to clients for ...
2
votes
0answers
36 views

SQL Server 2005 Datawarehouse DB - Integrity failure caused by NonClustered indexes

Last year I've been working with a data warehouse database (SQL Server 2005) loaded on a daily basis during the nights. Overall database performance is acceptable. However, there is a "known error" ...
0
votes
1answer
19 views

How connect by is really working? How is it multiplying rows?

I know (on high abstract level) how hierarchies in Oracle works, but this one I do not understand. When issued following query: select rownum-1 as num from dual I've got one row as result. The ...
0
votes
1answer
13 views

MySQL Install on Windows 8.1 hangs at server restart

I have a 64-bit Windows 8.1 machine and would like to install a local database to host some helper application databases. I have attempted this several times with this version of MySQL (5.6.25 GA) but ...

15 30 50 per page