Forum Replies Created

Viewing 15 posts - 136 through 150 (of 3,956 total)

  • RE: Calculating Duration Using DATETIME Start and End Dates (SQL Spackle)

    Jeff Moden (4/16/2015)


    My greatest disappointment is that MS doesn't have a datetime conversion for Pig Latin. 😛

    Easy enough.

    DECLARE @MyDate DATETIME = '2014-01-01';

    SELECT UPPER(SUBSTRING(ds,2,1)) + SUBSTRING(ds,3,1) + LOWER(LEFT(ds,1)) + 'ay' +...

  • RE: Are the posted questions getting worse?

    Luis Cazares (4/9/2015)


    Original source of the picture in here: http://www.moef.dk/fishfingers/

    I need to call my lawyer. They've violated my patent rights. :w00t:

    That is awesome Luis!

  • RE: String Manipulation - Data Between Quotes

    Some simple solutions have already been posted, but there are also some queries/string manipulation techniques in this article that would help you pull any of the data out of your...

  • RE: how to ignore between operator end value if it is 0 in where clause

    SELECT *

    FROM employee e

    JOIN deltavalues d

    ON e.planid = d.planid

    WHERE e.balance BETWEEN d.baseval AND

    CASE d.highval

    ...

  • RE: Baffled by duplicates despite selecting distinct values

    bhattpranav (4/9/2015)


    That would be a lot of rows to put in an excel and compare or filter on. querying the table directly for duplicates would be so much quicker.

    It's weird...

  • RE: Group data into 15 minute intervals

    Jeff Moden (4/9/2015)


    dwain.c (4/9/2015)


    A general question here to Jeff and Joe then. Let's hear your thoughts.

    I've written on Calendar tables[/url] and how they can be used (An Easter SQL[/url])....

  • RE: Are the posted questions getting worse?

    Sean Lange (4/9/2015)


    Luis Cazares (4/9/2015)


    I finally found Dwain's secret.

    It won't display here. Says the image contains errors. :w00t:

    Maybe that's what he means after the code I posted to his recent...

  • RE: Group data into 15 minute intervals

    A general question here to Jeff and Joe then. Let's hear your thoughts.

    I've written on Calendar tables[/url] and how they can be used (An Easter SQL[/url]). Clearly they're...

  • RE: Logging and Error Handling for SQL Stored Procedures

    Wayne West (4/9/2015)


    Thanks for the article, Dwain! Just last week I added a logging table for executing stored procs, mainly because I have a pair of do/undo procs that...

  • RE: Help with arithmetic formula to "stuff" digits

    ScottPletcher (4/9/2015)


    COBOL is not inherently evil, it's a language like any other...

    Totally agree with this. Its designers were evil. 😛

  • RE: Baffled by duplicates despite selecting distinct values

    dwain.c (4/9/2015)


    bhattpranav (4/8/2015)


    --INSERT INTO #Context( OrderId )

    SELECT tinclude.OrderId FROM ( SELECT v.OrderId FROM dbo.mdv_CustomerFilterCustomerTransDate v WITH (NOLOCK)

    WHERE v.TerritoryCode IN (3) AND v.CustomerId = 649 AND...

  • RE: how to calculate date time

    immaduddinahmed (4/9/2015)


    hi,

    i try count function + datename function and also datediff function but no use.

    i cant merge same dates

    please help me out

    thanks for the help

    Try converting your DATETIME value...

  • RE: Baffled by duplicates despite selecting distinct values

    bhattpranav (4/8/2015)


    --INSERT INTO #Context( OrderId )

    SELECT tinclude.OrderId FROM ( SELECT v.OrderId FROM dbo.mdv_CustomerFilterCustomerTransDate v WITH (NOLOCK)

    WHERE v.TerritoryCode IN (3) AND v.CustomerId = 649 AND (...

  • RE: how to calculate date time

    immaduddinahmed (4/9/2015)


    hi,

    my data is looks like this,

    Date---------------------------------------A

    2015-03-01 13:38:07.343----------------1

    2015-03-01 14:04:04.460----------------1

    2015-03-02 19:33:55.117----------------3

    2015-03-02 19:33:55.117----------------4

    2015-03-02 19:39:26.580----------------1

    i want data looks like this

    Date-------------------------------------------A

    Day 1------------------------------------------2

    Day 2------------------------------------------8

    please can any one provide me a query.

    please help me out

    Thanks for...

  • RE: A Hazard of Using the SQL Update Statement

    Jeff Moden (4/8/2015)


    AncientCitySQL (4/8/2015)


    Timing is everything... I just read this article the other day and made a mental note. Today, while studying for the 70-461 exam using, Itzik Ben-Gan's,...

Viewing 15 posts - 136 through 150 (of 3,956 total)