Viewing 15 posts - 8,101 through 8,115 (of 8,731 total)
What happens when the positive amount won't equal the negative amount?
Do you want a balance or just to eliminate certain amounts that won't change the calculation?
June 4, 2013 at 5:46 pm
Maybe you traveled to an alternate reality. :hehe:
I'm glad that it's solved now (even if I didn't help). Maybe it was an issue on SSMS.
June 4, 2013 at 4:42 pm
Just for the fun of giving more options, eventhough they might not be better than the ones previously posted.
SELECT cStudentID,
iSchoolYearCode,
CASE WHEN ROW_NUMBER() OVER( PARTITION BY cGradeCode ORDER BY...
June 4, 2013 at 3:08 pm
I believe your results are being returned to text and not to grid.
To avoid that problem you could use nested REPLACE on the columns that are giving you problems.
June 4, 2013 at 2:48 pm
Which upgrade are you talking about? :blink:
June 3, 2013 at 3:26 pm
That sounds like a work for the fantastic CSV Splitter.
Read the following article: http://www.sqlservercentral.com/articles/Tally+Table/72993/
June 3, 2013 at 3:13 pm
If you're not doing any T-Log backups and you're not planning on doing them, then you should change to Simple Recovery Model. Otherwise it would be like driving a Camaro...
June 3, 2013 at 2:40 pm
You could use the SQL Server Configuration Manager
June 3, 2013 at 11:58 am
Completely untested due to the lack of sample data, but it can give you an idea.
DECLARE @test-2TABLE(
TrnDatedate,
TrnYearint,
TrnMonthint,
StockCodeint,
InvoiceQty int);
DECLARE @Date date;
WITH CTE AS(
SELECT DISTINCT
TrnYear,
TrnMonth,
ROW_NUMBER() OVER( ORDER BY...
June 3, 2013 at 11:35 am
That's because you're looking for rows in tbl_warranties before they exist. That's why Lowell suggested to use the inserted table to search for the ID.
June 3, 2013 at 8:15 am
NineIron (6/3/2013)
I got it now. I needed to exclude WeekOfMonthNumber and ArrivedVisits out of the group by.
You're right, I didn't notice you had all the columns in your group by...
June 3, 2013 at 8:05 am
Would it be something like this?
CREATE TABLE #TEST
(
COL1 VARCHAR(10),
COL2 VARCHAR(20)
)
INSERT INTO #TEST (COL1, COL2) VALUES ('Bed+Vat', 'Vat')
INSERT INTO #TEST (COL1, COL2) VALUES ('Bed+Vat', 'Cess')
INSERT INTO #TEST (COL1, COL2) VALUES ('Bed+Vat',...
June 3, 2013 at 7:57 am
Just add a MAX to your columns.
SELECT provider, month_name,
MAX(case when WeekNumberOfMonth='1' then ArrivedVisits else 0 end) as 'Week1',
MAX(case when WeekNumberOfMonth='2' then ArrivedVisits else 0 end) as 'Week2',
MAX(case when WeekNumberOfMonth='3' then...
June 3, 2013 at 7:32 am
This seems like a simplified catch-all queries
http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/
May 31, 2013 at 3:34 pm
Not really the right forum to ask, but there's a format option for zip codes in the special category. Otherwise, you can use the personalized format and enter five zeros...
May 31, 2013 at 3:04 pm
Viewing 15 posts - 8,101 through 8,115 (of 8,731 total)