Viewing 15 posts - 1,006 through 1,020 (of 14,953 total)
Are they consistently at the same time of day, or days of the week, or any sort of temporal pattern like that?
August 13, 2012 at 11:44 am
sradez_DBA (8/13/2012)
As i said the project is interesting.What makes it interesting is if you have 9 different companies who want to share there products...
August 13, 2012 at 11:40 am
Are you familiar with Common Table Expressions (CTEs) and the ranking functions (Row_Number() to be specific)?
Here's a generic sample for pivoting a fixed number of columns:
with CTE as
(select *,
Row_Number() over...
August 13, 2012 at 11:34 am
CTEs don't start with a semicolon. No need for one before a WITH (responding to Joe's comment). The problem isn't a semicolon before WITH, the problem is that...
August 13, 2012 at 11:27 am
Alternatively, if you really need to use Replace instead of Stuff for this, try using Substring to get the piece that you want to replace. Build the Substring parameters...
August 13, 2012 at 10:43 am
I could be wrong, but I'm pretty sure Replace() won't take regex or other patterns. I'm pretty sure it only deals with strings or string-type variables with pre-defined values.
However,...
August 13, 2012 at 10:39 am
Will it always be two columns (0 & 1), or will it be variable?
If variable, search online for "t-sql dynamic cross-tab" or "t-sql dynamic pivot". You'll find good articles,...
August 13, 2012 at 10:29 am
Matt Miller (#4) (8/13/2012)
Jeff Moden (8/11/2012)
L' Eomot Inversé (8/11/2012)
August 13, 2012 at 9:33 am
Sounds like a serious step backwards in data management technology.
Don't call the database for each row of data. Use a script object to write each row to a file.
You...
August 13, 2012 at 9:32 am
My first instinct is four tables:
Survey-takers table, with name, address, etc. Might want to normalize further and name addresses in a sub-table, depending on the business rules needed.
Questions table,...
August 13, 2012 at 8:55 am
Data on loopback address here: http://www.bing.com/search?q=Loop+back+address&src=ie9tr
The Webopaedia and Wikipedia links are very informative on the subject.
August 13, 2012 at 8:48 am
Are you talking about the default trace, or a custom trace?
August 13, 2012 at 8:44 am
I think a For Each loop is what you'll need. Can't think of any other way to do it.
Might want to split them up into smaller chunks in multiple...
August 13, 2012 at 8:42 am
I just noticed, I kept calling it the "root node", which isn't fully accurate. It's actually the row-level node. The root node would be for the whole dataset.
August 13, 2012 at 8:40 am
The name of the root node goes there.
Try this:
SELECT *
FROM (VALUES (1),(2)) AS V(Col)
FOR XML PATH('RootNote'), TYPE;
Result:
<RootNode>
<Col>1</Col>
</RootNode>
<RootNode>
<Col>2</Col>
</RootNode>
Change the string, change the name of the node.
A null-string (empty string, zero-length string)...
August 13, 2012 at 8:37 am
Viewing 15 posts - 1,006 through 1,020 (of 14,953 total)