Forum Replies Created

Viewing 15 posts - 3,841 through 3,855 (of 8,761 total)

  • RE: Shredding XML column returns NULL values but correct record count!

    Eschergoedel (3/8/2016)


    I can't thank you enough for your help, both of you. The term inline schema opened up a lot of effective googling and thus learning for me. Thank you...

  • RE: Default constraints OR INSERT trigger for Audit columns (create date time/user)

    SQL!$@w$0ME (3/8/2016)


    Which is the best practice to implement in audit columns for create datetime and create user, INSERT trigger or default constraints?

    Thanks!

    The default constraint will only mark the date/time of...

  • RE: problematic xml

    astrid 69000 (3/8/2016)


    ohhhhh :ermm: :ermm: :ermm:

    no I didn't....

    now I feel embarrassed :w00t:

    thanks! I love learning new things 🙂

    You are very welcome.

    😎

  • RE: Shredding XML column returns NULL values but correct record count!

    This should get you passed this hurdle

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @TXML XML = '<Document>

    <xs:schema elementFormDefault="qualified" targetNamespace="http://www.dummy.com/Export" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:mstns="http://www.dummy.com/Export" xmlns="http://www.dummy.com/Export" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element msdata:IsDataSet="true" name="Document">

    <xs:complexType>

    ...

  • RE: please help to convert column to row in sql

    Could you please provide DDL (create table), sample data (as insert script) and expected output from that sample?

    😎

  • RE: problematic xml

    astrid 69000 (3/7/2016)


    I know what the problem is now, I am supposed to get a full path and somehow I am not getting it even though they say is being...

  • RE: problematic xml

    astrid 69000 (3/7/2016)


    Thanks, but that is not what i need.

    I need to make a table with columns that contain the values of each one.

    and the source is a table...

  • RE: Help with Reseed of a table

    BEGIN and END are your friends:-D

    😎

    if (select count(0) from CGL) = 0

    BEGIN

    dbcc checkident ('CGL', RESEED, 0)

    END

    else

    BEGIN

    declare @lastc int

    select...

  • RE: problematic xml

    Quick suggestion, use the .nodes function

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @TXML XML = '<xml-response>

    <clear-fraud>

    <clear-fraud-stabilities>

    <clear-fraud-stability>

    ...

  • RE: Can you reference the row number to delete rows in a table

    mrjae (3/6/2016)


    Hi there,

    I am new to sql server and i am practicing on SQL Express. I have created a table and in error I have duplicated rows. My first...

  • RE: Query/Performance Tuning Steps without help of profiler

    ganapathy.arvindan (3/6/2016)


    Please Help me Query/Performance Tuning Steps with out help of profiler

    Quick suggestion, get Grant's book on execution plans[/url]

    😎

  • RE: Fix Over Lapping Dates

    Quick and simple solution with LEAD()

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    declare @overlap table

    (

    ID int identity,

    infoname char(10),

    code char(10),

    mods char(30),

    type varchar(30),

    effective date ,

    termination date

    )

    insert into @overlap

    select 'DUMMY','99205','C','*','01/01/2008','12/31/2100'

    insert into @overlap

    select 'DUMMY','99205','C','*','01/01/2009','12/31/2100'

    insert into @overlap

    select...

  • RE: Help with SUBSTRING and CHARINDEX

    Quick suggestion, similar to Luis's

    😎

    DECLARE @LOG_STRING VARCHAR(200) = 'Login failed for user ''User1''. Reason: Failed to open the explicitly specified database. [CLIENT: 11.11.11.11]';

    SELECT

    SUBSTRING

    ...

  • RE: some of cpu cors are not used By sql server 2014

    MotivateMan1394 (2/28/2016)


    Hi

    Ask help from old-hands

    We have a server : win 2008 R2 enterprise (virtual machine) - Sql server 2014 - sp1

    we had 22 cpu core which...

  • RE: Try Catch doesnt work

    farax_x (2/19/2016)


    Why Try Catch doesnt catch collation exceptions? How can I handle it?

    BEGIN TRY

    IF '1' COLLATE Arabic_CI_AI = '1' COLLATE Arabic_100_CI_AI

    ...

Viewing 15 posts - 3,841 through 3,855 (of 8,761 total)