Forum Replies Created

Viewing 15 posts - 7,606 through 7,620 (of 10,144 total)

  • RE: datediff on dates contained in single column

    Hi Andy

    Can you please provide a CREATE TABLE script for table Event and a script to populate it with some dummy data which demonstrates your problem?

    Is the table DataSource necessary?...

  • RE: Identify Products where Quantity Decimal Value is > 0

    SELECT [product], [quantity], [INTquantity] = CAST([quantity] AS INT)

    FROM (

    SELECT 1 AS [product], 2.21 AS [quantity] UNION ALL

    SELECT 2, 2.01 UNION ALL

    SELECT 3, 2.00

    ) d

    WHERE [quantity] > CAST([quantity] AS...

  • RE: How to get rid of UNION from this query

    Praveen Goud Kotha (7/28/2010)


    if any one asks me to write the same above code,

    i will prefer the following way..

    SELECT REPLICATE(0,LEN(DATEPART(M,GETDATE())))+CONVERT(CHAR(2),DATEPART(M,GETDATE()))

    Can any one say which will be the optimized way to...

  • RE: How to get rid of UNION from this query

    Praveen Goud Kotha (7/28/2010)


    Can i know what for you are using the right() function..??

    SELECT [Month] = RIGHT('0' + '1', 2) UNION ALL

    SELECT RIGHT('0' + '2', 2) UNION ALL

    SELECT RIGHT('0'...

  • RE: Today's Random Word!

    Brandie Tarvin (7/27/2010)


    Good night, Fonzi...

    @=)

    Oh, my word :blush: (covers ears)

  • RE: Are the posted questions getting worse?

    jcrawf02 (7/27/2010)


    Anybody see A-Team? Seems to be exiting the theaters in a hurry.

    Not yet.

    Something which really impressed me recently was 3D Avatar (on BD) on the new Somesing 3D HD...

  • RE: Today's Random Word!

    dbowlin (7/27/2010)


    CirquedeSQLeil (7/26/2010)


    John Rowan (7/26/2010)


    crookj (7/26/2010)


    John Rowan (7/26/2010)


    blessing

    Sneezed?

    Joe

    Nope, just count 'em.

    daily and then repeat

    #1. I woke up again

    #2. The sun rose again.

    #3. My family and I are...

  • RE: Select Query

    Raghavender (7/26/2010)


    Wrong one

    Can you please post the query which solved your problem? It will satisfy the curiosity of those who have given their time to help you, and may help...

  • RE: Using a parameter for substring length

    Donna

    Try comparing rows on zipcode, surname, LEFT(forename,1) and the first word of the first address line. This works well in the UK because postcode plus the first word of the...

  • RE: Select Query

    -- create sample data

    DROP TABLE #Sample

    CREATE TABLE #Sample ([Instance name] varchar(60), [Verified Name] varchar(60))

    INSERT INTO #Sample ([Instance name], [Verified Name])

    SELECT 'USMKESQLPRD001\SQL001', NULL UNION ALL

    SELECT NULL, '' UNION ALL

    SELECT NULL,...

  • RE: GET MAX- MIN VAlUES

    DROP TABLE #Application

    CREATE TABLE #Application (appid INT, appname VARCHAR(20), version INT, appCount INT)

    INSERT INTO #Application (appid, appname, version, appCount)

    select 1, 'Excel', 2000, 13 union all

    select...

  • RE: Add Space between text and number in same field

    DROP table #data

    CREATE table #data (DataValue varchar(10))

    insert into #data

    select 'CHEM0109' union all

    select 'MGMT532' union all

    select 'MECH5100' union all

    select 'TRAN100' union all

    select 'TRAN100' union all

    select 'BIO1323' union all

    select 'ENG1213' union all

    select...

  • RE: Getting distinct data based on one column

    I want B to also display

    Which value of B? For A1 and A2 you have two values. Using GROUP BY instead of DISTINCT shows how you can explicitly choose between...

  • RE: Today's Random Word!

    John Rowan (7/23/2010)


    Friday!!

    Nearly hometime :-D:-D:-D

  • RE: Nested CASE query issue

    ss_nl (7/23/2010)


    Chris Morris-439714 (7/15/2010)


    ,CASE

    WHEN DATEADD (year, 1, MAX(dd.ActualDate)) >= GETDATE() AND fo.Product IN (62,64) THEN 'Upgrade_Year'

    WHEN DATEADD (month, 3, MAX(dd.ActualDate)) >= GETDATE() AND fo.Product IN (61,63) THEN 'Upgrade_3Months'...

Viewing 15 posts - 7,606 through 7,620 (of 10,144 total)