Forum Replies Created

Viewing 15 posts - 1,246 through 1,260 (of 2,452 total)

  • RE: Need some help with this query

    New Born DBA (5/6/2015)


    I have this query which runs every night pulls 800,000+ records. I just wanted to know if there is a way to make it run better.

    SELECT...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Current Date order Query

    http://www.sqlservercentral.com/Forums/Topic1318719-1291-1.aspx

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need some help with this query

    WHERE Modified_Date >= (DATEDIFF(s, '19700101', GETDATE())- 2678400)

    what is the data type of "Modified Date"?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need some help with this query

    So, what is the where clause attempting to filter?

    the last 31 days...?????

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Integers in Time field

    anusha.guntupalli (5/5/2015)


    In one of the tables I am looking at :

    MAX Value: 82860

    MIN Value : 24480

    could this be seconds past midnight?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Integers in Time field

    what are the max and min values of column "Time"?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Round(9.x,0) Error where x >=5 and x <= 9)

    https://connect.microsoft.com/SQLServer/feedback/details/791155/round-function-returns-arithmetic-overflow-for-literal-values-0-5-and-1

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: To get the average of two largest number amount three column for particular identity.

    Uday3421 (5/3/2015)


    ID A B C AVG

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

    1 08 09 10 -

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

    2 ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Help with nested select

    Sam Garth (5/1/2015)


    I have another similar one if anyone can help.

    CREATE TABLE #Courses (RandomID INT, PersonID INT, CourseTitle NVARCHAR(200), CourseDate DATETIME)

    INSERT INTO #Courses

    VALUES

    (1,1,'Maths','2015-05-01 15:30'),

    (2,1,'Science','2015-05-01 15:30'),

    (3,1,'Science','2015-05-01 15:30'),

    (4,1,'Science','2015-06-01 15:30'),

    (5,1,'Maths','2015-04-01 15:30'),

    (6,2,'Science','2015-05-01 15:30'),

    (7,3,'Science','2015-05-01 15:30'),

    (8,4,'Science','2015-05-01...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: changing mobile numbers

    venkatagari85 (4/28/2015)


    table1

    Id Name mobileno

    1 abc 9123456789

    2 xyz 9876543210

    3...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: creating range between values in query

    Hi Luis

    I think that it would be easier for you to explain what you require if you can provide some create table / insert data scripts that describe your problem...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need help to calc information, based on prev and next lines within the table

    I really am not sure if I understand the business rules....we have only been presented with three rows.

    am also concerned about the comment re "previous or next segments".....how are these...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need To Improve View Performance

    Alan.B (4/22/2015)


    This is what I came up with:

    SELECT

    ab.AddressCode,

    AddressInstance = ROW_NUMBER() OVER (Partition by ab.AddressCode ORDER BY (SELECT (NULL))),

    ab.PostCode,

    AddressLine1 =...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need To Improve View Performance

    Hi Chris

    here is an alternative method....works on your sample data....probably need a bit of tidy up

    WITH cte as (

    SELECT

    ROW_NUMBER() OVER (order by (select null) ) -...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get unmatched values and matched values from two tables.

    karthik82.vk (4/10/2015)


    Hi Both,

    I just updated the post. its a typo from my end.

    I tried LEFT JOIN and FULL JOIN however i am getting only one row.

    the category table has...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 1,246 through 1,260 (of 2,452 total)