Forum Replies Created

Viewing 15 posts - 5,761 through 5,775 (of 8,731 total)

  • RE: I am no Asimov

    OCTom (9/30/2014)


    I hope you're not a Houdini; otherwise, everything you've done is just illusion. 🙂

    I had a colleague whom we named Houdini. He seemed to be busy but never accomplished...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: subquery???

    Basically the same thing as Alan. I just wanted to note that it's considered best practice to post DDL and sample data in a consumable format, as well as expected...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SELECT lento en una tabla de 9000 filas

    My translation:

    Hi, I have the following inconvenient with a table with 9000 rows, which in theory is not a big table. When a SELECT is run on this table is...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL formatting issue

    I didn't realized that you had the date twice with different format and one had time. Here's a different option:

    "aSNAP_Data_" + REPLACE( SUBSTRING( ((DT_WSTR, 29) GETDATE()), 1, 10), "-", "")...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query previous week with no set date?

    Luis Cazares (9/29/2014)


    To get the code block, you use the IFCode tags [ code="sql"][/code] (without the space)

    Actually, this:

    DATEADD(WK, DATEDIFF(WK, 0, TestDate - 1) - 1, 7)...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL formatting issue

    Something like this?

    "aSNAP_Data_20140929_P-" + (DT_STR, 4, 1252) YEAR( GETDATE()) + "-" + RIGHT( "0" + (DT_STR, 2, 1252) MONTH( GETDATE()), 2) + "-" + RIGHT( "0" + (DT_STR, 2,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query previous week with no set date?

    You could try the formula yourself. I wouldn't use a date that far away.

    SELECT comment,

    TestDate,

    dateadd(dd,((datediff(dd,'17530101',TestDate)/7)*7)-7,'17530101'),

    dateadd(dd,((datediff(dd,'17530101',TestDate)/7)*7),'17530101'),

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: NORMALIZE RECORDS WHERE 1 COLUMN IS A STRING OF DATA

    You should try the DelimitedSplit8K. You can find information on how it works and how to use it (along with the code) in here: http://www.sqlservercentral.com/articles/Tally+Table/72993/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Help with SQL query

    Maybe something like this will work, but your description makes it confusing.

    UPDATE a SET

    Units = x.Units,

    TotalTrigUnits = x.TotalTrigUnits

    --SELECT *

    FROM #Tracking a

    CROSS APPLY(...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Sorting an Execution Plan

    I'm not sure if using SET SHOWPLAN_ALL is a valid option for your case. Maybe you could query the XML from the plan.

    But, I wouldn't use this approach as the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Why do they not listen?

    Revoke create and alter permissions and create policies to apply changes to the database. People will start to do things right when they're enforced.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: I'm new to SQL development..

    You could also try this basic tips: 45 Database Performance Tips for Developers.

    The book recommended by Koen is more complete, but this one can give you some basic performance principles...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need help in query - urgent plz

    If it's urgent, I assume that you have tried something. Please show us what you've tried and we'll help you from that. It's considered polite to post the sample data...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Apex SQL License key

    It's possible but it might not be legal.

    Extract from ApexSQL EULA:

    C.Excepting authorized users of You, the Licensee, as provided by this Agreement, You may not distribute, publish, or otherwise...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Is there any alternate way for pivot

    Yes, there is. you can read about that on the articles in Sean's signature.

    However, I agree with what Sean has told you multiple times. You need to fix your non-SARGable...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 5,761 through 5,775 (of 8,731 total)