Forum Replies Created

Viewing 15 posts - 3,886 through 3,900 (of 8,731 total)

  • RE: Is date format yyyy-mm-dd safe regardless of the language settings?

    datsun (11/9/2015)


    If I remove all the dashes in yyyy-mm-dd and replace with yyyymmdd, then is it safe regardless of the login default language setting?

    Yes

    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 date format yyyy-mm-dd safe regardless of the language settings?

    I guess your first clause should also be like this:

    case

    when started < '2015-11-01' and finished >= '2015-10-01' then 1

    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 date format yyyy-mm-dd safe regardless of the language settings?

    There are 2 formats which are dateformat and language settings independent.

    Date only: YYYYMMDD

    Date and time: yyyy-mm-ddThh:mi:ss.mmm

    That means that your format is not safe. I know it seems inconsistent, but it...

    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: DY

    sknox (11/6/2015)


    Luis Cazares (11/6/2015)


    sknox (11/6/2015)


    Luis Cazares (11/6/2015)


    Rich Mechaber (11/6/2015)


    Aaron Bertrand had a nice blog about this: scroll down for "Pop Quiz" and see if you still think DATEPART abbreviations are...

    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: MERGE does not work on SQL 2012

    Maybe some aggregation is needed.

    MERGE [dbo].[GiftCard] as target

    USING

    (SELECT

    g.[CardNumber]

    ,YEAR(MAX(g.[Date]))

    ,MONTH(MAX(g.[Date]))

    ,MAX(f.[Period])

    ...

    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: Are the posted questions getting worse?

    The Skill, Educational Background and Experience bullet points are a joke. This is the punch line:

    ?Experience with Kronos Timekeeper software, Remedy Action Request System, ERwin database design tool, Oracle and...

    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: return Fiscal Year based on YYYY-week format

    Which of this will define Week 1 for 2016?

    2015-10-01 to 2015-10-02

    2015-10-01 to 2015-10-03

    2015-09-26 to 2015-10-02

    2015-09-27 to 2015-10-03

    2015-10-03 to 2015-10-09

    2015-10-04 to 2015-10-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: Find All Items That Call a Stored Procedure

    j-1064772 (11/6/2015)


    mister.magoo (11/2/2015)


    ...

    /* create a sample stored procedure to demonstrate the logging */

    create proc testProc

    as

    -- log access to the SP

    [highlight="#ffff11"]insert logSP default values;[/highlight]

    -- Do some work

    go

    /* execute the test */

    exec...

    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: Making progress but have a few questions

    For the backups, don't copy the mdf and ldf files. If you just copy them, they might be in an inconsistent state and won't work if you try to copy...

    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: Are the posted questions getting worse?

    Sean Lange (11/6/2015)


    Ed Wagner (11/6/2015)


    Brandie Tarvin (11/6/2015)


    Greg Edwards-268690 (11/6/2015)


    Eirikur Eiriksson (11/6/2015)


    On the current topic, a very favorite question: When do you use the function "WhatTimeIsIt()"?

    Three options given

    1) To get 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: return Fiscal Year based on YYYY-week format

    natividad.castro (11/6/2015)


    By the way, the Fiscal Year starts on October First and end on September 30.

    When do weeks start? How do you define the first week of the year?

    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: Performance Tuning - Cursor Based Procedure

    CKinley (11/6/2015)


    Possibly. I am looking at your tally table. Thank you for sharing.

    Feel free to ask any questions that you might have.

    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: Can you replace stored procedures with sp_executesql

    I'm assuming they use sysadmin credentials as well to connect to the database through the app, because of course it won't work otherwise. (I hope the sarcasm sign was visible)

    They...

    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: return Fiscal Year based on YYYY-week format

    To simplify this, you could create a calendar table that will contain the fiscal year and week as two of its columns so you don't have to bother with problematic...

    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: Performance Tuning - Cursor Based Procedure

    Would something like this work for you?

    http://www.sqlservercentral.com/Forums/Topic1732401-3412-1.aspx#bm1732424

    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 - 3,886 through 3,900 (of 8,731 total)