Forum Replies Created

Viewing 15 posts - 3,901 through 3,915 (of 10,144 total)

  • RE: Select is Slow

    yuvipoy (12/12/2013)


    Having a table with 100 columns and 1 million records.

    Select Count(*) from Mytable;

    COUNT(*)

    ----------

    1001920

    Time taken to return is 15 sec

    select * from Mytable;

    Time...

  • RE: Union Join between 3 SQL Queries

    Why read ALL OF THOSE TABLES three times when you can get your results by reading them only once?

    Why include tons of columns in your subquery - then throw them...

  • RE: Union Join between 3 SQL Queries

    Take care with your join types. Referencing a column from an outer-joined table will convert the join to an IJ (except the special case of checking a column for NULL).

    SELECT...

  • RE: How to validate data as per user requirement

    avdhut.k (12/12/2013)


    Hi,

    My requirement is to validate the data,as per users specification,

    ...

    What's the context? Is this user data entry, data import, data migration? The...

  • RE: error with stored procedure

    SELECT

    @QTRSTRTDATE = DATEADD(m, DATEDIFF(m, 0, GETDATE()), 0),

    @QTRENDDATE = DATEADD(m,DATEDIFF(m,-1, GETDATE()),-1)

    EXEC @return_value = [dbo].[test] @QTRSTRTDATE, @QTRENDDATE

  • RE: Set based super challenge

    dwain.c (12/11/2013)


    Jeff Moden (12/11/2013)


    ChrisM@Work (12/11/2013)


    Gosh, I'm surprised that with a title like this, there have been so few takers - and so little feedback from the OP. Maybe those sleepless...

  • RE: Set based super challenge

    dwain.c (12/12/2013)


    ChrisM@Work (12/12/2013)


    -- I might give it a go over lunch.

    ----------------------------------------------------------------------------------------

    I can see it now. Cornish pasty in one hand while the other furiously types in the 1M row...

  • RE: Set based super challenge

    lotusnotes (12/11/2013)


    Thank you to all.

    In a fit of inspiration I have come up with my own solution. Although it gives a slightly different result set, I'd be interested in...

  • RE: Set based super challenge

    Gosh, I'm surprised that with a title like this, there have been so few takers - and so little feedback from the OP. Maybe those sleepless nights have caught up....

  • RE: SELECT question

    gary.morey (12/11/2013)


    The SSN is stored as a MD5 hashed value.

    The combination of SSN, PKT and FICE_NBR in table A does not have a match on the combination of SSN, PKT...

  • RE: Update Cursor Advice

    There's an alternate interpretation of the question: the first match between the two tables (on OrderID, mpn) takes the first line number, the second match takes the second number and...

  • RE: Set based super challenge

    This doesn't look too challenging. Can you correct both your sample data and your expected output for EpisodeNo 10010? Cheers.

    For those of you looking for sample data to play with...

  • RE: SELECT question

    Aram Koukia (12/9/2013)


    gary.morey (12/9/2013)


    I have 2 tables. Each one has the following columns: SSN, PKT and FICE_NBR.

    I need to be able to retrieve the rows from table A...

  • RE: SELECT question

    SELECT DISTINCT *

    FROM Tablea a

    WHERE NOT EXISTS (

    SELECT 1

    FROM Tableb b

    WHERE b.SSN = a.SSN

    AND b.PKT = a.PKT

    AND b.FICE_NBR = a.FICE_NBR

    )

  • RE: Conditional where

    derekmcdonnell3 (10/24/2013)


    I made a mistake, it is in the ON statement that must be conditional, and only on that one field. The data is too messy to get a...

Viewing 15 posts - 3,901 through 3,915 (of 10,144 total)