Forum Replies Created

Viewing 15 posts - 2,311 through 2,325 (of 2,443 total)

  • RE: Can I use a Tally table to do this?

    Normally, that would solve my problem, but I can't create a function. Only temp objects. DBAs have the system locked down pretty tight, still arguing with them over whether they...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Prometheus

    rbarryyoung (9/24/2008)


    I think that you may have confused Sisyphus (eternally condemned to push a boulder up a hill) for Prometheus (bringer of fire/light/enlightenment to humanity). Mind you, I think...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    thanks Lynn, I knew there had to be a better way. 🙂

    Why does that make a difference though? converting from datetime to varchar is implicit; converting from varchar to datetime...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    worth a shot, if we try to parse a string that doesn't exist, it's likely to give us trouble. Any chance you know how to populate those fields?

    If not,...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    I think your

    UPDATE temp_ameriflex_detail

    SET emp_doh = convert(char,emp_doh,112)

    completes successfully because it's not changing to a date, just formatting varchar as char, which isn't really changing anything.

    Try this and see...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    ok, quick example -

    '9/1/2008' has two slashes, and you know now that you can find the first slash by doing charindex('/',emp_doh,1) telling the Charindex() function to start at 1.

    If...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    Look up CHARINDEX in BOL, and replace the number in the Substring function with the position of your '/' plus one.

    see http://www.sqlservercentral.com/articles/String+Manipulation/63604/ for some recent article/discussion on this.

    😀

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    Right, if it's already datatype of varchar, you'll have to convert to a string to put anything in it.

    I would suggest you add a column with a datatype...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    themissnlink (9/24/2008)


    UPDATE temp_ameriflex_detail

    SET emp_doh = convert(datetime,emp_doh,112)

    This gets the following error:

    Msg 241, Level 16, State 1, Line 1

    Conversion failed when converting datetime from character string.

    I'm assuming...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    themissnlink (9/24/2008)


    I am having a similar issue with my date formats. I have an excel file I am importing from that is MM/DD/YYYY format and I import into the database...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: weird problem loading XML data

    Shah (9/23/2008)


    hi,

    i faced the same problem in past, when the ' (single quote) appear in a string...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: SSIS - type cast to MM/DD/YYYY from YYYYMMDD

    vaioks (9/17/2008)


    Hi,

    I am trying to Import a flat file (delimited) into a SQL server table. the was created from a unility which is not too flexible. I have the date...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Cleaning city name

    We just came across this question at work. While the USPS would be the 'authority' on US zip codes, whether it is correct for your business depends on how...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: DLP Technology

    I'm not quite sure how you could assign a 'per row' cost, unless you were ignoring litigation costs associated with data loss (http://www.sqlservercentral.com/articles/Editorial/64241/). In the healthcare industry, we'd also have...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • RE: Time between dates in business hours

    Agree with Quatrei.X, sample data would be better, but check this out too and see if it helps -

    http://www.sqlservercentral.com/articles/Advanced+Querying/calculatingworkdays/1660/

    Lots of questions when you start looking at workdays/hours/such, since holidays...

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

Viewing 15 posts - 2,311 through 2,325 (of 2,443 total)