3
votes
0answers
43 views

Need help with a Running Total Issue

Using SQL-Server 2008 R2 and Report Builder 3.0 Here is my query without the running total column: SELECT CostManagement_CommitmentDetails.Id ,CostManagement_CommitmentDetails.LineNumber AS ...
-3
votes
0answers
22 views

String commands in HP Vertica [on hold]

I have string such type ""ok_referer":196846998544,"id_referer":"3306043","viral":true} "- i need get id after substring ' "id_referer":" ', in this case i want get 3306043. help me pls)
0
votes
0answers
6 views

ODBC Data Source Administrator: Driver name is an empty string

Below you will see a screen shot of a warning in Windows 7. Why would I get this error when opening up "Data Sources (ODBC)"? How can I resolve it? If you can give me some tips on where to start ...
11
votes
2answers
249 views

Unexpected results with random numbers and join types

I have a simple script that gets four random numbers (1 through 4) and then joins back to get the matching database_id number. When I run the script with a LEFT JOIN, I get four rows back every time ...
0
votes
1answer
20 views

Filtering the results of a SELECT query to avoid certain words in the value of a column?

I have a table called videos with a column named title and there is a set of words (around 50 words as of now but the number of words may increase) which is the knowledge base for filtering the ...
0
votes
0answers
26 views

Recursive query

I am trying to calculate the running difference between 1 row and the row before. To make it a little easier to myself I created a properly grouped representation of the data in a temp table before ...
1
vote
1answer
20 views

2 Date Ranges - How many days from one range excluding weekends overlap

First - Thanks for your help. I'm looking to create a query in SQL that provides the me the # of days from one date range that overlap another date range and excludes weekends. Example Data: ...
0
votes
1answer
24 views

MySQL: Rank by Department in an employees table

I need Mysql query to rank the hours used by each department in an employees table, but it just ranks all without taking into consideration the departments.
3
votes
1answer
73 views

How do I login to SQL Server via group membership in another domain

When attempting to connect to SQL Server (2012), I get a login failed error message. The error log on the server reports: Logon Error: 18456, Severity: 14, State: 5. Logon Login failed ...
0
votes
0answers
7 views

MySQL Cluster Disk Data Tables - worth it?

I'm working on improving the performance of our 4-node MySQL cluster for a webapp with lots of DB writes. We've got a Solr index sitting 'on top' of the SQL in order to give us fast querying, and we ...
1
vote
2answers
27 views

Lost connection to MySQL server during query issue

SELECT UNIX_TIMESTAMP(a.timestamp) AS timestamp, a.adid, a.adtitle, a.cityid, a.price, a.area, a.addesc, a.subcatid, ct.cityname, p.picfile, scat.subcatname, cat.catid, cat.catname FROM xzclf_ads a ...
2
votes
4answers
67 views

Can't finish my ER diagram

I am trying to create a database for a small book library. This is not a professional project, just an exercise of my own. This is my first time to try this ( I am self-taught ) and I am encountering ...
1
vote
1answer
31 views

How to query a list of all the different errors?

I have a DB which is very big and stores a lot of eventlogs, around 15 million rows. When I try this query, it is totally impossible to get some results. Any idea how I could do this? Maybe indexed ...
3
votes
0answers
26 views

Why is the lease locked for a some full sql backups to Azure Blob using Ola Hallengren backup scripts?

I'm using SQL Server 2012 and working on backing up to Azure Blob using Ola Hallengren backup scripts. Some backups are lease locked (ex. model) while others are not (ex. msdb). It's inconsistent, it ...
2
votes
2answers
21 views

Fuzzy Matching with Postgresql 9.3

Right now I am using ts_rank (with ts_vector and ts_query) to search strings for relevance. While this is doing a great job for me so far. I was hoping to work in a bit of fuzzieness into the ...
0
votes
0answers
3 views

pgpool authentication failed when use syslog in log_destination

When I configure in pgpool.conf file: log_destination = 'stderr' pgpool run ok, but when I use this configuration: log_destination = 'syslog' I get this error: pgpool pgpool[21477]: pcp_child: ...
1
vote
3answers
31 views

Study material for Advanced Databases module inc SQL, Relational Model, ERM & TM [on hold]

For my next module in my masters, I am planning on studying Advanced Databases. (Long story short, the masters is designed for people with NON-CS degrees, so I have never studied databases, therefore ...
1
vote
2answers
29 views

Export structure and data without a wizard [duplicate]

Using Sql Server 2008 R2 (but I could possibly upgrade if required). I want to generate scripts for the database structure as well as the data for a schema. The Generate Scripts wizard does what I ...
0
votes
0answers
51 views

Rows are not getting deleted from MySQL Table

We have one innodb table and one Federated table in our environment and while deleting rows from Federated table it shows 24-rows affected with no warning, but rows are not deleted. There is no ...
2
votes
1answer
23 views

Restore backup to different filegroup

Using Sql Server 2008R2. I have a backup of a filegroup. Is it possible to restore this to a different file group (possibly even on a different database)? I have tried RESTORE DATABASE my_database ...
0
votes
0answers
18 views

HTML Form: Insert id into related table [migrated]

I'm relatively new to both PHP and MySQL and here's my first question: I have 3 tables. One as the "main table" and two as basically lists/categories of which I can choose and relate them to my main ...
1
vote
0answers
30 views

Foreign Key constraint remain untrusted and disabled even after ALTER TABLE CHECK CHECK CONSTRAINT command [on hold]

In this database I support, there are more than a few FK constraints set as disabled or untrusted. I'm using this querys to find that out: SELECT 'ALTER TABLE [' + s.name + '].[' + o.name + '] WITH ...
0
votes
1answer
16 views

Query condtion for values not being the default value?

Can I reference a columns default value directly in a query? Something like this: SELECT column FROM table WHERE column <> column.DEFAULT_VALUE Background: I'm writing a application test, and ...
3
votes
1answer
26 views

How to only restore a specific filegroup?

I am using SQL Server 2008R2 (but I can upgrade if necessary) I have a database with multiple schemas and each schema is on a different filegroup (I wish I could just backup/restore a schema but that ...
2
votes
0answers
37 views

ASSIGN value for cmd in sysprocesses? What does it mean?

We're seeing some strange blocking behaviour in a production (SQL Server 2008 R2) system that we're investigating, and it seems to have one consistent and novel element: in the sysprocesses table, the ...
3
votes
2answers
119 views

Can WAITFOR increase CXPACKET waits?

If I have some T-SQL code like this: While @done<1 Begin WAITFOR DELAY '00:00:30'; Set @done=<some select statement> End Is this likely to increase waits for CXPACKET? Presumably the other ...
3
votes
4answers
779 views

Self Join? Or am I wrong?

We have a table that we use to store customers and items. We need to be able to find customers that have bought one item and have not bought another item: customer item Sally 1 Sally ...
0
votes
1answer
30 views

Where does mysql store data?

Where does mysql store data? I found out (by using mysql>SELECT @@datadir ) that it's in var/lib/mysql - but that can't be it. I have a quite big database (4 GB) called 'bot', but all the files in the ...
1
vote
1answer
24 views

Unexpected empty result [on hold]

select a,b from table1 where a not in (select x as a from table2) AND b not in (select y as b from table3) The above query gives an empty result. Why? And how should I construct this combined ...
0
votes
1answer
26 views

How can I solve postgresql problem after deleting wal files?

I turned the archive_mode on on my postgresql configuration for testing a backup server . And since the wal files took lots of disk space, after my test I turned it off and also deleted the wal files. ...
1
vote
3answers
70 views

Separate data from 1 column into multiple columns

Below is sample data and expected results: Table1: salesprice ItemNo Variant SalesCode UnitPrice A 1 SRP 100 A 2 SRP 200 ...
1
vote
0answers
28 views

Log shipping option not showing

I am using SQL Server 2008 R2 Standard Edition. I am trying to implement log shipping, but the log shipping option is not showing in the database properties window. The database recovery option is ...
1
vote
2answers
28 views

Postgres top-k with ties

Assume I have the following DB table with 3 integer fields. A | B | C 1 | 2 | 3 1 | 2 | 4 1 | 3 | 1 2 | 4 | 2 2 | 4 | 3 When I do: SELECT * FROM dbTable ORDER BY A,B LIMIT 1; I get 1 | 2 | 3 ...
0
votes
1answer
33 views

Restore Database with Multiple Restore commands

For automation, I have to dynamically construct the restore commands and thus I have created a script. A .bak file is created on a remote server and I receive it daily. The script builds the restore ...
-3
votes
0answers
27 views

How to handle big table? [on hold]

How to handle big data in Postgres without the partition function? As we all know that Postgres does not support partition very well. There is a big table which has billion rows and total size about ...
-1
votes
0answers
23 views

Find the sid of suppliers who supply every red part [on hold]

Suppliers ( sid: integer, sname: string, address: string, country: string ) Parts ( pid: integer, pname: string, color: string, weight: real ) Catalog ( sid: integer, pid: ...
-2
votes
1answer
30 views

Oracle Concurrent Insertion

We have simple case like Create table t1 (c1 number primary); session1: insert into t1 values (1); //session1 do not commit transaction session2: insert into t1 values (2); Will Session2 ...
0
votes
0answers
6 views

Creating a rule increases load disproportionally

I hope the group can forgive the vagueness of the question: In Postgres-9.3 we created a rule to be executed after an update on a table's values. The rule inserts values to another table. We tested ...
1
vote
0answers
12 views

Any way to mitigate the large server load during LOAD DATA LOCAL INFILE operations?

I'm using MySQL LOAD DATA LOCAL INFILE to load csv files, and have noticed that during these loads, server output speed to other users diminishes eg long page download times, logins timeout. The LOAD ...
0
votes
1answer
16 views

PostgreSQL Give idetifier for transaction?

Is there a way to give a identifier for Postgresql transaction. Ex : begin transaction a; ... If not, will this be supported in future. I'm asking this if transaction has identifiers then true ...
0
votes
0answers
4 views

Incorrect error triggering in attribute with suggest in PostgresSQL

Upon an attribute with the "Case" property value at "Upper", used as description of another one with the property Suggest applied, an error occurs in runtime upon changing fields when the attribute is ...
-1
votes
0answers
5 views

Error when reorganizing the autonumber in Postgresql

When the Autonumber property is changed from False to True and Postgresql is the DBMS to be reorganized, it fails with an error like : 'table does not exist'.How can I solve this?
2
votes
1answer
29 views

1 query using OR operator in where clause vs multiple query equal condition where clause in mysql

case 1: 1 query using OR operator in where clause like select * from users where name='smith' or nick='smith' (using index_merge ) case 2: multiple query equal condition in where clause select * ...
0
votes
2answers
65 views

Trying to return empty rows even if data does not exsist in SQL

I am trying to return the last changed time for a list of users, but i would like to return a row even if the a last changed time does not exist select user_id, last_changed_time = ...
0
votes
1answer
16 views

Replicating tables from LAN database to web server?

I have an in-house database (that's actually part of a third-party product) running on 2008R2 Express. We'd like to display some of the data on a new website we're working on (running 2008R2). I'm ...
-1
votes
1answer
59 views

How to aggregate related rows

I want to group these related rows into trips (where each trip consists of a sequence from point 1->2->3->2->1). route Date time ------------------------------- point1 15/10/2014 ...
0
votes
0answers
10 views

What is the optimal number of worker tasks to specify in MySQL Workbench for a speedy migration?

What is the optimal number of worker tasks to specify in MySQL Workbench for a speedy migration? The default is 2. The MySQL server is running on the same Windows machine, installed with defaults. ...
0
votes
0answers
26 views

Problem installing SQL Server Standard Edition (9.0.1399.06) on Windows 8.1

I need to install SQL Server 2005 Standard on Windows 8.1 for specific software, I have installed SQL Server 2005 Express Edition SP4 (9.0.5000) in the same O.S. without problems and running fine, but ...
0
votes
2answers
16 views

How to check/change MySQL named pipe settings?

I'm having a hard time finding anything on this because I don't know what to call it. But when you install MySQL it asks you if you want to allow connections to the database from other machines or ...
0
votes
1answer
18 views

sqlsrv_connect: use Windows authentication?

I have a PHP server running under IIS on serverIIS1, and a MS SQL database on serverDB4. I created some PHP code that runs on the serverIIS1 server: $serverName = "serverDB4\serverDB4"; ...

15 30 50 per page