Forum Replies Created

Viewing 15 posts - 8,626 through 8,640 (of 8,731 total)

  • RE: Constraint Event Order

    John Mitchell-245523 (8/9/2012)


    (Bob Brown) (8/9/2012)


    STUPID QUESTION: Don't BEFORE triggers fire before AFTER triggers? Is number 2 totally wrong?

    I think the point is that there's no such...

    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: Anything out there better than SSRS

    J Livingston SQL (8/8/2012)


    Accountants on the other hand....love pivot tables.

    I would say that Accountants love Excel. some might even ask you to put the whole database in Excel and 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: Help - Need to fill in parent lot tool info for given table

    You have sample data but there's no expected results. I'm not sure if I understood correctly, here's what I imagine you're trying to do (but it might be completely wrong).

    Please...

    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: Anything out there better than SSRS

    I used it on few projects, mostly for demos.

    It's easy to learn and has a simple GUI.

    Scripting is very similar to T-SQL and can be protected to prevent changes on...

    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: Excluding data from a result set

    There's no offense, I hope you didn't take the comments on a bad way.

    It's clear that you don't have much experience on SQL Server, but I hope you could learn...

    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: Default SA password

    Default password is blank password.

    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: Excluding data from a result set

    Sean Lange (8/8/2012)


    A couple other suggestions. You should not declare @Date as varchar and turn around and force implicit conversions to datetime.

    I couldn't believe that @Date was declared as 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: Problem Using subquery and join

    I believe there's a problem with your sample data because there's not to much matches (only 19)

    However, you might find useful to use a CTE with the ranking function ROW_NUMBER.

    Here'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 answers getting worse?

    My original reply for this post might count as a terrible answer. I saw it after I had posted and reread the OP. http://www.sqlservercentral.com/Forums/Topic1339745-391-1.aspx

    However, I tend to see some awful...

    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 returned more then one value

    This subquery might be returning more than one value.

    (SELECT DATEDIFF(YEAR, EecDateOfOriginalHire, getdate()) from empcomp EC WHERE EC.EecEEID = E.EECEEID) as 'Yrs of Serv'

    You can test it using this:

    SELECT EC.EecEEID,...

    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: Excluding data from a result set

    I'm not sure if this would work correctly, because I have no DDL or sample data, but if it does, it should improve the performance and would make your query...

    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: Excluding data from a result set

    How about this?

    WHERE V.Type_Fleet <> 'FS'

    AND Sales_Date > @DATE

    AND Sales_Date <= DATEADD(MONTH, - 1, @DATE)

    I'm not sure, but I believe this code will perform poorly with all those subqueries in...

    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: Commenting in Dynamic query

    mtassin (8/7/2012)


    Luis Cazares (8/7/2012)


    But it does matter if we're talking about number of rows returned.

    With select * you can get either 1 or 0 (in this particular case).

    With select COUNT(*)...

    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: Commenting in Dynamic query

    And I was focused on that part and neglected the scope. :hehe:

    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: Commenting in Dynamic query

    mtassin (8/7/2012)


    Luis Cazares (8/7/2012)


    SQLRNNR (8/7/2012)


    As far as I remember, the "Select count(*)" was changed by Steve after the discussion on the previous question and originally had a "Select *".

    However, 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 - 8,626 through 8,640 (of 8,731 total)