Forum Replies Created

Viewing 15 posts - 8,041 through 8,055 (of 8,731 total)

  • RE: Concurrency With #Temp Tables in Sprocs

    You shouldn't have concurrency problems with #Temp tables as they're exclussive by session.

    http://msdn.microsoft.com/en-us/library/ms177399%28v=sql.105%29.aspx

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

    The question is interesting but I do wonder why would someone would disable a clustered index?

    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 to create a column, add values and then compare with another table

    You don't need to add an extra column, you can do it all by code

    --If you have STARTDATE as varchar

    SELECT substring(ANUM,4,10) + '_' + substring(BNUM,2,10) + '_' + REPLACE( SUBSTRING(...

    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 in soling a SQL issue

    With the DDL and sample data was easy to get a solution (even if you manage to have 30 hours days :-D).

    It's not the only way, but it can do...

    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: Appending a character in Last_Name with a condition.

    It's not that hard what you're trying to do and you can get help really fast. But to help you, we need more information about your tables and if possible,...

    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 with an insert

    This is just a guess based on what you posted.

    else

    BEGIN

    SELECT @ID1 = NULL,

    @ID2...

    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 with stored procedure tuning.

    Some divide and conquer strategy might help, meaning to use temp tables or staging tables instead of massive union alls.

    Without more details is hard to give an advise. Maybe 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: Search for relationship

    Could you post DDL for both tables? Some comments on what the columns are could be useful.

    Additionaly, you could use the system views to find any Primary keys or Foreign...

    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: Updating First Field Based on the First of Grouped Rows

    I'm not sure what you're trying to do, I might need some expected results based on the data you provided. To get better help, you should post DDL and consumable...

    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: Import flat files into SQL Server (apart from SSIS)

    I just keep laughing with your post, but only because it's completely right and won't fit in here. 😀

    We have multiple users using same login (at least is not sa...

    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: Get 2 column result from 1 field

    How about using a CASE statement to filter the years needed?

    DECLARE @Something table

    (

    Years int,

    SomeValue int

    )

    insert @Something(Years, SomeValue)

    Values

    (2000, 2)

    ,(2001, 4)

    ,(2002, 5)

    ,(2003, 3)

    ,(2004, 2)

    SELECT SUM( SomeValue) SumOfAll, SUM( CASE WHEN...

    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: Using between in where clause from subquery

    tshad (6/13/2013)


    That was it.

    Not sure why I didn't realize this.

    Thanks,

    Tom

    I'm glad I could 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: Import flat files into SQL Server (apart from SSIS)

    Thanks Matthew,

    We're currently working with bcp with xp_cmdshell, but might try bulk_insert yo avoid possible DBAs complaints when applying code into production. There are several things to learn, but fortunately...

    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 can i select distinct values from 1 column in my query

    It's easy, but you need to define which value of db.myTable.FieldValue do you want when multiple values are available.

    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: Import flat files into SQL Server (apart from SSIS)

    Any ideas here? At least some votes. 😛

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