Forum Replies Created

Viewing 15 posts - 301 through 315 (of 1,228 total)

  • RE: select house_no order

    Each one of your five current threads

    select quarie between houseno ..........

    select house_no order

    select only up to first '-' only

    display order by like 1,2,3,4,5...............plz write quarie

    display order by houseno

    relate 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: select quarie between houseno ..........

    shashianireddy (12/15/2013)


    i have table like below

    House_No

    4-12-1000

    4-12-55/b

    4-12-1456/b/c

    4-12-12

    4-12-1398

    4-12-23

    4-12-98

    4-12-1499

    1-4-33

    3-9-55

    2-5-89/3

    Each one of your five current threads

    select quarie between houseno ..........

    select house_no order

    select only up to first '-' only

    display order by like 1,2,3,4,5...............plz write...


    [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: I have multiple identifier Could not be bound when I use ROW_NUMBER()

    bkshn (12/14/2013)


    Hello

    I think I use it in from statement

    FROM exhibitor.dbo.maintable INNER JOIN #temp1

    isn't it?

    There's quite a lot wrong with your statement. Here's a brief analysis:

    declare @string nvarchar(MAX)

    declare ...


    [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: split column into multiple records based on substring fixed lenght

    SELECT x.*

    FROM TableA

    CROSS APPLY (

    SELECT cust, SUBSTRING(wptext, 1, 80), 1 UNION ALL

    SELECT cust, SUBSTRING(wptext, 81, 80), 2 UNION ALL

    SELECT cust, SUBSTRING(wptext, 161, 80), 3 UNION ALL

    SELECT cust,...


    [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: display order by like 1,2,3,4,5...............plz write quarie

    shashianireddy (12/7/2013)


    the first method is ok but ..... it works only if housenumber is integer only ...

    it shows error when housenumber mixed wit varchar .............

    plz write the code...


    [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: How to Design, Build and Test a Dynamic Search Stored Procedure

    Jeff Moden (11/5/2013)


    Phil Parkin (11/5/2013)


    Dwain does it again - nice article sir!

    Ditto that! Nicely done, Dwain. Great explanations and revelation of code.

    I'll second that - and give credit 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: what is the best way instead of using cursor?

    elham_azizi_62 (11/5/2013)


    hello all.

    I need to use nested cursor for 5000 record,but it doesn't work correctly and stoped.what is the best way instead of using cursor when we have lots of...


    [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

    Fix your join:

    left join VoucherType vt on vt.VoucherTypeCode = vt.VoucherTypeCode

    Comment out the date filter and rerun the query.


    [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: Performance of the SQL MERGE vs. INSERT/UPDATE

    Thanks Dwain for another informative and well-written article. It wouldn't surprise me if the discussion provoked a significant rewrite with more use cases, based on posts so far.


    [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: Performance of the SQL MERGE vs. INSERT/UPDATE

    adnan.korkmaz (10/28/2013)


    Nice comparison.

    On the other hand, it could be better to see physical table performance comparison instead of / in addition to temporary tables.

    There's unlikely to be much difference.


    [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 performance vs server to server latency

    Sean Pearce (10/10/2013)


    /* ON THE SERVER phlsql */

    CREATE PROCEDURE dbo.FetchData

    AS

    SELECT sam_batch, SUBSTRING(sam_phonenumber, 4, 9) AS phone

    FROM capabilities.dbo.aww_sample

    WHERE sam_batch BETWEEN 437 AND 449;

    GO

    /* ON THE SERVER p42 */

    CREATE TABLE #Results (sam_batch...


    [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 record from group

    paulcauchon (9/13/2013)


    ChrisM@Work (9/13/2013)


    ...

    Paul - if you order the output by AutoID, it all becomes clear. There's a description of how the method works here[/url]. The inventor, as far as I...


    [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 record from group

    paulcauchon (9/12/2013)


    I see the hitch up here...you need to see the min date and max date from each of the consecutive color/ID group pairings.

    Originally, we had been treating the grouping...


    [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 records from an associated table

    SQLTestUser (9/12/2013)


    The relationship stems through the Associated Table so the associated table has the corresponding values for the first table. Did that answer your question ?

    Not really, it's too vague....


    [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: making records unique

    ChrisM@Work (9/12/2013)


    What results do you get from this query?

    ;WITH Deleter AS (

    SELECT

    ID,

    rn = ROW_NUMBER() OVER(ORDER BY Postcode,BuildingName,housenumber,SubBuilding,County,Town,

    LocalName,PostOutCode,PostInCode,Throughname,Throughdesc,poboxno,BusinessName,locality)

    FROM PostCodesAndAddressesBt

    )

    SELECT *

    FROM Deleter

    WHERE rn > 1

    I think he...


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