Viewing 15 posts - 4,021 through 4,035 (of 4,087 total)
Ravi (8/17/2009)
I have attached the sample data and expected outputlet me try to explain what i need
It's only slightly better. You still haven't provided it in the...
August 17, 2009 at 8:29 pm
The purpose of BI is to give you the BIG PICTURE about your business. If you're looking at individual customers out of ~ 3 million customers, you're down in...
August 17, 2009 at 3:33 pm
Jon Beer (8/17/2009)
(CompanyA avg_customer_revenue * CompanyA total_customers) + (CompanyB avg_customer_revenue * CompanyB total_customers)
+ (CompanyC avg_customer_revenue * CompanyC total_customers)
/ (CompanyB total_customers + CompanyC total_customers)
In the denominator we...
August 17, 2009 at 11:59 am
I think that you're trying to make this more complicated than it needs to be. I was able to match your output with a simple ORDER BY clause.
SELECT Parent_ID,...
August 16, 2009 at 12:41 pm
netguykb (8/15/2009)
I think its because FOR XML PATH is a 2005 thing I only have 2000[...]
Thanks again I appreciate both your efforts, and he definitely pays to post with etiquette
Well,...
August 15, 2009 at 1:44 pm
I think this code is much simpler.
ALTER procedure Emp_name_proc
(
@emp_id varchar(100)
)
as
begin
declare @sql varchar(100)
select @sql = 'SELECT EmpName FROM Test WHERE EmpID IN (' + @emp_id + ')'
Exec( @sql )
end
No need for...
August 14, 2009 at 3:40 pm
Grant Fritchey (8/13/2009)
Or, since you only care about when records do exist, check for NOT NULL values on the outer table. You'll still arrive at the same place.
No, the OP...
August 13, 2009 at 2:35 pm
If you are using joins to check, an inner join will only work where a record exists. If you want to check for non-existence, you will have to use...
August 13, 2009 at 1:08 pm
Ryan Keast (8/13/2009)
I expect this as I am linking to the dbo.DW_SERVICEORDERSJOBS_F table and that invoice...
August 13, 2009 at 9:10 am
Julie Zeien (8/12/2009)
August 12, 2009 at 2:14 pm
Here is another option using Row_Number() instead of the Identity Column. This means that you don't need the DDL language to create the temp table.
Declare @TagNameIDBase int
SELECT @TagNameID=isnull(MAX(TagNameID),0) from...
August 12, 2009 at 9:59 am
Lowell (8/12/2009)
i had to find...
August 12, 2009 at 9:23 am
Julie Zeien (8/12/2009)
I don't have much experience using PIVOT, but I think Drew's solution will only work if each scout only has two parents.
My solution will work for stepparents as...
August 12, 2009 at 9:11 am
That's much better. Try the following code:
SELECT SCT_NAME, [1] + IsNull(', ' + [2], '') AS Parents
FROM (
SELECT
...
August 11, 2009 at 9:24 pm
alef (8/11/2009)
I've tried the solution of SSCrazy Eights and this solution is perfect.Is there an explanation why your solution is working and mine not?
I think that this line from BOL...
August 11, 2009 at 9:04 pm
Viewing 15 posts - 4,021 through 4,035 (of 4,087 total)