Viewing 15 posts - 1,171 through 1,185 (of 1,957 total)
In addition to the great answer you have....
Try using /text() as part of the xpath when using ".value" ...
DECLARE @xml XML
SELECT @xml = CONVERT(XML, @xmlVarchar, 2)
SELECT @xml.value('(/VehicleInfoMessage/@Type/text())[1]', 'varchar(10)') AS 'Type'
,...
September 28, 2012 at 9:22 am
PiMané (9/28/2012)
mister.magoo (9/28/2012)
I wait with interest to hear from others on this...That make two of us 🙂
But honestly I don't think we'll have much feedback on this issue...
Oh, I don't...
September 28, 2012 at 6:25 am
PiMané (9/28/2012)
September 28, 2012 at 4:27 am
PiMané (9/28/2012)
mister.magoo (9/27/2012)
I tried this simple test - on SQL 2012 Xquery wins - interesting to see if 2008 is the same.
For small XML there's no difference. The 2nd Execution...
September 28, 2012 at 3:23 am
I tried this simple test - on SQL 2012 Xquery wins - interesting to see if 2008 is the same.
-- Prepare some bigger XML data
DECLARE @xml XML
DECLARE @detail VARCHAR(4000)...
September 27, 2012 at 6:40 pm
You might get away with this, but to be truthful, I haven't checked whether it would always guarantee the correct order/matching.
The xml is not easily handled in T-SQL because of...
September 27, 2012 at 1:35 pm
I wonder why you would want to split a postcode?
June 28, 2012 at 5:10 pm
Add another column to your data set that has the correct ordering values
Have a lookup to another table that gave you that ordering.
SELECT ....
....
...
June 22, 2012 at 10:52 am
Just checking... are you actually on sql 2005?
May 28, 2012 at 5:15 pm
Ok, so if that doesn't appeal, just set CONTEXT_INFO after you open the connection
DECLARE @ci VARBINARY(128)
SET @ci = 'MyUser'
SET CONTEXT_INFO @ci
Then in your trigger,
use CONVERT(VARCHAR(128),CONTEXT_INFO()) as the user name.
May 10, 2012 at 2:50 am
select
sum(1-void) as Countofsuccess,
sum(void) as countoffailure
from test
May 9, 2012 at 5:48 pm
IF you are not using the Workstation ID / host_name for anything, that is quite handy...
Just set the Workstation ID in your connection string (a SqlConnectionStringBuilder helps nicely for this)
e.g.
Data...
May 9, 2012 at 5:45 pm
Yep, I think that's flogged that one to death. I'm sleepy. G'night.
March 29, 2012 at 8:04 pm
And the original 1M rows on my QUAD/4GB
Another 10M rows with MOD 50000 and a new code
SQL Server parse and compile time:
CPU time = 0 ms,...
March 29, 2012 at 7:42 pm
Results for 10M rows with MOD 500000 on CustomerID on QUAD core desktop with 4GB ram.
========== Code From Article ===========================================
SQL Server Execution Times:
CPU time = 1576...
March 29, 2012 at 7:30 pm
Viewing 15 posts - 1,171 through 1,185 (of 1,957 total)