Forum Replies Created

Viewing 15 posts - 5,251 through 5,265 (of 26,490 total)

  • RE: Urgent SQL Developer vs Enterprise edition 2012/2014

    Jeff Moden (5/13/2015)


    Steve Jones - SSC Editor (5/13/2015)


    EE at $4k / 2 core? Really? I thought it was closer to $7k/core, min of two. The open price is $14k/core.

    I think...

  • RE: Display all months even if values are NULL

    pwalter83 (5/13/2015)


    imex (5/13/2015)


    Hi,

    Try:

    with

    CTE_Months as

    (

    select DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) as MonthYear

    ...

  • RE: Display all months even if values are NULL

    Lot of work being done. This may not display what you want in the result set, but it should meet your requirements.

    with Months14 as (

    select dateadd(month,datediff(month,0,getdate()) - n, 0)...

  • RE: Only select records with numeric character before hyphen

    tarr94 (5/13/2015)


    Lynn,

    Thank you for responding!

    Your solution appears to work. I added a couple of sample values to further test it out.

    declare @test-2 table(TestData varchar(32));

    insert into @test-2

    values ('1234-qwer'),('12e3-aer'),('1-12er'),('a3874-wlsie3'),('2873b-23');

    select * from...

  • RE: Only select records with numeric character before hyphen

    Something like this:

    declare @Test table(TestData varchar(32));

    insert into @Test

    values ('1234-qwer'),('12e3-aer'),('1-12er');

    select * from @Test;

    select * from @Test where TestData not like '%[^0-9]%-%'

    If so, be sure you understand what that last query is...

  • RE: Bug with IN?

    CELKO (5/11/2015)


    >> If I use an IN clause [sic] with a SELECT statement where the inner query uses a field [sic] name that doesn't exist, but DOES exist in the...

  • RE: where is sql server TVF return type stored in system tables

    Jeff Moden (5/11/2015)


    Try this, Bill. The sys.parameters thing isn't for the return of TVFs. sys.columns is.

    SELECT OBJECT_NAME(object_id),*

    FROM sys.columns

    WHERE object_id = OBJECT_ID('nameofyourfunctionhere')

    ;

    Thanks...

  • RE: where is sql server TVF return type stored in system tables

    Couldn't find anything to support this, but it probably exists in tempdb while the function is used since it is a table variable returned by the function.

    May be something worth...

  • RE: Index on calculated field with UDF?

    Raymond van Laake (5/11/2015)


    Hmm, yes was considering using a trigger... thanks for all your inputs

    When you use the GUI to make some changes to a table, SSMS will create a...

  • RE: Need some help with this query

    New Born DBA (5/11/2015)


    Lynn Pettis (5/11/2015)


    New Born DBA (5/11/2015)


    Lynn Pettis (5/11/2015)So the following (hopefully I mapped everything correctly using the VIEW definition) didn't help:

    CREATE NONCLUSTERED INDEX [Test] ON [dbo].[T387]

    (

    [C6]...

  • RE: Index on calculated field with UDF?

    Raymond van Laake (5/11/2015)


    Sounds like it should work, however when I change my formula to:

    RTRIM(([dbo].[fx_formatTelnr]([project],[user_tel])))

    I still get the error.

    What strikes me is the following:I am trying to persist the field...

  • RE: Need some help with this query

    New Born DBA (5/11/2015)


    Lynn Pettis (5/11/2015)So the following (hopefully I mapped everything correctly using the VIEW definition) didn't help:

    CREATE NONCLUSTERED INDEX [Test] ON [dbo].[T387]

    (

    [C6] ASC

    )

    INCLUDE

    (

    C1,

    ...

  • RE: Need some help with this query

    New Born DBA (5/11/2015)


    Lynn Pettis (5/11/2015)Show us that index that you had created.

    ALTER TABLE [dbo].[T387] ADD PRIMARY KEY CLUSTERED

    (

    [C6] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB...

  • RE: Need some help with this query

    New Born DBA (5/11/2015)


    CKX (5/11/2015)

    I think you may find this particular response from Lynn probably explains what is going on here.

    You can experiment by "including" the other columns in your...

  • RE: Are the posted questions getting worse?

    TomThomson (5/8/2015)


    Lynn Pettis (5/8/2015)


    Jeff Moden (5/8/2015)


    SQLRNNR (5/8/2015)


    Lynn Pettis (5/8/2015)


    Geez, now someone doesn't even understand that the code they are running generates and runs dynamic SQL.

    What is dynamic sql?

    Who is John...

Viewing 15 posts - 5,251 through 5,265 (of 26,490 total)