Forum Replies Created

Viewing 15 posts - 61 through 75 (of 117 total)

  • RE: Partitioning in SQL Server 2008

    Yes I meant a nonclustered index.

  • RE: Partitioning in SQL Server 2008

    Aligned index (separate indexes split by partition):

    create index ix_pt_index on partitioned_table (indexed_value)

    ON [ps_PartitionScheme](partition_key) --Name of partition scheme

    Non-aligned index (one index that covers all values across all partitions):

    create index ix_index on...

  • RE: Partitioning in SQL Server 2008

    SID (4/29/2009)


    Could you tell me how to over come performance issue when using order by clause partition table.I have created couple partition tables with partition indexes and when I ran...

  • RE: Partitioning in SQL Server 2008

    Have they created a GUI for you to see how your data is split among partitions in SSMS 2008? Before I just used a custom RDL report in SSMS 2005...

  • RE: Error on BEFORE UPDATE Trigger

    Check Constraints are good for validating field formatting or values.

    For example:

    SSN text field must have the format ###-##-####

    An integer field must be within the values 0-30

    A field cannot contain an...

  • RE: INSERT NULL values not allowed

    Sorry Slange already posted this.

    Gabriel P (4/14/2009)


    This also should work if you can't modify the table.

    INSERT INTO TABLE1 (

    Version

    , Type

    , Name

    , Description

    , Category

    )

    SELECT

    Version...

  • RE: INSERT NULL values not allowed

    This also should work if you can't modify the table.

    INSERT INTO TABLE1 (

    Version

    , Type

    , Name

    , Description

    , Category

    )

    SELECT

    Version = 1

    , Type = 2

    , Name...

  • RE: Error on BEFORE UPDATE Trigger

    You probably already know this, but make sure you can't achieve the same functionality with a check constraint - as that would function like a true "before" trigger.

  • RE: Top 1000 of each group in a table

    Also, I just noticed I don't have it in the code above, but there's a clustered index on the #nums table. That might be where the problem came in.

  • RE: Top 1000 of each group in a table

    tfifield (3/30/2009)


    I wouldn't use a numbers table on this type of query. I'd rather use a properly indexed calendar type table. I've found that they are very useful...

  • RE: Mirroring question

    I am guessing you are thinking in terms of clustering. Mirroring is not Clustering. Honestly, in my opinion it's not a viable solution for existing applications because it requires ADO.net...

  • RE: Top 1000 of each group in a table

    I figured it out in case anyone is interested.

    declare @first_month datetime, @last_month datetime

    select @first_month = DATEADD(m,DateDiff(m,0,Min(sale_datetime)),0),

    @last_month = DATEADD(m,DateDiff(m,0,Max(sale_datetime)),0)

    from #temp

    select n.n, t1.*

    from #nums n

    cross apply (select top 10 *

    from #temp

    where sale_datetime...

  • RE: Top 1000 of each group in a table

    I forgot to mention another thing, dynamic sql is strong opposed in this environment :angry:

  • RE: Top 1000 of each group in a table

    FYI I just realized I put top 1000 in the title. Please ignore that, it is misleading... I really meant top 10

  • RE: Top 1000 of each group in a table

    GSquared, I want to return 10 regardless if their are ties. The data set I gave you isn't realistic and has a lot more ties, but for the actual data,...

Viewing 15 posts - 61 through 75 (of 117 total)