-1
votes
0answers
12 views

Can I add dummy rows to a crosstab query in Access? [on hold]

Is it possible to add dummy row headings to a crosstab query in MS Access when the data doesn't exist in the source table/query? I'd like to indicate that I'm aware that a category exists, even though ...
0
votes
0answers
7 views

When is it safe to disable InnoDB doublewrite buffering?

MySQL InnoDB allows us to disable doublewrite buffering by setting innodb_doublewrite = 0. Other databases doesn't seem to allow this setting to be tweaked. How could InnoDB still be able to maintain ...
1
vote
1answer
17 views

New to databases - does my ERD reflect good database design?

I'm making a database to hold data for a media player that I'm working on. Originally, I thought to use one table with the fields: {filePath,artist,title,album,track_number,length,date,artworkUrl} ...
0
votes
0answers
7 views

What are the Change data capture solution

What are the change data capture available solution that are free and or open source. I found databus and flexview, is there anything else out there that would be near free ? Many thanks, M
2
votes
0answers
25 views

Exclude a User From an Audit

I need to set up a SQL Server audit to capture all database activity for all logins except one - the login our application runs under. In this case the login I want to exclude is CPSDOM\cpointedb. In ...
0
votes
0answers
5 views

Efficient settings for linked server to SSAS database

We are using OPENQUERY scripts to run MDX from sql-server. We're experiencing efficiency issues when we first run these queries each morning. The linked server objects which link to our SSAS ...
0
votes
0answers
27 views

Oracle - Slow queries without prepending schema name or providing hint

I am logged in as the schema owner in Oracle 11gR2 on Linux. I have 55 million rows in table. select max(col) from table; - takes 300 seconds (index full scan) select max(col) from schema.table; - ...
0
votes
0answers
18 views

Can we migrate oracle database 10gR2 to cross platform

I want to know can we migrate Linux based oracle database 10gR2 (10.2.0.1.0) to windows server 2003 with oracle database 10gR2 (10.2.0.3.0). I have seen the documentation related to database migration ...
-2
votes
1answer
14 views

Query required to get data from same column

I trying get data from table having customer colums and details column details columns having several values like, Pen,Pencil, notepad,Pins etc. I want to query customer having pen and pencil. Pls ...
0
votes
0answers
8 views

PostgreSQL query slow when using tsvector and ORDER BY despite having index

Running on a large database (around 1.5G) The following query takes about 70 seconds to run, SELECT x FROM DBText x WHERE x.status = 2 AND x.publishedTime < 4574590406397 AND x.service = ...
2
votes
1answer
18 views

Monitoring the Postgres query parser

As I understand it, when you send a query to Postgres like: SELECT id FROM table1 WHERE name = $1; Postgres will create a query plan. The plan will be cached for the same query in the same ...
0
votes
0answers
14 views

Oracle SQL Statement alter index and add partition

I have an index in which I have to remove one column and reindex back for rebuild: ALTER INDEX <index_name> REBUILD; Is it possible to add partition when I rebuild an index. Partition will ...
0
votes
0answers
11 views

Get columns from NEW when execute update on postgresql

I need know if determide fields are into result of update execution, e.g. IF NEW.niveope is null THEN _new_nivope := 0; ELSE _new_nivope := NEW.nivope; END IF; When I execute: EXPLAIN ...
3
votes
1answer
55 views

How to identify unused databases on my sql server

I am looking for the best practices or analysis someone would have followed to identify the unused or inactive databases on my SQL Server. I went through many articles, which say possibly to go for ...
4
votes
2answers
311 views

Why do we use Group by 1 and Group by 1,2,3 in SQL query?

In SQL queries, we do use Group by clause to apply aggregate functions. But what is the purpose behind using numeric value instead of column name with Group by clause? For example: Group by 1.
0
votes
0answers
9 views

Design for periodic data cuts

I've been building an application that has a 6-monthly update schedule, i.e. a cut of the data for H1 & H2 of each year. The previous version of this application implemented this by making a copy ...
0
votes
0answers
33 views

How to dynamically alias subquery column [on hold]

I found this How can I dynamically alias columns to be very useful however is there anyway around columns created from subquery Such as SELECT COL1 AS "Column1" (SELECT TOP 1 (COL2) FROM ...
0
votes
0answers
15 views

Advice on MYSQL DELETE on CASCADE, UPDATE on CASCADE features

I have 2 tables called copyrigihtinfo and sourceinfo and many to many to relationship table cp_src_junction with following data. copyrightinfo table cp_pk cp_info 1 copyright (c) 1991-2000, ...
0
votes
2answers
12 views

How can I make MySQL client read password from mylogin.cnf?

I'm trying to make the mysql client connect to a mysql server without requiring the password to be given interactively. Steps taken: 1) First create a mylogin.cnf file $ mysql_config_editor set ...
0
votes
1answer
15 views

Automating SQL Server Merge Replication Processes

Hi all is there anyway I can automate the entire process of the Merge Replication?
0
votes
0answers
18 views

BLOB storage relocation

Hi all is there any considerations for relocating a BLOB storage to free up some space on SQL server 2012 R2? Also what are the processes that should be followed?
0
votes
0answers
13 views

What are the considerations for relocating BLOB storage

I'm just wondering if there are any considerations for relocating a BLOB storage to free up some space in SQL Server 2008 R2
0
votes
0answers
17 views

Stored Procedure Issue in Simple Select Statement

Here is my Fiddle Here is My Table : CREATE TABLE IF NOT EXISTS `vehicle` ( `AutoID` int(11) NOT NULL AUTO_INCREMENT, `VehicleCode` varchar(20) NOT NULL, `NumberSeats` int(3) NOT NULL, ...
0
votes
0answers
8 views

Shrinking old partitions

I have a large partitioned time series table where each partition is stored in it's own file. Since it's time series based partitioning divided by week and I'm only storing data that is new I have ...
0
votes
0answers
10 views

Does MariaDB Support Materialized views?

Before i even try to experiment with MariaDB, could anyone tell me if MariaDB support Materialized views? i can't seem to find it in their documentation. This is one of my major issues with Mysql ...
-3
votes
0answers
35 views

sql query self outer join [on hold]

I have one table name lease there is field lsid,month,amount the lsid is every month same suppose like this lsid lsmonth amount 1 30-nov-2014 50 1 31-oct-2014 100 2 ...
0
votes
1answer
26 views

How to delete row from table later than date?

I have a simple table: MyTable: -Id int primary key -Name varchar(MAX) -Deleted bit Now i want delete rows created later that 15.12.2014. But how can you see i don't have a any date columns in my ...
0
votes
1answer
13 views

Dynamic Condition Creation function

I have a function which needs to create a dynamic where clause by reading the columns from the temporary table . CREATE FUNCTION [dbo].[GetWhereClause] ( @TempTableName nvarchar(600) ) RETURNS ...
0
votes
1answer
16 views

Can we protect data form Database Administrator by encrypting the data?

How can we protect data on my database which is MySQL form database administrator stealing it? Will encrypting it prevent it from being stolen? If yes, how as he already has access to the database ...
2
votes
1answer
55 views

A table with 50 columns

I have a table with 50 column and one of my friend has told me to split the table in 4 different table to save 12 column in each table. He proposed a design to have Master table and refer the PK of ...
0
votes
0answers
8 views

What Is the Next Best Ingredient to Add?

I am building a program that allows users to optimize their grocery shopping so they can make the most recipes using the fewest ingredients. One of the features of this program is a function I’m ...
0
votes
0answers
16 views

Large text column slows down whole table

I have a mysql database table table1 with a dozen columns in it. One column is a mediumtext column with lots of data in it and all the other columns are small (ints, timestamps, etc.). The presence ...
0
votes
0answers
24 views

Restored database is missing user

I have a SharePoint content database that has been restored into our test environment. I am getting errors in the SQL log indicating our SharePoint service account is not able to access the database. ...
0
votes
0answers
9 views

In Forward Engineering I have an error called 'table does not exist'

This is my forward engineering code. -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, ...
0
votes
0answers
17 views

My database engine cannot see one of the drives

I installed SQL Server 2012 on a VM that has two harddrives, C and E. I can log into the Database Engine, but when I attempt to attach a database that is on E, Drive E is not available. Only Drive C ...
0
votes
0answers
22 views

Query plan reads vs statistics io reads

I have a very strange problem. When I run a query with SET STATISTICS IO ON, it shows that I had a total of 183 reads. But when I look at the query plan dmv it shows I did 555,132 reads. I cleared the ...
0
votes
1answer
15 views

Enumerate Oracle tables in PLSQL

How do you run a query to list all tables, or all tables where tableName like '%abc%'. Just poking around, I tried the following with no success: select * from SYS.TAB$ select * from SYS.OBJ$ ...
0
votes
2answers
24 views

when to put a business rule in the business application layer or into a database constraint

I need you wisdom, I am debating with another person when is it recommended to put the code of a business rule into a database constraints or inside of the application business layer? There is a ...
0
votes
1answer
10 views

odbc connection from windows machine to mysql server running on ubuntu?

I was able to install mysql server on an ubuntu machine and set up a test data base, created a user and granted that user access to the database. I also changed the binding address to the IP of the ...
0
votes
1answer
7 views

DBEAVER: SQL error or missing database (near “,”: syntax error)

I'm using DBeaver (because Base only works on OS X) to work with an SQLite database. When I attempt to execute the following query, I get the error message 'SQL error or missing database (near ",": ...
0
votes
1answer
11 views

storing query results in a variable in mysql and using it in another query

I have a following query which runs perfectly fine: SELECT count(*) as total,l.state as state FROM db1.table1 cd inner join db2.table2 l ON ...
-1
votes
0answers
13 views

Cannot open ssh tunne on MySQL [on hold]

I got this error on this configuration Any Clue? Please Help!
0
votes
1answer
18 views

I cannot do anything on replSet when auth is enabled

I have a mongodb cluster with one replSet, 3 config servers, and 2 mongos instances. I logged into mongos using (admin, pwd). admin is given ["userAdminAnyDatabase", "dbAdminAnyDatabase", ...
0
votes
1answer
20 views

How can I create a bool column for a view based on the result of a statement?

I'm using PostgreSQL as my database. CREATE TABLE groups ( id SERIAL NOT NULL, name TEXT NOT NULL, PRIMARY KEY (id), UNIQUE (name) ); CREATE TABLE users ( id ...
0
votes
1answer
9 views

Amazon Redshift “cache lookup failed for aggregate” error when using median aggregate

I recently ran into this error message and am posting an answer here so that the solution is easily searchable in the future. Problem: The following query returns an error message when run on Amazon ...
-1
votes
0answers
16 views

no such column name

I am doing this query: SELECT univ._id, univ.firstName, univ.lastName, univ.status, univ.veikla, univ.cellPhone, univ.homePhone FROM universitetas univ in order ...
0
votes
0answers
5 views

Can MySQL Index Merge an Composite index with a single column index?

I am tuning a query and currently have an index as following : Index 1 : (col1, col2) An example query would be : SELECT * FROM t1 WHERE col1 = '1' AND col3 = '2'; I have created an index on ...
2
votes
1answer
28 views

Get products of category plus all child categories till leaf nodes

We have a hierarchy which looks this: Now the problem is that most products are only connected with 1 category, which is most of the time the lowest level. I am trying to get ALL products below a ...
0
votes
1answer
12 views

Update Trigger in MYSQL

Here is my requirement :- I have a table called "users" and field called "Admin". Field "id" is primary key. Wants to update "Admin" field to "1" if id=1000; Tried this ,but not working.I tried ...
4
votes
3answers
431 views

Is it advisable to use a temp table when the stored procedure could be run simultaneously by different users?

I am working on a stored procedure that retrieves the objectGUID from active directory. I am storing the result in a temp table and then returning the value in an output parameter for use with other ...

15 30 50 per page