Viewing 15 posts - 856 through 870 (of 1,957 total)
You need to declare the namespaces and reference them in your SELECT.
Also pay attention to case sensitivity in XML.
EXEC sp_xml_preparedocument @docno OUTPUT, @doc,'<camt:Document xmlns:camt="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"/>'
select * from openxml(@docno,'/camt:Document/camt:BkToCstmrStmt/camt:Stmt',2) with ([camt:Id] varchar(100))...
May 28, 2013 at 4:14 pm
Sean Lange (5/28/2013)
dwilliscp (5/28/2013)
May 28, 2013 at 4:01 pm
Sorry, that's the problem with not having sample data to test with...
you probable want something more like this:
select point_range,count(*)
from (
select
jp.userid
, case...
May 24, 2013 at 5:35 pm
Evil Kraig F (5/24/2013)
For the love of gods...THANK YOU. 😀
I owe you a beer. Or ten.
I'll take the THANK YOU as enough... Beer is for lizards...:hehe:
May 24, 2013 at 5:01 pm
...I'm thinking something like this:
declare @x xml = (select *
from sys.tables as tables
for xml auto,elements)
select @x,(select count(*) from @x.nodes('tables') [count](nd) for xml auto,elements,type)
from (values(1)) as [root](b)
for xml auto,elements
Which produces
<root>
...
...
May 24, 2013 at 4:45 pm
I'm missing the point I am sure, so can you explain why you can't just count the nodes with a select?
May 24, 2013 at 4:32 pm
facemann (5/24/2013)
May 24, 2013 at 4:23 pm
You are grouping by userid, so of course you get one row per userid....
Try this:
select
x.point_range
, count(jp.userid) as countofusers
from StatusLevelPnt jp
inner join user ju on...
May 24, 2013 at 4:18 pm
Yes, you can pass a NULL into a stored proc.
Try this:
create proc testNullParam @p1 varchar(10),@p2 varchar(10)=null,@p3 varchar(10)
as
select @p1 as p1, @p2 as p2, @p3 as p3
go
exec testNullParam @p1='test',@p2=null,@p3='test'
You get this:
+--------------------+
¦[highlight="#808080"]...
May 24, 2013 at 4:11 pm
Tobar (5/23/2013)The one draw back with this method, I just noticed :-D, is that you must specify all the columns in the table. If you are only updating 5 columns...
May 24, 2013 at 3:12 am
GilaMonster (5/23/2013)
mister.magoo (5/23/2013)
I don't have 2005 any more, but interestingly on 2012 at least, you can just issue a CREATE INDEX using the same index name without dropping it first!
You...
May 23, 2013 at 9:58 am
Kingston Dhasian (5/23/2013)
The link below can help you with the syntax to create the...
May 23, 2013 at 8:11 am
the syntax
EXEC @myvariable = dbo.myproc;
will take the RETURN value from the stored proc and put it into @myvariable, which IIRC must be of Integer data type.
It looks like you are...
May 23, 2013 at 3:05 am
Thanks for a well presented, well thought out article, which has expanded my knowledge.
May 23, 2013 at 2:53 am
Viewing 15 posts - 856 through 870 (of 1,957 total)