Tagged Questions
2
votes
2answers
85 views
Joining 4 tables and 2 counts
I have four tables.
UserMaster
----------
UserKey - PK
UserName
UserID - UNIQUE
UserLogTransaction
------------------
UserID - FK:UserMaster.UserID
LoginTime
LogoutTime
CallCenter
----------
...
6
votes
3answers
605 views
SQL Server 2008 mirrored Database with manual failover, need reporting database
Our current setup is a principal database used in production with a manual failover mirrored database for HA.
I need to setup a reporting database as well. What would be the best approach? Shall I ...
2
votes
1answer
108 views
Is there a name for a query that returns results which have sub headings?
I inhered a set of queries / macros from the previous employee in my position and one of the other people here showed me a query result (output from when the query worked correctly) which had ...
2
votes
2answers
1k views
Selecting two values from the same table but under different conditions
I want to grab a value from a table into two different columns for different values from the same table. Use this query as an example (notice how the select is on the same table aliased as 2 different ...
5
votes
2answers
199 views
Solutions for reporting off of an EAV structured database?
Existing setup SQL Server 2005 with standard EAV table that users want to slice and dice with a BI tool (Cognos).
Is there any hope that we can transform this data into a format that we can report ...
5
votes
2answers
119 views
querying a table of events for reporting
The background (masking a real-world problem behind a word problem)
Farmer Brown has a peach orchard in California and ships hundreds of
thousands of peaches all across the country. When a shipment ...
4
votes
2answers
224 views
Splitting a column in two and returning a summary of results
Lets take a very simple table
Department | Staff Name
---------------------|---------------
Web - Electronics | Matthew
Store - Electronics | Mark
Web - Home | Luke
Store - ...
