@gmmastros -- Nice thought, but none of the records are empty.
@markros -- Thanks for the tip. Based on your first link I'll switch to the for xml path. Works faster too, as you said.
SELECT soldtocustomer, stuff((select ',' + Name
from valignmentmaster a1
where a1.soldtocustomer =...
I've written a function to coalesce mutliple rows into one:
ALTER FUNCTION [dbo].[CombineRepNames]
(
@CustomerNumber varchar(50)
)
RETURNS varchar(1000)
AS
BEGIN
DECLARE @VAR varchar(1000)
set @VAR = ''
SELECT @VAR = coalesce(@VAR + ' , ','') + name
FROM valignmentmaster
WHERE...
Oh I see. When I press control G it opens up the visual basic editor. I assumed that's where your code went. I didn't notice that it has an IMMEDIATE box in the bottom where I am supposed to put your code.
It works, thank you sir!
I have a query that uses a sub query in the select statement. Example:
Select * from
(select * from tablea union select * from tableb)
I know that access will randomly remove your parenthesis in these examples and turn them into brackets. This has apparently happened to me and now I can't...
I have some data that looks like:
Date GroupA GroupB Units
10/8/2009 ABC AAA 100
10/8/2009 DEF BBB 150
10/8/2009 GHI CCC 90
10/9/2009 ABC AAA 105
10/9/2009 DEF BBB 155
10/9/2009 GHI CCC 95
I want to create a running total by group and by date. So the data would look like this:
Date GroupA...
SantaMufasa,
Thank you for the response. It helps me out, but I should have been more clear about my data.
I need to look at a data set that has many cities.
Essentially I want to return something like this:
City dstnct_rgn_codes max_rgn_code max_rgn_code_count
houston 2...
I have some data that looks like this:
region_code city zip
AAA Houston 77076
AAA Houston 77024
AAB Houston 77024
The region_code is entered manually by a multitude of different people. It should always be the same thing for each city, but some times it gets messed up.
I am...
I have some data that looks like this:
region_code city zip
AAA Houston 77076
AAA Houston 77024
AAB Houston 77024
The region_code is entered manually by a multitude of different people. It should always be the same thing for each city, but some times it gets messed up.
I am...
That's the first thing I tried. Sorry I probably should have mentioned that.
I get a "cannont insert the value NULL into column ''; column does not allow nulls. INSERT fails.
The statement has been terminated."
I can't set the sp_changedbowner to SA either without the proper rights.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.