Forum Replies Created

Viewing 15 posts - 7,306 through 7,320 (of 8,731 total)

  • RE: Will the covered index be used by one query only?

    The queries you posted should be able to use it even for a seek operation.

    If you had Select F3, F4, F5 from Table1 Where F2=@F2, then SQL Server could probably...

    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: Double quotes on Bulk Insert

    I'm back 🙂

    Somehow, I expected a reaction like that from you 😀

    I'm attaching a sample file from what I'm loading and the format file I'm using. I had to edit...

    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: Newbie date start problem

    This is slightly different.

    SET @TicketStartDate = DATEADD( DAY, -1, DATEADD(WEEK, DATEDIFF(WEEK, 0, GETDATE()) - 1, 0))

    SET @TicketEndDate = DATEADD(DAY, 6, @TicketStartDate)

    There's a date zero which is usually 1900-01-01. We calculate...

    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: Double quotes on Bulk Insert

    Thank you Jeff.

    I'm using xml format files as described here: http://technet.microsoft.com/en-us/library/ms187833.aspx

    But I really shouldn't have posted so late on friday because I'll return to the office after Christmas and 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: Insert into question

    You can create it on temdb and use it from any other database by using the 3-part name (tempdb.dbo.Tally)

    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: Insert into question

    You need to be sure you're in the correct instance.

    To be sure you're inserting on the right table, you could use a 3 part name: [db_name].[schema_name].[table_name]

    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: Insert into question

    That's because you're still using the VALUES clause when you should only use the SELECT.

    For more information on INSERT INTO: http://technet.microsoft.com/en-us/library/dd776381(v=sql.105).aspx Check the part Inserting data from other tables

    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: Insert into question

    Hi,

    There's no need for a loop. You just need to use a Tally Table. To know what it is and how it replaces a loop, read the following: http://www.sqlservercentral.com/articles/T-SQL/62867/

    With your...

    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: Insert into question

    Cross post. All replies on http://www.sqlservercentral.com/Forums/Topic1525065-1291-1.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: New features

    Here you can find all the new features categorized and you can dig into the ones you want.

    What's New in SQL Server 2012

    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: SYNTAX Help please...

    IT2012 (12/19/2013)


    What I need is a seasoned SQL programmer who would like to spend a week in sunny Southwest Florida teaching T-SQL to a beginner. Any takers??? 😀

    I'm...

    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?

    I just can't understand how people don't realize they need to keep studying to become better professionals. I feel a great satisfaction every time I learn something new (like yesterday...

    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: SYNTAX Help please...

    I apologize on behalf of everyone, this discussion went too far away from the original question. This forum is a place to learn and it's great that you have learned...

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

    One table scan per each DateID? That seems quite expensive.

    Here's my dynamic approach based on my initial query and your sample data. 😉

    SET @sql = ''

    SELECT @sql = @sql +...

    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: SYNTAX Help please...

    ScottPletcher (12/18/2013)


    Huh? Where can't "IS NULL" be used in place of ISNULL()? At any rate, the ANSI-standard COALESCE() could always be used in place of ISNULL().

    There's the importance...

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