Forum Replies Created

Viewing 15 posts - 466 through 480 (of 1,228 total)

  • RE: Help on Performance issue on Recursive CTE

    haiao2000 (10/10/2012)


    ...

    whatelse could i do to make this query perform better. this thing runs for about 20seconds on the table that contains more than 10 millions of records, which is...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: SELECT TOP(100 PERCENT) in Derived Table

    CREATE VIEW (Transact-SQL) SQL Server 2005 states the following: "The ORDER BY clause is used only to determine the rows that are returned by the TOP clause in the view...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Question Can you connect to a database directly without linking to its server?

    Resender (10/10/2012)


    Ok, that's basically what I told him, but he wanted me to look it up anyway.

    He asked because you can do it in Oracle, but that is cause in...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: HELP

    SELECT COUNT(*), COUNT(nationality), COUNT(modeofstudy)

    FROM (

    Select 123, 'gb' ,1

    Union Select 435, null ,2

    Union Select 211, 'wq', 3

    Union Select 234, 're', null

    Union Select 123, null, null

    ) t (Learner, nationality, modeofstudy)


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Need help to eliminate values from resultant record using view

    maida_rh (10/10/2012)


    I tried ur solution but stilll code return the same result as my query return ....

    AND NOT (

    actiontype in ('withdrawn','Discontinued','Matured','Withdrawn from Public')

    AND rhdate < (select getdate()-1095)

    )

    This will...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Using IF condition on Cursor

    luissantos (10/10/2012)


    Hello Micky

    The purpose for using a Cursor is because i need to run an Update not for one "referencia" = Article, but for more and less 170000, and for...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Need help to eliminate values from resultant record using view

    SELECT *

    FROM Vu_CurRating

    WHERE CatId <> 7

    AND NOT (

    actiontype in ('withdrawn','Discontinued','Matured','Withdrawn from Public')

    AND rhdate < (select getdate()-1095)

    )

    AND NOT (

    ltrating LIKE 'D%'

    AND rhdate < (select getdate()-365)

    )

    ORDER BY SectorCode,...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: creating procudre for dynamic table

    raghuldrag (10/9/2012)


    Hi friends,

    create tab T1(name varchar(22),age numeric(22))

    create tab T2(name varchar(22),age numeric(22))

    insert into t1 values('ram',22)

    insert into t1 values('am',26)

    insert into t1 values('sam',28)

    insert into t1 values('bam',23)

    insert into...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Execution plans

    ravisamigo (10/9/2012)


    Hi All,

    If query is not using execution plans, how we can find it and what is the action required from DBA side?

    How we can reduce the query cost for...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Count duplicate occurances in relational tables

    dean-hodgson (10/9/2012)


    The relationship is via the key (first field) in the first table 'Subjects' and the second field 'SubjectsIKey' in the second.

    CREATE TABLE Subjects

    (

    SubjectsKey TEXT PRIMARY...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: INSERTING VALUES BASED ON DISTINCT FIELDS

    Could be because it's homework season, Eugene.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: update table with next value

    ronan.healy (10/9/2012)


    hi

    out of interest is it possible to do it this way

    update ACRT set MIDIRB = min(IRBT2.IRBRATING)

    from ACRT,IRBT,IRBT2 where ACRT.MIDIRB = IRBT.IRBRATING

    and IRBT2.IRBRATING > IRBT.IRBRATING

    and if so what do...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: INSERTING VALUES BASED ON DISTINCT FIELDS

    DROP TABLE #SampleData

    CREATE TABLE #SampleData (USERID CHAR(3), CLIENTID CHAR(6), PROJECTID CHAR(6))

    INSERT INTO #Sampledata (USERID, CLIENTID, PROJECTID)

    SELECT 'ABB', '012345', '000001' UNION ALL

    SELECT 'ABB', '012345', '000002' UNION ALL

    SELECT 'ABB', '012346', '000034'...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: A severe error occurred on the current command

    Grant Morton (10/9/2012)


    ChrisM@home (10/9/2012)


    Microsoft has a ton of relevant support articles:

    http://support.microsoft.com/search/default.aspx?query=a+severe+error+occurred&catalog=LCID%3D2057&mode=r

    Of those, this looks promising:

    http://support.microsoft.com/kb/948525

    Scanning through this lot, here's what I'd suggest:

    List the version / SP / CU level etc...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • RE: Remove All Identity Tables

    vahid.arr (10/9/2012)


    NO friend

    I want To Set Identity Off for All Tables not drop table.

    You can - but sequentially, not all at the same time.

    Why do you want to do...


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

Viewing 15 posts - 466 through 480 (of 1,228 total)