Forum Replies Created

Viewing 15 posts - 76 through 90 (of 1,228 total)

  • RE: t-sql 2012 update primary key value into column of the second table

    wendy elizabeth (10/11/2016)


    This not the third time I asked a question. In this question, I found out what the issue is and I want to find a resolution.

    Please explain the...


    [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: conditional where clause

    GilaMonster (10/6/2016)


    ChrisM@Work (10/6/2016)


    GilaMonster (10/6/2016)


    Eirikur Eiriksson (10/6/2016)


    Using a conditional IF statement is by far the simplest way of doing this.

    And is prone to the performance-related problems that Chris alluded to.

    https://www.simple-talk.com/content/article.aspx?article=2280

    We must...


    [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: slower queries using linked server

    Have you tried EXECUTE(querystring) AT linkedservername?


    [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: t-sql 2012 link 3 tables

    wendy elizabeth (10/6/2016)


    I have this school years data and I am making a copy of it for the previous school year. Basically the schoolid for this current school year changed...


    [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: Query processing

    SQL Server will read all qualifying rows (in this case, ALL of them) then eliminate the nonqualifying rows in either a residual predicate i.e. as rows are read (common and...


    [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: Maximum number of CROSS APPLY functions

    The Dixie Flatline (10/4/2016)


    Define cascading please. Output from itvf_1 becomes input to itvf_2 ??

    http://www.sqlservercentral.com/articles/T-SQL/97545/


    [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 statements included within a function cannot return data to a client: SQL server 2014

    The left-outer-joined derived table (the bottom half of the query) isn't referenced in the outer SELECT, WHERE clause or ORDER BY. You can safely remove it.


    [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: the multi-part identifier could not be bound

    Your conditional is faulty. Which row of dbo.emp do you want to check? You need a SELECT in there. Possibly something like

    IF NOT EXISTS (SELECT 1 FROM dbo.Emp WHERE...


    [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: SQL help - how do we find that a particular string appears x times in a certain field

    mw112009 (8/25/2016)


    Thx but that is not really the challenge...

    What I need is an expression that will give me the 3 letters that follow the nth occurrence of the key word...


    [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: SQL help - how do we find that a particular string appears x times in a certain field

    mw112009 (8/25/2016)


    I mean in each row how many times does the word fox appear ?

    Using a tally table, SUBSTRING(bigstring, 'fox', n) or whatever.

    Work it out from there. You'll need to...


    [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: Executing dynamic functions in table select

    paulo.margarido (8/25/2016)


    ok, now can we go back to the discussion?

    You're confusing the purpose and capabilities of SQL Server with those of Excel.

    Use Excel for this.


    [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: Are the posted questions getting worse?

    Luis Cazares (8/23/2016)


    Gail, you just made my day with this answer. http://www.sqlservercentral.com/Forums/FindPost1811748.aspx

    I can't stop laughing. 😀

    On the bus on the way home. Now people I don't even know think I'm...


    [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: selecting top rows by counting a variable total

    drew.allen (8/18/2016)


    ChrisM@Work (8/18/2016)


    -- set up some data to code against

    DROP TABLE #MyTable

    SELECT *

    INTO #MyTable

    FROM (

    SELECT 123, 1 UNION ALL

    SELECT 456, 2 UNION ALL

    SELECT 789, 1 UNION ALL

    SELECT 789, 2 UNION...


    [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: Re-ordering a Sequence

    CELKO (8/17/2016)


    I apologize for this half answer, but in some of my books I have an update statement that uses a case expression (not a case statement, please?) To move...


    [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 Plan Question

    Ed Wagner (8/17/2016)


    I know this may seem elementary, Brandie, but check the data types of the columns involved in your predicates - in both the JOIN and WHERE clauses. ...


    [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 - 76 through 90 (of 1,228 total)