Forum Replies Created

Viewing 15 posts - 4,561 through 4,575 (of 8,731 total)

  • RE: Delete duplicate rows from ANY table.

    I agree, the table name is not enough information to eliminate duplicates, the columns defining the key are necessary.

    A lot of things can make a row unique even if 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: Are the posted questions getting worse?

    WayneS (7/31/2015)


    Looks like Luis is answering Oracle questions now.

    That wasn't the only attempt on that day. Here's a completely lost Oracle user.

    But hey, as long as I can help.

    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 update values based on column into multiple columns in another table

    I'm just wondering why would you need to update these columns as you shouldn't store values this way if you want a normalized table. And if this is for a...

    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 taking time

    What are you expecting to accomplish with the subquery? It basically compares one column to itself joined by the same condition.

    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!

    Ray K (7/30/2015)


    Eirikur Eiriksson (7/30/2015)


    Ed Wagner (7/30/2015)


    Vacation

    Wagon Queen

    Drama queen

    Dancing Queen

    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: Union Join

    You need at least three tables in your join which you refer as a, b & c. You're doing a UNION between 2 SELECTs and but you don't define...

    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 this query possible?

    Here's one option. Maybe you were very close.

    I know this is a 2008 forum, but you mention that you're using LAG (which was introduced on 2012).

    WITH SampleData AS(

    select '01' 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: Removing 00-00-00 from varchar Column in SQL table

    yb751 (7/29/2015)


    Luis Cazares (7/29/2015)


    You conversion won't help as it will only truncate the string. It will basically do the same as the LEFT() function. Another problem it that 111 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: Rewrite query to improve performance

    Eric M Russell (7/30/2015)


    You definately need some form of index on logDate column. Not only is that column determining the final sorted output, but it is also the key for...

    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?

    Brandie Tarvin (7/30/2015)


    GilaMonster (7/30/2015)


    Luis Cazares (7/30/2015)


    NOLOCK hints can be useful to get estimates of certain data.

    Yup. In fact I told some people recently to put nolock onto a bunch of...

    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: Stringing out fixed deposit cash flows

    Could you post sample data and expected results?

    I have an idea of what you want, but I'm not completely sure. If possible follow the advice of this article to post...

    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?

    NOLOCK hints can be useful to get estimates of certain data.

    To use it on every single table and every single query is just nonsense and lack of efficiency in laziness...

    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: Detecting Differences in Files on Servers

    Today I was wondering when would your article would come out, then I opened the newsletter and it was there.

    I'll give it a read after a cup of coffee.

    Thank you...

    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: Removing 00-00-00 from varchar Column in SQL table

    yb751 (7/29/2015)


    Well we had a REPLACE and a LEFT solution why not add a CONVERT. 😉

    DECLARE @mytable TABLE (myDate VARCHAR(20))

    INSERT INTO @mytable

    VALUES ('2015-07-28 00:00:00'),('2015-07-29 00:00:00'),('2015-07-30 00:00:00')

    SELECT * FROM @mytable

    UPDATE @mytable

    SET...

    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: Removing 00-00-00 from varchar Column in SQL table

    sheaS (7/29/2015)


    Thank you for such a quick reply. Yes, I can convert it to a date, actually in the new app, I had these columns setup as dates but 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

Viewing 15 posts - 4,561 through 4,575 (of 8,731 total)