Forum Replies Created

Viewing 15 posts - 7,966 through 7,980 (of 8,731 total)

  • RE: substring comparison for last 2 characters

    A possible solution would be like this. I'm worried about performance though. Couldn't you correct the data in the first place?

    CREATE TABLE #Table1( patid varchar(10))

    CREATE TABLE #Table2( patid varchar(10))

    INSERT INTO...

    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: Extract first numeric value from a string

    Please post your query and the problem you had so we can help 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: Error with stuff function; its cutting of my commands.

    People usually use STUFF in the code you're using to eliminate the first comma. Since you're not eliminating any character, there's no need to use it.

    Be sure to understand...

    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 query questio

    Great! If you still have questions, come back to ask.;-)

    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 query questio

    You had a good idea, but you missed the creation of the comma separated values. To learn how to do it you can read the following article. Creating a comma-separated...

    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: Massive slowdown in SELECT statement in Cursor from SQL 2000 to 2008 -- need help!

    Actually, statistics refer to the tables and are independent from the Stored Procedure.

    If you post the actual execution plan, you could get more help. Actually, I would recommend you to...

    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: Pivoting the output of 8K “CSV Splitter” Function into destination table

    That's because you have the SomeID column that will help you with the group by. That's why I needed a Row_Number() to simulate the SomeID column.

    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: Dynamic Vertical Rows to Horizontal

    There's a better way, you need to check for Dynamic SQL. Check the article Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs[/url] and come back if you need...

    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: Concatenating Values of 2 rows in SQL Server

    Please check the following article and come back if you need help. 😉

    http://www.sqlservercentral.com/articles/comma+separated+list/71700/

    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: Error with stuff function; its cutting of my commands.

    Why are you using STUFF anyway?

    SSMS won't show all the characters in a varchar(MAX), you need to export them to some client that will show them (or check this article...

    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: Pivoting the output of 8K “CSV Splitter” Function into destination table

    If I understand correctly, your original Strings were

    A,A,F

    B,D,Y

    C,E,Z

    Otherwise, I'm not sure that you're getting those results.

    However, given the information you supplied, this code would do the trick. It might...

    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: Named Instance SQL2008R2

    Shouldn't it be ok if the instances are on different servers?

    I'm sure it's a different problem (I might be wrong:-P).

    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: Same two select statments show different sort order on a result

    The problem is that you don't have an ORDER BY clause. Without it, SQL Server can't guarantee an order of the returned rows.

    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: ORDER BY when inserting into table variable

    Eugene,

    I found this reference googling dbcc traceon(610)

    http://sqlserverplanet.com/data-warehouse/sql-server-2008-minimally-logged-inserts

    Again, I'm not saying is a good choice, simply an advice I've got.

    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: Need Help on SQL query script on sum

    Welcome to this forum,

    I really hope that we can help you, but there's something that I can't understand. You say: "The flag indicator will tag with 'Y' if 1...

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