Viewing 15 posts - 6,526 through 6,540 (of 8,753 total)
Jeff Moden (11/24/2014)
Eirikur Eiriksson (11/24/2014)
November 24, 2014 at 4:35 pm
Just a quick question to "the thread", am I missing something or is XML getting more popular? Just noticed that this topic on the XML forum has proportionally many times...
November 24, 2014 at 3:03 pm
Quick questions, can you post an example of the XML and how big are the files?
😎
November 24, 2014 at 2:58 pm
Quick suggestion as this isn't as complex as it seems at first, import the file's content into a staging table, one line per row and group/parse it from there.
😎
USE tempdb;
GO
SET...
November 24, 2014 at 2:45 pm
Quick note (for completeness), the inner query returns an XML, the value() method is invoked on that XML
😎
(inner query returning XML).value() <--the value method on the XML data type.
November 24, 2014 at 1:13 pm
gravitysucks (11/24/2014)
create proc proc1 (@param1 int)
as
begin try
declare @param2 int
begin transaction
exec proc2 @param2
commit transaction
end try
begin catch
if @@trancount > 0
rollback transaction
end catch
i haven't had an opportunity to do this before....
November 24, 2014 at 1:00 pm
Good catch with the node value Arthur, don't think it merits a dynamic sql though as one can easily encode the value with a simple FOR XML statement.
😎
/* Simple encoding...
November 24, 2014 at 12:38 pm
As I mentioned before, often the XML must be interrogated to determine the placement of the inserted node. This sample checks both the XML to be modified and the XML...
November 24, 2014 at 3:29 am
The XML modify/insert has 4 positioning directives, as first,as last, after and before, changing from as last to after for the correct positioning, note the slight difference in the syntax.
Often...
November 23, 2014 at 3:07 pm
Quick'n simple example
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @TXML XML = '<Attribute>
<A1>6529</A1>
<A2>6529</A2>
</Attribute>';
DECLARE @NNODE VARCHAR(100) = 'A3';
DECLARE @NVAL VARCHAR(100) = 'New value';
DECLARE @Nt ...
November 23, 2014 at 3:25 am
Quick solution of the "first coffee in the morning" kind, probably not the most efficient but it works
😎
USE tempdb;
GO
SET NOCOUNT ON;
IF OBJECT_ID('dbo.database_tags') IS NOT NULL DROP TABLE dbo.database_tags;
create table...
November 22, 2014 at 1:51 am
KoldCoffee (11/20/2014)
November 21, 2014 at 11:56 pm
Quick thought, the character combination is double windows new-line, 0x0D000A000D000A00 in Unicode or 0x0D0A0D0A in ASCII, construct a variable with this value and use charindex to search for it.
😎
Charindex and...
November 21, 2014 at 11:40 pm
Quick thought, IIF is kind of an oddity in this list as it brings nothing new but a Access SQL compatibility
😎
November 21, 2014 at 1:54 am
Viewing 15 posts - 6,526 through 6,540 (of 8,753 total)