Forum Replies Created

Viewing 15 posts - 8,731 through 8,745 (of 26,490 total)

  • RE: LIKE Operator OR Regular Expressions?

    Does this help?

    DECLARE @TestTable TABLE (

    TestTableID int IDENTITY(1,1),

    TestValue varchar(30)

    );

    INSERT INTO @TestTable(TestValue)

    VALUES ('fresh chives'),('MIRACLE WHIP');

    SELECT * FROM @TestTable;

    SELECT * FROM @TestTable WHERE TestValue...

  • RE: Determenistic function returns undetermenistic. Why?

    I can do everything your code is doing without using DATEFROMPRARTS:

    declare @Date_received date = '2013-02-23';

    select

    @Date_received,

    dateadd(dd, -1, dateadd(wk, datediff(wk, cast('1900-01-01' as date), @Date_received),...

  • RE: Determenistic function returns undetermenistic. Why?

    Champagne Charly (2/23/2013)


    Hello,

    Has any idea why this is classed as non deterministic.

    DATEFROMPARTS(DatePart(yyyy,DATEADD(dd, (DATEPART(dw, Date_received) - 1) * - 1, Date_received)),DatePart(mm,DATEADD(dd, (DATEPART(dw, Date_received) - 1) * - 1, Date_received)),DatePart(dd,DATEADD(dd, (DATEPART(dw,...

  • RE: NEWID() - How does it work?

    Paul White (2/23/2013)


    Lynn Pettis (2/23/2013)


    I did qualify that it was in my experience. Could be they are being converted to strings before being sorted.

    That's fine, I'm not posting to...

  • RE: port number is different in prod and DR server

    Unless you have configured your named instances to use specific ports, the port numbers assigned will (can, may) change each time the named instance is restarted. The SQL Browser...

  • RE: Are the posted questions getting worse?

    I don't know about any of you but this is just down right scary.

    Now please, no piling on here.

  • RE: NEWID() - How does it work?

    Paul White (2/23/2013)


    Lynn Pettis (2/22/2013)


    As to ordering by a uniqueidentifier, it sorts in ascending or descending order as if it is converted to a CHAR(36) value, or at least that...

  • RE: UDF Help

    I'm not even sure what you are trying to accomplish. Plus, what is the other function doing? There really isn't enough information to really provide much help.

    You may...

  • RE: NEWID() - How does it work?

    Jeff Moden (2/22/2013)


    Lynn Pettis (2/22/2013)


    I haven't tried, but are you sure you can convert a uniqueidentifier to a bigint?

    Yes, but not directly.

    SELECT CAST(CAST(NEWID() AS BINARY(16)) AS BIGINT)

    Cool. Learned something...

  • RE: NEWID() - How does it work?

    I haven't tried, but are you sure you can convert a uniqueidentifier to a bigint?

    As to ordering by a uniqueidentifier, it sorts in ascending or descending order as if it...

  • RE: Stored procedure call syntax

    I let SSMS generate the script to run a stored proc, and I get this:

    DECLARE @rc int

    DECLARE @DDVersion varchar(20)

    -- TODO: Set parameter values here.

    EXECUTE @rc = [cidne2110].[dbo].[spDDAddFixAll]

    ...

  • RE: Declared Variable in WHERE clause weird behavior

    Please post the DDL for the table(s) including index definitions. Also, please post the actual execution plan for both of the queries. These can be saved as .sqlplan...

  • RE: Are Triggers a "legacy" Feature? (Database Weekly, Nov 08 2008)

    crazyEmu (2/21/2013)


    Was confronted by a trigger just yesterday, wonderful use of nested cursors. Just had to post it as an example.

    Would not be surprised if this was a port from...

  • RE: Date time conversion error

    cmrhema (2/22/2013)


    15/02/2013 04:25:57

    21/02/2013 02:25:57

    these are non working

    These are invalid dates for US English settings.

  • RE: Date time conversion error

    Can you show us some of the data that is failing?

Viewing 15 posts - 8,731 through 8,745 (of 26,490 total)