Viewing 15 posts - 2,221 through 2,235 (of 4,081 total)
That's how I interpreted it, Gail. This was my quick-and-dirty solution.
declare @sample table (channel varchar(5), line_of_bus varchar(5), prod_nm varchar(20))
insert into @sample
select 'all', 'C1','last year p&c' union all
select 'all',...
October 14, 2009 at 2:06 pm
Couple of observations:
1. You don't have daily data, yet you say you want to calculate MTD (month-to-date). Did you mean to say YTD (year-to-date)?
2. ...
October 14, 2009 at 1:05 pm
Here's an example of a query to list parameters from the procedure "testProc".
create procedure dbo.testProc
@parm1 int = null
...
October 14, 2009 at 11:50 am
You're welcome, PSB. Could you please take another minute to explain to us why this was "urgent"? That is a word that is being used...
October 14, 2009 at 11:46 am
Both are marked urgent, both don't give the proper table definitions or sample data, one gets the answer within 5mins and the other is made fun of. Any particular reason?
I...
October 14, 2009 at 11:29 am
An opening parenthesis is missing. It should read: OVER (PARTITION BY etc
October 14, 2009 at 9:36 am
I was going to ask if you had a preference about which account name to keep. The one with spaces, or the one without?
October 14, 2009 at 9:33 am
Just a note for the future, consider moving away from using TEXT fields to Varchar(Max) or Nvarchar(Max).
As for the single statemement, consider something like this. (coded freehand and...
October 14, 2009 at 9:26 am
BUT I would suggest that there are probably a lot of people out there like me who trying to do their best in a difficult but rewarding job, working long...
October 14, 2009 at 9:05 am
Chris, I am not bothered at all by basic questions from beginners. The irritation comes from people who post next to no background information and expect us to fill...
October 14, 2009 at 6:58 am
To trap an event before it happens you have to use INSTEAD OF in your trigger. The syntax is readily available in the help on line for...
October 13, 2009 at 7:14 pm
You can also read up on PIVOT/UNPIVOT. 🙂
October 13, 2009 at 7:02 pm
Do you mean something like this?
SELECT
sum(case when invoiceDate = CAST(CONVERT(CHAR(8),GETDATE(),112) AS DECIMAL(8,0)) then 1 else 0 end) as d1
,sum(case when invoiceDate = CAST(CONVERT(CHAR(8),GETDATE()-1,112) AS DECIMAL(8,0)) then 1 else...
October 13, 2009 at 6:59 pm
Viewing 15 posts - 2,221 through 2,235 (of 4,081 total)