Viewing 15 posts - 4,006 through 4,020 (of 5,504 total)
Please see my answer posted on your parallel thread.
...
March 12, 2010 at 11:15 am
Once you captured the id values from the first insert you need to join it to the secon xml statement. Something like the following:
;WITH cte AS
(
SELECT
a.b.value('routeh[1]','smallint') troutehidx,
...
March 12, 2010 at 10:27 am
Assuming the string pattern at the end of the string needs to be identical to a pattern in the first half of the string, the sample code might work:
DECLARE @col...
March 12, 2010 at 10:09 am
Why would you use a cursor in the first place?
Build a dynamic SQL string and run your update all in one. Something like the following (untested)
DECLARE @sql VARCHAR(1000)
SET @sql=
'INSERT INTO...
March 12, 2010 at 5:52 am
Another option would be using a computed column.
However, since this cannot be used as persisted column (getdate() is non-deterministic) and cannot be indexed either, the column will be recalculated every...
March 11, 2010 at 11:15 am
unfortunately, neither your sample data nor any description did point to that... :ermm:
You might want to look into using the OUTPUT in your first insert statement to capture the id...
March 11, 2010 at 5:10 am
Please provide table def, some sample and expected result as described in the first link in my signature. It would help us help you.
The task itself sounds like a pretty...
March 10, 2010 at 3:33 pm
My first advice is to get rid of the custom data type.
It won't add any value to your code or database structure. Instead it will cause pain to maintain it....
March 10, 2010 at 12:52 pm
It would be a lot easier if you'd consider storing the separate logical information in separate columns. There are many scenarios to be covered to make a string parsing like...
March 10, 2010 at 12:38 pm
Well, then you'd just have to create your own serialized number using ROW_NUMBER.
Based on Lynns sample data it would look like
;WITH cte AS
(
SELECT
ROW_NUMBER() OVER(ORDER BY StartTime) AS ROW,
...
March 10, 2010 at 11:53 am
The following sample will add 15 hours to the day before today ( GETDATE()-1 ), normalized to the beginning of the day using a common dateadd/datediff routine.
DECLARE @yesterday DATETIME
SET @yesterday...
March 10, 2010 at 11:46 am
I am still a layman as far as full-text search is concerned for text mining.
It depends on how you want to deal with your data. Or, in other words: what's...
March 10, 2010 at 11:34 am
To meet the requirement
...create a stored procedure to which I will be passing in table1 and table2 as parameters,...
Pauls query need to be changed into dynamic SQL, I guess:
DECLARE...
March 10, 2010 at 6:57 am
I don't have an answer why you cannot use a COUNT function on a uniqueidentifier data type.
But considering it's the primary key I'd say COUNT(*) would work as a substitute,...
March 9, 2010 at 4:37 pm
anish_ns (3/9/2010)
Now, we want to so some text mining on the data. So, I would like to create a text file for each unique sessionID with all associated text data....
March 9, 2010 at 4:30 pm
Viewing 15 posts - 4,006 through 4,020 (of 5,504 total)