Forum Replies Created

Viewing 7 posts - 1 through 8 (of 8 total)

  • RE: GROUP BY and sub-query COUNT

    Lynn Pettis (4/29/2009)


    Give this a try:

    CREATE PROCEDURE ...............

    @LanguageID Int,

    @Type Int,

    @DateStart DateTime,

    @DateEnd DateTime

    AS

    BEGIN

    SET NOCOUNT ON;

    with ClientExitCount(

    ClientUrlID,

    ...

    Best regards,

    Carsten Petersen, Denmark

  • RE: GROUP BY and sub-query COUNT

    GSquared (4/29/2009)


    Hard for me to judge the thing without the definition of the second table and the view that you're querying.

    Sorry =)

    "ClientUrl" table:

    CREATE TABLE [dbo].[ClientUrl](

    [ClientUrlID] [int] IDENTITY(1,1) NOT NULL,

    [LanguageID] [int]...

    Best regards,

    Carsten Petersen, Denmark

  • RE: A Google-like Full Text Search

    Great post!

    Seams like there is a problem with special characters. When i search for a word like "hår" (danish word for "hair"), the Language Compiler will return: Invalid character: 'å'....

    Best regards,

    Carsten Petersen, Denmark

  • RE: Server Side Paging With SQL Server 2005

    What I've come up with until now. Any comments on it (performance etc.)?

    CTE Returns Primary Key, Row Number and Total Record Count to @PagerTable, and is joined with Source table.

    @RecordCount...

    Best regards,

    Carsten Petersen, Denmark

  • RE: Server Side Paging With SQL Server 2005

    jacob sebastian (3/16/2008)


    Try this

    ;WITH cte AS (

    SELECT

    name,

    count(*) OVER (PARTITION BY '') cnt,

    ROW_NUMBER() OVER (ORDER BY name) AS recID

    FROM sys.tables

    )

    SELECT name, RecID, cnt

    FROM cte WHERE RecID BETWEEN 5 AND 10

    Thats...

    Best regards,

    Carsten Petersen, Denmark

  • RE: Server Side Paging With SQL Server 2005

    jacob sebastian (3/16/2008)


    Did you try the "COUNT(*) OVER(PARTITION BY '')" option suggested by Matt, earlier in this thread? This will give you the recordcount.

    I tried 🙂 The problem is (example...

    Best regards,

    Carsten Petersen, Denmark

  • RE: Server Side Paging With SQL Server 2005

    I'm using a similar SP for Paging and Sorting. I use a slightly different sorting routine, "@OrderBy" is supplied as a integer.

    Since I'm developing in C# / NET, I'm...

    Best regards,

    Carsten Petersen, Denmark

Viewing 7 posts - 1 through 8 (of 8 total)