Forum Replies Created

Viewing 15 posts - 3,406 through 3,420 (of 8,731 total)

  • RE: TRY_CONVERT

    Eric M Russell (2/4/2016)


    TRY_CONVERT() is also useful for check constraints. For example, below we are requiring that "date" values stored in a VarChar column called FooDate can be casted as...

    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?

    jasona.work (2/4/2016)


    Man, there's a reply to one of my topics (which really already has been answered, although Gail raised an important point) by CELKO, and I can't read it...

    The curiosity...

    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: How to achieve "Full word match" value comes from source table column

    What's wrong with LIKE operator if it does exactly what you're asking for?

    SELECT *

    FROM #Source s

    JOIN #result r ON ' ' + r.column_result + ' ' LIKE '% ' +...

    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: Recursive Query Looping Dataset

    I'm not asking for a data set with thousands of rows. I'm just asking for something that can replicate the infinite loop problem and we can fix the issue.

    I'm not...

    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: How do I concatenate Month and Day to get date mm/dd format

    Chris,

    Is there any particular reason for using 1900 + DATEDIFF(YEAR,0,GETDATE()) instead of YEAR(GETDATE()) ?

    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: Reverse engineer a SQL query/views

    Data source views(DSV) are stored as XML which is not that hard to get. You just need to explore a bit as I can't remember the exact tag that it's...

    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: Recursive Query Looping Dataset

    I'm not sure what you're trying to do. You're not really using a hierarchy, but concatenating values.

    Maybe this could work better for you.

    CREATE TABLE #Table(

    col1 ...

    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: How do I concatenate Month and Day to get date mm/dd format

    Your columns are not varchar, otherwise you wouldn't have the conversion error.

    Also, mm/dd is not a date format valid for SQL Server. Dates need a year to be stored/showed as...

    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: Today's Random Word!

    BL0B_EATER (2/4/2016)


    DonlSimpson (2/4/2016)


    ZZartin (2/4/2016)


    Ed Wagner (2/4/2016)


    Grumpy DBA (2/4/2016)


    Ed Wagner (2/4/2016)


    Barbeque

    Ribs

    Pulled Pork

    Pirates

    Arrr...

    pain

    gain

    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?

    Phil Parkin (2/4/2016)


    Grant Fritchey (2/4/2016)


    Grumpy DBA (2/4/2016)


    In the past I worked with a couple developers (SQL and Oracle) who used Select * quite often. At every code review I...

    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?

    This got me by surprise. I'm not searching for jobs, but it got my attention because it was totally unexpected (but possibly logical).

    https://www.linkedin.com/jobs2/view/99695736

    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: Insert into temp table based on criteria

    The code that I posted previously is giving the expected results (after correcting your sample data script). What's your question/problem?

    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: Insert into temp table based on criteria

    Raxter (2/3/2016)


    Do you recommend a loop?

    No, definitively not a loop. However, I'm not sure what to recommend without more information and 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: Inserting data from file

    You might also want to check the following article about importing flat files into SQL Server.

    http://www.sqlservercentral.com/articles/BCP+(Bulk+Copy+Program)/105867/

    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: Insert into temp table based on criteria

    You certainly showed more information, but you didn't post it as it was requested. You're new here so I'm including the full example.

    Be aware that if you don't have enough...

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