Forum Replies Created

Viewing 15 posts - 1,846 through 1,860 (of 8,731 total)

  • RE: Stored Procedure that uses a parameter in a WHERE x IN(@param1)

    Eric M Russell (11/18/2016)


    Budd (11/18/2016)


    PLEASE tell me what needs to be done to make something like this work?

    DECLARE @PARAM1 VARCHAR(2000) = 'Tom','JOE','BUDD','TIM' --< Obviously this wont work

    Select...

  • RE: Are the posted questions getting worse?

    Dear Santa,

    I know you won't be able to bring me a new laptop this year, but could you just bring more RAM (and a new HDD) for my current one...

  • RE: Are the posted questions getting worse?

    andrew gothard (11/18/2016)


    Brandie Tarvin (11/17/2016)


    Grant Fritchey (11/16/2016)


    Announcements include:

    SP1 for 2016 (which also has CREATE OR ALTER).

    A single development surface. This means all functionality in Enterprise is also in Standard and...

  • RE: Stored Procedure that uses a parameter in a WHERE x IN(@param1)

    You need to split the string to be able to use the individual values.

    DECLARE @PARAM1 VARCHAR(2000) = 'Tom,JOE,BUDD,TIM'

    SELECT firstname

    FROM Employees

    WHERE firstname in (SELECT Item FROM dbo.DelimitedSplit8K( @PARAM1, ',')s);

    The...

  • RE: GET Counts for insert,update,delete

    The code is full of errors. Also, it won't count DDL operations, just rows with an operation_date greater than now.

  • RE: Find the brackets

    MMartin1 (11/17/2016)


    Jeff Moden (11/16/2016)

    IMHO, cleaner code if you take the shortcut.

    SELECT mychar FROM mydata WHERE mychar LIKE '[[]%'

    That's how I went about doing it and then had to take a...

  • RE: Today's Random Word!

    Ed Wagner (11/17/2016)


    whereisSQL? (11/17/2016)


    Hugo Kornelis (11/17/2016)


    Luis Cazares (11/17/2016)


    crookj (11/17/2016)


    TomThomson (11/17/2016)


    Brandie Tarvin (11/17/2016)


    crookj (11/17/2016)


    Grumpy DBA (11/17/2016)


    Brandie Tarvin (11/17/2016)


    Ed Wagner (11/17/2016)


    Acronym

    Synonym

    Cinnamon

    Stick

    Ball

    bat

    Batgirl

    Robin

    Round

    Square

    Deal

    Breaker

  • RE: Are the posted questions getting worse?

    GilaMonster (11/17/2016)


    jasona.work (11/17/2016)


    So really, if you could figure out a way to live without Agent, you could drop down to Express and *really* save some money...

    And with only 4 cores,...

  • RE: Today's Random Word!

    crookj (11/17/2016)


    TomThomson (11/17/2016)


    Brandie Tarvin (11/17/2016)


    crookj (11/17/2016)


    Grumpy DBA (11/17/2016)


    Brandie Tarvin (11/17/2016)


    Ed Wagner (11/17/2016)


    Acronym

    Synonym

    Cinnamon

    Stick

    Ball

    bat

    Batgirl

    Robin

  • RE: An aggregate may not appear in the WHERE clause

    Have you tried with HAVING? https://msdn.microsoft.com/en-us/library/ms180199.aspx

    What are you trying to do? Shouldn't the subqueries be correlated somehow?

  • RE: Convert Cross Join to Inner Join

    The sample data is no help. We don't have expected results and I'm not sure you know what to expect from that data.

  • RE: Are the posted questions getting worse?

    Hugo Kornelis (11/17/2016)


    Eirikur Eiriksson (11/17/2016)


    Brandie Tarvin (11/17/2016)


    Beatrix Kiddo (11/17/2016)


    It's in the link there.

    CREATE OR ALTER (Yes, we heard you !!!) – New CREATE OR ALTER support makes it easier to...

  • RE: Find the brackets

    funbi (11/17/2016)


    Luis Cazares (11/17/2016)


    funbi (11/17/2016)


    Laurie Dunn (11/17/2016)


    This would also work and keep the code simple...

    SELECT *

    FROM dbo.MyData

    WHERE Left(mychar,1)='[';

    Yeah I got

    select * from MyData where CHARINDEX('[',mychar,0) = 1

    which works fine,...

  • RE: Convert Cross Join to Inner Join

    You're missing WHERE clauses. You might also be taking a bad approach. You need to create a cross tabs query which would be more effective.

    Here's an article that describe them

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    And...

  • RE: Find the brackets

    funbi (11/17/2016)


    Laurie Dunn (11/17/2016)


    This would also work and keep the code simple...

    SELECT *

    FROM dbo.MyData

    WHERE Left(mychar,1)='[';

    Yeah I got

    select * from MyData where CHARINDEX('[',mychar,0) = 1

    which works fine, then looked at...

Viewing 15 posts - 1,846 through 1,860 (of 8,731 total)