Viewing 15 posts - 1,051 through 1,065 (of 3,348 total)
abdellahmoh2016 (1/22/2016)
Hi Thank you for your replyIt's because my boss suggested me simple like that
Tell your boss to stick to defining functionality, and leave the implementation to those who are...
January 23, 2016 at 5:55 am
After taking a quick look, I can tell you that you are right.
The UPDATE FROM used in the trigger will affect all rows that match an inserted/updated row on the...
January 23, 2016 at 5:46 am
crookj (1/22/2016)
Ed Wagner (1/22/2016)
Revenant (1/22/2016)
djj (1/22/2016)
J Livingston SQL (1/22/2016)
PeaceWorld
Earth
Saturn
Rings
Doom
January 22, 2016 at 12:28 pm
The behaviour is as expected.
SQL Server will always first compile an entire batch, then execute it. During compilation, various things are checked against the schema. But modifications made by early...
January 22, 2016 at 12:19 pm
SQL Guy 1 (1/22/2016)
Hugo Kornelis (1/21/2016)
January 22, 2016 at 12:08 pm
boettger.andreas (1/22/2016)
SELECT TransDate / 100, SUM(Quantity)
FROM IciVal
GROUP BY TransDate;
You may still need a WHERE clause to restrict it to the correct year.
Does this devide TransDate by 100? Not sure why?
From...
January 22, 2016 at 12:03 pm
I quickly scanned the posted code. The problem is that the layout is like this:
WHILE (condition)
BEGIN;
BEGIN TRY
-- Do something that might fail
-- Find next row to process
END TRY
BEGIN CATCH
-- Handle...
January 22, 2016 at 11:58 am
Your problem stems from the fact that the SQL Server Query Optimizer can rearrange conditions as it sees fit. With the equality constraint it apparently picks an execution plan where...
January 22, 2016 at 11:47 am
Here's a quick attempt:
PS: For a tested solution, please post CREATE TABLE statements, plus INSERT statements with sample data, plus expected results.
WITH HelperCTE AS
(SELECT *, SUM(CASE WHEN Identifier = 'SET'...
January 22, 2016 at 6:55 am
MadAdmin (1/22/2016)
Just throwing in my 2 penceInstead of the non sargable
WHERE LEFT(TRANSDATE,6) = @CutOffDate
use the sargable
SELECT SUM(QUANTITY) AS TotalQty, @CutOffDate
FROM ICIVAL
WHERE TRANSDATE like @CutOffDate+'%'
Since TransDate...
January 22, 2016 at 6:07 am
boettger.andreas (1/22/2016)
For this I need to sum up all transactions up to the month I'm looking at.
The function would...
January 22, 2016 at 6:06 am
In the report designer, select the cell you want to color code. Go to the properties, find the color (either foreground or background, whichever one you want), and replace the...
January 22, 2016 at 5:46 am
Please post CREATE TABLE statement for the table and INSERT statements with your sample data, plus expected results for that sample data.
Also, why exactly do you need this? This kind...
January 22, 2016 at 5:06 am
Since this appears to be a homework assignment, I am not going to spoon-feed you the answer.
But I will help of course. Your query contains an aggregation (the AVG function)...
January 22, 2016 at 3:25 am
If the date column is indexed, then you will probably get better performance if you select the month as "WHERE Date >= 20160100 AND Date < 20160201"
Also, instead of having...
January 22, 2016 at 3:22 am
Viewing 15 posts - 1,051 through 1,065 (of 3,348 total)