Forum Replies Created

Viewing 15 posts - 121 through 135 (of 626 total)

  • RE: Convert first column in row without duplicate values, and second column in rows

    A simple crosstab will do.  You will need to use dynamic SQL if you want to handle an unknown amount of 'questions'.  Noticed I added and ID field.  When dealing...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Getting the first of the month based on yesterday's date

    Try this and also note the example on how to give us some data to work with.

    DECLARE @myTable TABLE (somedate DATE)

    INSERT INTO @myTable
    VALUES...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Query works until I use it in a stored procedure (contains forward slash)

    pharmkittie - Thursday, February 9, 2017 12:53 PM

    Y.B. - Thursday, February 9, 2017 12:43 PM


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Query works until I use it in a stored procedure (contains forward slash)

    The problem is you are using dynamic sql in your procedure and the text isn't quoted properly. 

    Try this:

    set @sql =N'insert into eligiblemember(Memtype, Division, MemberID,...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Split Row into Multiple Rows

    Just throwing in my testimony for the same guys who convinced me.

    Set Based Loops - "Learn it, Use it and you'll never want to go back."


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Count Difference for Every 15 Min

    Well you need to specify a time frame if you only want the last 15 minutes.

    i.e.

    WHERE


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Using IN in a Where statement with and option of all

    Ken at work - Thursday, February 2, 2017 8:42 AM

    Thom A - Thursday, February 2, 2017 8:28...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Select case Logic

    Is this perhaps what you are looking for? 

    SELECT
    Id,
    IsRegistered,
    IsAccepted,
    DBContent,
    CASE WHEN IsRegistered = 1 AND IsAccepted = 0 THEN 1 ELSE 0 END AS Passed

    FROM...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: How to know on which column should we create index.

    You should do some research as suggested but here are a few things to keep in mind.
    1. A clustered index IS the your table and thus can only have...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Are the posted questions getting worse?

    jasona.work - Wednesday, February 1, 2017 7:01 AM

    While this isn't entirely bad advice, I might lean towards getting the OK to...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Code pasting still not 100%

    I've had similar issues as well, plus extra line spacing when pasting.  Commented code is also strange.

    --What's with this?


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: t-sql 2012 if else error

    I would also like to add that the BEGIN...END isn't even necessary in this case.  It's used to group t-sql statement together.  However in your case it will either do...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Today's Random Word!

    Ray K - Tuesday, January 24, 2017 10:11 AM

    Revenant - Tuesday, January 24, 2017 10:06 AM


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: SSC Forum Updates

    Maybe it's me but trying to follow up on posts is not as intuitive as it once was.  I was eventually able to find my posts under my profile but...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: retrieving global variable for trigger

    I'm not sure if I'm missing one of the core requirements but if the application is already calling a SP, I'd rewrite that SP to handle the process from end to end and just do...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

Viewing 15 posts - 121 through 135 (of 626 total)