Forum Replies Created

Viewing 15 posts - 6,136 through 6,150 (of 10,144 total)

  • RE: aggregating result set problems

    dwain.c (7/2/2012)


    ChrisM@Work (7/2/2012)* You still have tables neoset_statisticsLocationTypesLangs and neoset_statisticsLocation_types_jt in your

    FROM list, even though neither are referenced in the output, or by any joins, or the WHERE clause....

  • RE: Contentious SP

    Just a hunch Les, but have you tried replacing the delete & update with MERGE?

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

    -- Delete any previous record from today

    -- Close out the previous record

    MERGE CollectorTransitionHistory AS [target]

    ...

  • RE: Using CASE to create SQL Statement

    Sean Lange (7/2/2012)


    ChrisM@Work (7/2/2012)


    Sean Lange (7/2/2012)


    You will find far better performance and code maintenance by creating a sproc for each of your different select statements. The code dwain posted is...

  • RE: Using CASE to create SQL Statement

    Sean Lange (7/2/2012)


    You will find far better performance and code maintenance by creating a sproc for each of your different select statements. The code dwain posted is indeed quite a...

  • RE: Breaking a String apart

    Yep.[/url]

  • RE: Find Member with 12 months consecutive range

    SELECT *

    FROM #Sample s

    CROSS APPLY (

    SELECT ClaimCount = COUNT(*)

    FROM #Sample

    WHERE [Member ID] = s.[Member ID]

    AND [Date of Service] >= s.[Date of Service]

    AND [Date of Service] <=...

  • RE: APPLY vs JOIN (the differences with a focus on APPLY)

    Ted_Kert (7/1/2012)


    Is the benefit of OUTER APPLY and CROSS APPLY that you don't need an ON clause? I don't really see why these are different from LEFT OUTER JOIN...

  • RE: Database Design for Hospital Management

    Jigneshal (7/2/2012)


    MysteryJimbo (7/2/2012)


    Jigneshal (7/2/2012)


    Hi,

    I want to create a database for hospital management system.

    but i dont have much idea to design db. Can anyone help creating db for hospital management.

    It will...

  • RE: aggregating result set problems

    mixalissen (7/2/2012)


    This problem has been bugginh me since friday! After a good weekend I managed to find the solution 🙂

    ALTER VIEW [dbo].[neoset_dailySalesManReport]

    AS

    SELECT distinct TOP (100) PERCENT s.contentid,...

  • RE: aggregating result set problems

    Those two rows with contentid = 1, which have a different furniturelocation: which other columns are different between the two rows?

    Avoid using ORDER BY in views. If you check the...

  • RE: Ordered group by

    _simon_ (7/1/2012)


    I want my results to be grouped, your query is totally correct. I was just curious if there is any reason behind the decision, that you used dense_rank() instead...

  • RE: UDF

    Using an inline function may help somewhat. Here's the definition of your existing splitter:

    --User Defined Function (InLine)

    CREATE FUNCTION dbo.Split

    (

    @RowData nvarchar(2000),

    @SplitOn nvarchar(5)

    )

    RETURNS @RtnValue table

    (

    Id int identity(1,1),

    Data nvarchar(100)

    )

    AS...

  • RE: UDF

    Phil Parkin (6/29/2012)


    ChrisM@Work (6/29/2012)


    If you'd said "less than 6" then you would have had alternatives options to a function. With a maximum of about 50 items in the list, then...

  • RE: UDF

    If you'd said "less than 6" then you would have had alternatives options to a function. With a maximum of about 50 items in the list, then I reckon you...

  • RE: UPDATE with CASE Statement not updating all Records

    Welsh Corgi (6/29/2012)


    It is a Simple Query. I just wanted to get the record counts right before I added a bunch of CASE Statements.

    As soon as I add the first...

Viewing 15 posts - 6,136 through 6,150 (of 10,144 total)