Viewing 15 posts - 31 through 45 (of 245 total)
i've been having a bit more of a play with this and have noticed that the line
OriginalSchema.value('Form[1]/Codes[1]/code[sql:column("y.myNum")][1]','varchar(max)')
is significationly slowing down my query.
each row in the table that houses the XML...
April 8, 2013 at 9:46 am
what sort of text/information were you hoping to return from the Stored Procedure?
would it just be a Flag to say Pass/Fail?
April 8, 2013 at 5:12 am
WITH MyCTE(title,impact,probability) AS
(
SELECT 'RiskA',10,0.1 union
select 'RiskB',10,0.5 union
select 'RiskC',9,0.8 union
select 'RiskD',5,0.5 union
SELECT 'RisckE',5,0.3 UNION
SELECT 'riskf',6,0.8 UNION
SELECT 'riskg',2,0.3 UNION
SELECT 'riskh',6,0.8
)
SELECT *,
CASE WHEN [mc].[impact] >= 7 AND [mc].[probability] >= 0.7 THEN 0
...
March 22, 2013 at 4:50 am
are you doing something that a Recursive CTE could resolve?
http://blog.sqlauthority.com/2008/07/28/sql-server-simple-example-of-recursive-cte/
March 20, 2013 at 3:37 am
ronmoses (3/1/2013)
create proc sp1
as
select * from temp1
exec sp2
Without a BEGIN and END defining the body...
March 1, 2013 at 5:28 am
i got caught on questions
10
11
12
7
6
i got confused with question 12.
the answer states Group By and ORDER BY cannot contain a sub query, but isn't this considered a subquery?
select * from...
February 28, 2013 at 4:03 am
thanks for the reply.
i'm going to step through the process you've laid out, and see if it makes sense to me 😀
cheers
February 21, 2013 at 9:00 am
doesn't this do it?
DECLARE @noVowels [varchar](50)
SET @noVowels = 'Information System'
SELECT
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(@noVowels,'A','')
,'E','')
,'I','')
,'O','')
,'U','')
February 15, 2013 at 9:04 am
i decided to do a test and view the execution plan.
DECLARE @i INTEGER = 1
SELECT CASE @i
WHEN 0 THEN
(SELECT COUNT(1) FROM table1)
WHEN 2 THEN
(SELECT COUNT(1) FROM table2)
ELSE
(SELECT COUNT(1) FROM...
February 13, 2013 at 8:13 am
i think it is valid syntax, its just giving a cross join because there isn't a join in the WHERE clause.
select
*
from
table1 t1
,(select ...) t2
where
t1.col1 = t2.col1
jasons example is a good...
February 12, 2013 at 3:15 am
i believe that if your within cursor in one SP (lets say its named aCURSOR)
and you make a call to another SP that also has a cursor with the same...
February 8, 2013 at 9:47 am
could someone explain what the original post is returning, and what is believed *should* be returned, as i dont understand.
when i run the code, it returns '8', which is what...
January 18, 2013 at 3:13 am
hi.
its set to Anonymous Authentication.
i've actually got it to work, now.
i got it to work at 9:30 (about 45 minutes before i opened this thread), but the person who receives...
January 15, 2013 at 3:50 am
dont you just hate it when someone else comes in with the answer before you? 😀
January 8, 2013 at 6:17 am
i think it would be like this.
select NameField,COUNT(table2.LinkField) FROM
Table1
LEFT JOIN Table2 ON Table1.LinkField = Table2.LinkField
and Table2.OtherField = 'Somthing'
and Table2.LinkField IN (1,2,3,4)
GROUP BY namefield
January 8, 2013 at 5:48 am
Viewing 15 posts - 31 through 45 (of 245 total)