Forum Replies Created

Viewing 15 posts - 5,101 through 5,115 (of 26,490 total)

  • RE: REPLACE & PATINDEX issue

    Taking Eirikur's set up:

    SET NOCOUNT ON;

    WITH SAMPLE_DATA(IP_ADDR) AS

    ( SELECT * FROM (VALUES

    ('132.135.3.100, fe90::bu54:e9z5:61a9:5003')

    ,('132.235.219.113, fe80::28d9:l69a:5bbd:gr2f')

    ) AS X(IP_ADDR)

    )

    SELECT

    IP,

    MAC

    FROM

    ...

  • RE: REPLACE & PATINDEX issue

    Eirikur Eiriksson (5/29/2015)


    Quick suggestion, use dbo.DelimitedSplit8K on the comma

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    ;WITH SAMPLE_DATA(IP_ADDR) AS

    ( SELECT * FROM (VALUES

    ('132.135.3.100, fe90::bu54:e9z5:61a9:5003')

    ,('132.235.219.113, fe80::28d9:l69a:5bbd:gr2f')

    ) AS X(IP_ADDR)

    )

    SELECT

    ...

  • RE: REPLACE & PATINDEX issue

    Does the string only have 'IPAddress, MACAddress'?

  • RE: REPLACE & PATINDEX issue

    TJT (5/29/2015)


    Correct, the IP Address is always first and ends with a comma

    select left(@TestStr,patindex('%,%',@TestStr) - 1);

    I can't post the declare of the @TestStr with the ip and mac address as...

  • RE: REPLACE & PATINDEX issue

    TJT (5/29/2015)


    Hi,

    I am trying to grab the IP address from a field and having trouble getting some IP addresses. The query is below

    SELECT ...

  • RE: CustNr between then and custNr between then other 1

    GG_BI_GG (5/29/2015)


    I have the following expression;

    Cust_nr between 9950001 t/m 9959999 then 2, Cust_nr between 9980001 t/m 9989999 then 3 and others 1

    I like it to do it on a select...

  • RE: Creating a view or procedure from a dynamic pivot table

    You have two unnecessary BEGIN statements and no END statements. You can remove the two BEGINs.

  • RE: Creating a view or procedure from a dynamic pivot table

    I can understand why you can't make this a view, but what error are you getting when trying to create a stored procedure, and please post the code you tried...

  • RE: TryCatch

    ramana3327 (5/28/2015)


    Thank you.

    Incase, if I use the correct table name TableB (If I didn't use any Xact_abort on and there are no syntax errors)

    In case of any error occur, Is...

  • RE: AVG per week for Last 52 Full Weeks

    sharonsql2013 (5/28/2015)


    If its today it should show data from last week to last week - 52 weeks

    Because we are in the middle of the week.. Hope I am not...

  • RE: Increase Update Speed

    rocho09 (5/28/2015)


    Hi, thank you for your response. I already upload the execution plan and here are the index definition, table definitions are above, please look into my first post.

    CREATE NONCLUSTERED...

  • RE: AVG per week for Last 52 Full Weeks

    sharonsql2013 (5/28/2015)


    52 weeks from current week. If its the middle of the week then 52 weeks from past week So, The starting date will be based of current date

    Okay, what...

  • RE: AVG per week for Last 52 Full Weeks

    sharonsql2013 (5/28/2015)


    I am trying to get the avg of Tickets closed in last 52 Full weeks.

    However , The query I have does not filter for full weeks and I get...

  • RE: Permissions Lost After Renaming Table

    Letron Brantley (5/28/2015)


    Yeah I did say that ... :Whistling:

    Actually the real table is not. That's why we are doing the rename. Also both tables are partitioned with the...

  • RE: Permissions Lost After Renaming Table

    Letron Brantley (5/28/2015)


    Yes I've thought about ALTER SWITCH but if I'm not mistaken, one of the requirements for ALTER SWITCH is that the target table has to be empty.

    Based...

Viewing 15 posts - 5,101 through 5,115 (of 26,490 total)