Forum Replies Created

Viewing 15 posts - 8,296 through 8,310 (of 8,731 total)

  • RE: Is there a Coalesce LIke function that returns the lowest/highest value of a set of params passed to it

    I'm not sure if it's something relevant but I made up a test for speed performance between the two solutions and a direct comparison. Turned out (as I expected) that...

    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 show single column value (separated by ;) as multiple columns otherwise null

    That's why I recommended the Splitter. It gives a much simpler and more understandable code.

    I could help with the code, but Asiti should read the articles first.

    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 show single column value (separated by ;) as multiple columns otherwise null

    For up to 4 subjects, the solution given will work.

    For more subjects, you should take a look at Jeff Moden's article for the 8k Splitter[/url] and Cross Tabs 1[/url] 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: Can a JOIN be alias?

    There's no need to create a view. You'll end up with millions of views that you won't use.

    You need to specify the complete query, not just the join. Something 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: SQL SERVER on the laptop

    I'll stay with Paul stating that any new laptop can support the client.

    However, you might need to consider your connection speed. That can cause troubles as well.

    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: Combine two SELECT statements into one result

    A simple trick.

    SELECT JavaRecords, JavaCount

    FROM (

    SELECT COUNT(tem.ComputerName) AS JavaRecords FROM (SELECT ComputerName FROM v_Java2345 UNION SELECT ComputerName FROM v_Java67) as tem) A

    CROSS JOIN (

    SELECT COUNT(*) AS JavaCount FROM

    dbo.v_Java67 j1 WHERE...

    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: running sum cursor

    There's a problem with the quirky update posted here (as far as I remember).

    You're mssing the clustered index. You must ensure that you have it.

    For the concurrency problem, you can...

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

    Using the information given you can do something like this

    SELECT *

    FROM OneDatabase.dbo.EmployeeLocation el

    JOIN SomeDatabase.dbo.Location l ON el.locationcode = l.locationcode

    JOIN AnotherDatabase.dbo.Employee e ON el.employeeID = e.employeeID

    ...

    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: Convert Rows to Columns Pivot

    Take a look at these articles:

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns[/url]

    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs[/url]

    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: Use the Table valued function in the query

    deepeshdhake (10/19/2012)


    Hello,

    Using the table EmpHistory, it is not satisfying all the rules. So I want to use this function as it satisfies all the rules. This is what I want:

    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: Use the Table valued function in the query

    I'm not sure that I can help you, because I'm not sure of what you want.

    If the TVF gives the same result as the table, why won't you use 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: Use the Table valued function in the query

    Now my problem is: I want the second last professor rank of the employee i.e in this case I want Junior Professor row(i.e) 2nd row from emphistory table).

    If you just...

    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: Save executed queries

    Thank you for your responses, I will check on these and choose a way to do it.

    Now I have several options and need to see which fits better to this.

    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: Save executed queries

    Right after posting, I found this (made for 2005 but worked on 2008)

    http://blog.sqlauthority.com/2008/01/03/sql-server-2005-last-ran-query-recently-ran-query/

    However, other options are welcome.

    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: Convert years

    Jeff Moden (10/18/2012)


    You will need to "unpivot" or "uncrosstab" the data so that it's in a vertical format and then "repivot" or "recrosstab" to the desired layout.

    For coded...

    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,296 through 8,310 (of 8,731 total)