Viewing 15 posts - 7,756 through 7,770 (of 8,731 total)
If it's a simple "SELECT * FROM Table", I would look for blocking issues.
It's hard to give a correct advise with so little information. What's the size of the table?...
August 21, 2013 at 9:16 am
There's a method that it's described in the following article
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
Read it and return to ask anything that you don't understand.
August 21, 2013 at 9:01 am
I'm glad it worked. I missed the Subcat12, but if you found out how to modify it, it means that you at least understand how the query is created. Be...
August 21, 2013 at 8:30 am
What do you want to do with non-numeric values?
What are you going to do with this data?
August 20, 2013 at 5:02 pm
So the output from your query is correct?
The only difference I see is that you repeat the FID
August 20, 2013 at 3:45 pm
Why do you have this
FaultlinID, CVE, OPEN, CLOSED, TOTAL
3623, CVE-2013-1212, 3623, 1, 0, 1
3624, CVE-2013-1213, 3624,1,2,3
Instead of this?
FaultlinID, CVE, OPEN, CLOSED, TOTAL
3623, CVE-2013-1212, 3623, 1, 0, 1
3624, CVE-2013-1213, 3624,1,3,4
August 20, 2013 at 3:35 pm
There's an alternate method to UNPIVOT using CROSS APPLY, you could read about it on the following link to understand the code I'm posting.
http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/
SELECT itemNoAS Item,
CatAS CatID,
SubCatAS SubCatID
FROM...
August 20, 2013 at 3:31 pm
I'm glad it helped you to learn more 🙂 Although all credit should go to Jeff.
August 20, 2013 at 8:45 am
No need for a loop, you can change your condition to your columns instead of the whole query. Here's one example, but to get it working you need to provide...
August 20, 2013 at 8:39 am
You'll find out that posting DDL, sample data and expected results all in a consumable format that we can copy and execute without anyother effort will give you better and...
August 19, 2013 at 3:30 pm
jsteinbeck-618119 (8/19/2013)
I have to fix code that extract's the date from the text; so I can try my example data I posted and see...
August 19, 2013 at 1:07 pm
Ed Wagner (8/19/2013)
Luis Cazares (8/19/2013)
WITH CTE AS(
SELECT TRY_CONVERT( DATETIME, Item) AS MyDate
FROM #temp t
CROSS APPLY dbo.DelimitedSplit8K(...
August 19, 2013 at 12:33 pm
Ed Wagner (8/19/2013)
Ville-Pekka Vahteala (8/19/2013)
wolfkillj (8/19/2013)
Stefan Krzywicki (8/19/2013)
Sean Lange (8/19/2013)
Stefan Krzywicki (8/19/2013)
The Dixie Flatline (8/19/2013)
August 19, 2013 at 12:08 pm
Applying cross tabs with different aggregations it's quite easy.
Read the following articles to find more information on cross tabs
http://www.sqlservercentral.com/articles/T-SQL/63681/
http://www.sqlservercentral.com/articles/Crosstab/65048/
and read the article linked on my signature to follow best...
August 19, 2013 at 10:57 am
No need to reinvent the wheel, you just need the CONVERT
SELECT CONVERT(decimal (18,2),TestData)
FROM #Test
August 19, 2013 at 10:40 am
Viewing 15 posts - 7,756 through 7,770 (of 8,731 total)