Viewing 15 posts - 4,546 through 4,560 (of 5,504 total)
WayneS (1/11/2010)
Well, the concept comes from Jeff. 'nuf said. 😉
Well, the CrossTab solution I used is based on one of Jeff's articles as well...
Let's see, which one is going to...
January 11, 2010 at 2:52 pm
Is there any predefined order the data have to show up in the columns?
Based on your sample data it looks like the following would help (as a second step to...
January 11, 2010 at 2:38 pm
Untested, since there are no data provided to test against:
;with cte as
(
select UserID
from table
group by UserID
having count(*) >1
)
select table.* from table inner join cte on cte.UserID = table.UserID
January 11, 2010 at 7:22 am
You might think about using a calendar table.
Search this site for details.
An example can be found for instance here .
You could also have a look at the link in...
January 10, 2010 at 10:52 am
Just for the record of it:
the solution shahid posted has been provided by ramireddy at social.msdn .
January 10, 2010 at 6:34 am
Would you mind sharing some more details regarding the file structure and if those files are located in the same folder or have a "patterned" file name?
Also, would you share...
January 10, 2010 at 6:29 am
Something along those lines?
Note: The CASE statement is used to set a "flag" depending on the mode and then simply adding the "Flags"...
SELECT T1.ItemName, COUNT(T1.ItemName) AS TOTAL,
sum(case WHEN Mode='AAA' THEN...
January 10, 2010 at 6:23 am
Does "a column" means ONE column including the comma separated list?
If you need the data in a table with each value in its own column then please have a look...
January 7, 2010 at 3:19 pm
Do you need the output o be one column each or a list of comma separated values?
January 7, 2010 at 3:13 pm
This will take several steps:
Step 1: convert the string into a table
Step 2: separate the value of the first item
Step 3: Build a cross tab (see the related link in...
January 7, 2010 at 3:08 pm
To get the columns and the corresponding values you could use the following code (using XQuery and your sample data):
DECLARE @in_values xml
SET @in_values = '<root><column_name><node_a>value1</node_a><node_b>value2</node_b></column_name></root>'
SELECT DISTINCT
T.n.value('localname[1]', 'varchar(100)')...
January 7, 2010 at 12:19 pm
To even confuse a little more, 010409 might be as well interpreted as April 9th 2001...
I probably would even include the format in the string and truncate it where needed...
January 7, 2010 at 11:59 am
TcW_1978 (1/7/2010)
Is there a way I...
January 7, 2010 at 10:49 am
What xml element/attribute describes the column name?
Your examle is only using data from a column. There is nothing indicating any relationship between node_a and localname, meaning: How do you know...
January 7, 2010 at 10:28 am
It's hard to tell without sample data.
Please provide table def, sample data to play with and expected results as described in the first link in my signature.
January 7, 2010 at 10:22 am
Viewing 15 posts - 4,546 through 4,560 (of 5,504 total)