Is a SQL View the fastest way to manage multiple count fields, or does SQL...
I need to do lots of filtered counts, similar to the counting done on Ebay or Amazon. eg. Cars(34500), Car Colors - Blue(3000), Red(2000), Silver(5000) ..... etc.I have my standard count query:select...
View ArticleHow to automate reports and send them to customers?
I have been looking for solution to automate the reports. I have many customers and many reports.each customer has their own will to receive individual report on specific day to their given/subscribed...
View ArticleGenerating Auto Relationship
Hi Team,I would like to create a auto relationship between tables.Currently i am using Northwind DB with tables (Orders, OrderDetails, Customers)Orders ( OrderId,...
View ArticleSql Trigger Question on existing table - will an insert trigger populate the...
Can you create a SQL Trigger on an existing table to populate count values, or do you have to create an empty table, then create an Insert trigger, then import the data into the new table with the new...
View ArticleLink more than one item for one selling operation ...
Hello, I have database which that store the sold products in Orders Table and another table called Transaction to set the time and the total price for the individual order ,my question is: How to...
View ArticleSince Triggers are a contentious subject, can someone please tell me if mine...
/****** Object: Table [dbo].[TriggerCB] Script Date: 5/12/2014 9:20:12 PM ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[TriggerCB]( [IDa] [int]...
View ArticleDoes running multiple SQL queries in the same SP cause latency ?
I have the following:(a) One Dynamic SQL Query that takes 37 ms when run as a single query or in an SP.(b) Three SQL Indexed View queries that take 0 ms when run together. When i add (a) + (b) in the...
View ArticleClustered Column Store Indexes vs. Nonclustered Column Store Indexes
I apologize if this has been talked about previously, but my question should be a relatively simple one to answer for those who know a little more about them than I do. With the introduction of...
View ArticleCursors
Cursors are bad in SQL Server and should be avoided unless there's absolutely no other way to achieve a task.However, cursors are fine or even good in other databases and platforms.Does anyone have a...
View ArticleHelp in displaying parent and child objects
Hi, I would appreciate any help in displaying a list of parent and child objects in a certain way, to give you an idea of what I'm looking to do here's the code to create and populate an example...
View ArticleDoes anyone have efficient SQL paging code?
I have the code below, but it seems to be a little slower than i would like, even though the SQL DETA did not find anything wrong with it. ThanksSELECT id, title, companyname,...
View Articlequestion about conut in sql
hello,i have one question thanks for answering[code="plain"]select conut(*) as typefrom tblnamewhere group=aunion allselect conut(*) as typefrom tblnamewhere group=bResult1520but i want Result diplay...
View Articlexp_cmdshell in stored procedure not the same result as cmd prompt
I have a stored procedure that uses xp_cmdshell to execute an executable. I made code changes to the executable and compiled a new build. The stored procedure that uses xp_cmdshell to execute is not...
View ArticleBest way to build a partitioned clustered columnstore
I am building three partitioned, clustered column store tables.I was researching whether it was faster to populate a staging table and swap it into the partitioned table or to directly insert into the...
View ArticleOLAP SSAS
Hello,I am new with OLAPI have almost followed all steps to create cube in BI.But when i click on process button i got the following error.The project could not be deployed to the 'localhost' server...
View Articlehaw to join two qry
i have to qry any qry have one filedqry1 qry2name count----- -------a 20b 10c 15haw to join or any try away displayqry3Resulta | 20b | 10c | 15
View ArticleWhat is the fastest way to manage date filtering within a query?
I have a dynamic SQL query that uses various indexes and views.When a user wants to filter records based on last one day, last one week, last 30 days ...etc.. i use the following code:@date is an...
View Articlestored procedure that inserts and updates a table with excel data
Hello,I need a script that inserts the data of an excel sheet into a table. If something already exists it should leave it, unless it's edited in the excel sheetand so on and so on. This proces has to...
View ArticleOLAP Cubes for item counts?
A few days ago i asked how Ebay.com or Amazon.com or Indeed.com created the item counts, typically on the left side of the web page. My theory was SQL Indexed Views or SQL Triggers or SQL Functions or...
View ArticleCan I use Output Into for this idea?
I want to insert many rows at a time into two tables - I have a ValidationMessage Table with the ValidationMessageID and the message, and then an OrderValidationMessages table with the OrderID and the...
View Article