Forum Replies Created

Viewing 15 posts - 7,156 through 7,170 (of 8,731 total)

  • RE: How do you describe what you do?

    I usually say that I take a bunch of raw information from several sources and juggle with it and organize it to make it look nice to generate reports for...

    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: ProperCase Function

    dwain.c (1/17/2014)


    I agree that you've done some very thorough testing here. Excellent work!

    Dohsan (1/17/2014)


    Dwain

    Ándre, Ándre, Luís And O'Brien Had A Low-Budget 3D Printer In Washington D.C.

    I wasn't sure how...

    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: Unduplicated Users per quarter

    You could use a NOT EXISTS, but I don't understand the part of multiple results are you'll be getting a single resultset.

    It would be nice if you shared DDL, sample...

    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: Nulls inside Cursors

    And remember the first step towards the paradigm shift of writing Set Based code:

    "Stop thinking about what you want to do to a row... think, instead, of what 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: Nulls inside Cursors

    I don't have the rules for the 'Replacement' option, but here's the code that should work for the query as you have it now.

    UPDATE t SET

    Product_Status = CASE WHEN EXISTS(...

    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: Nulls inside Cursors

    This is an example of a replacement for all the code posted to use the cursor.

    UPDATE t SET

    Product_Status = 'Available'

    FROM Outlet.tblProductMaster t

    WHERE Product_Status IS NULL

    AND NOT EXISTS( SELECT *

    FROM Outlet.tblProductMaster...

    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: Nulls inside Cursors

    I'll try to explain using your original code.

    USE [OutletRetail]

    GO

    /****** Object: StoredProcedure [Outlet].[sp_UpdateProductStatus] Script Date: 01/16/2014 19:58:47 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER OFF

    GO

    --Updates Product status codes to 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: Where we can download SQL Server 2008

    You can use the Updgrade Advisor to validate possible upgrades.

    http://technet.microsoft.com/en-us/library/ms144256.aspx

    http://www.microsoft.com/en-us/download/details.aspx?id=29065&ocid=aff-n-in-loc--pd (found at the bottom of the page)

    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: with statement

    Have you tried the OUTPUT clause?

    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: Copy tables from one server to another

    You could create the scripts for the tables with the option to script indexes (and probably other dependent objects).

    You can use the script in a Execute SQL Task at 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: with statement

    Being pedantic, you can't use any ddl statements with a cte.

    Without being pedantic and trying to be useful, I assume you want to say DML. However, ctes work only for...

    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: Nulls inside Cursors

    To use a cursor, you basically need to use a while loop.

    If you're assigning values to your variables inside the loopp using select statements, you might want to reinitialize 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: Concatenating field values in one string

    Wow, someone revived a 5 year old thread. :w00t:

    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: Very SIMPLE query working in Access not working on Sql Server

    And if you don't want to do all the formatting work yourself, you can use something like http://poorsql.com to give you a readable code.

    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: Copy tables from one server to another

    With the import/export data wizard, you have the option to save the SSIS package for later use. That way, you can use it as it is or do any modifications...

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