Forum Replies Created

Viewing 15 posts - 7,066 through 7,080 (of 8,753 total)

  • RE: Dates in intervals of x days

    Here is a quick example using a Tally/Numbers CTE

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON

    /* Generate a set of dates at a given interval

    from the start date untill the end...

  • RE: change data capture issue

    charipg (9/14/2014)


    A. the user have enough/right permissions for the SSIS execution

    B. No result , i mean no dbs showing as cdc enabled.

    actually i checked your ...

  • RE: XML Shredding / parsing

    Quick thought, do you have an example of the XML, depending on the complexity and structure one might find something that fits the purpose.

    😎

  • RE: Msg 7391, Level 16, State 2, Line 1

    You will find instructions here

    😎

  • RE: Substring

    girl_bj (9/14/2014)


    May I know what does the 7 means?

    SUBSTRING(SD.ColumnA,1,CHARINDEX(' ',SD.ColumnA,7) -1 ) AS FIXED_PART

    It tells the charindex where to start searching for the character.

    😎

    Hotel A146 10/25/2014 hotel...

    123456789012345678901234567890

    ...

  • RE: change data capture issue

    First, apologies for the piecemeal like answers:-)

    From the top of my head, most likely causes:

    A. Insufficient permissions for the SSIS execution user account, the "user" doesn't have enough/right permissions.

    B. CDC...

  • RE: delete row with unique identifier

    Quick thought, when you pass the uniqueidentifier value to the procedure, you will have to pass it as a string, here is an example:

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON

    IF OBJECT_ID('dbo.SAMPLE_UNIQEID') IS NULL

    BEGIN

    CREATE...

  • RE: A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

    elham_azizi_62 (9/13/2014)


    when I want to delete this row I get this error:

    SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:4911282; actual 1:4911010). It occurred during a read...

  • RE: Substring

    Here is a quick solution using the charindex function to locate the boundaries. The first one depends on the first word being consistent, the second one has slightly more flexibility...

  • RE: XML Shredding / parsing

    Quick thought, you may want to take a look at Jacob Sebastian's XMLTable function. Also if you have an XSD for the XML, you can create a schema collection and...

  • RE: How is data stored or indexed in Clustered and nonclustered Columnstore Index?

    Quick note, Alberto Ferrari gave a very good talk on optimizing DAX queries at the last SQLBits where he explained in good details the Vertipaq/xVelocity compression, rowgroups, deltastores etc. Also...

  • RE: Synonyms 2

    This code

    CREATE SYNONYM Emp

    FOR Human.Resources.Employee

    ;

    go

    select

    BusinessEntityID

    , NationalIDNumber

    , JobTitle

    from Emp

    ;

    will not work as there is no such thing as

    Human.Resources.Employee

    Try it out if you don't have...

  • RE: Find specific values in sql XML-query

    Here is another way of doing this, slightly more flexible

    😎

    USE TESTDB;

    GO

    SET NOCOUNT ON;

    DECLARE @SEARCH_VALUE INT = 19;

    DECLARE @TXML XML

    set @TXML = '<row id="10000000" xml:space="preserve">

    <c1>Name 1</c1>

    <c2>Name 2</c2>

    <c10>40</c10>

    <c10...

  • RE: remove line breaks from xml

    raymond.konker.williams (9/4/2014)


    Help how can i remove line breaks from my xml data when i export it to excel it breas

    Hi and welcome to the forum.

    Could you provide some sample...

  • RE: Week Start and End by Month

    Jeff Moden (9/12/2014)


    The following should do it (see attached). I made sure that it's a high performance iTVF instead of an mTVF. I also got rid of the...

Viewing 15 posts - 7,066 through 7,080 (of 8,753 total)