Forum Replies Created

Viewing 15 posts - 2,536 through 2,550 (of 5,103 total)

  • RE: How can I pull out specific data from within the registry?

    Just a little warning:

    The registry keys for named instances are different than for the default

     

  • RE: Running Totals

    I think this is what you want:

    declare @startdate smalldatetime, @lookahead int

    select @startDate = '20051001', @lookAhead = 3

    -- select @startDate = '20051004', @lookAhead = 4

    select m.trade_date

      , m.ticker

         , IsNull(t1.qty, 0)...

  • RE: Error

    Happy to help

  • RE: Lowest cost in a record

    and as it was mentioned Don't forget to create an index on the computed column or the benefits will be marginal

     

  • RE: Count all Rows in all Tables

    my favorite method to achieve this is:

    dbcc showcontig with tableresults, no_infomsgs

    Look at the "ROWS" column where indid = 1

     

  • RE: Error

    The error you are getting is pretty self explanatory. The only valid operators that you can use for text fileds on the "where" clause are "LIKE" and "IS NULL"

    ex:

    select *...

  • RE: Optimizing query with LIKE

    Sure!

    There are many websites that for security reasons perform remaping of the urls depending to what pages you want to access and those modules are usually plugged in as http...

  • RE: Optimizing query with LIKE

    Just a warning: url parsing can be a tricky business specially in shops that use url remapping

     

  • RE: Resultset - Returning Last n Reocrds in Table

    if the table has only one column and you don't have any other indication unles the table is very very small as of this moment you can't tell what was...

  • RE: optimization x crash query

    First things first:

    1. Functions force row-by-row processing (use them sparingly)

    2. Make sure you have indexes in place that are being used by your where clauses, joins, group bys and order...

  • RE: trigger writing

    Not exactly sure what the logic is but here is what I believe you are trying to accomplish:

    CREATE TRIGGER dupcontcirc ON lecturer_email_during

    FOR INSERT

    AS

    if exists(SELECT * FROM

              INSERTED i join...

  • RE: Summarizing By Month - show all categories

    ex:

    declare @minDate datetime, @maxDate datetime

    select @mindate = '20030101', @maxDate ='20051020'

    select Y, M, CategoryName, Coalesce(V.Cnt, 0) TheCount

    from

    (select Month(dateadd(m, number, @mindate))  as M

            , Year(dateadd(m, number, @mindate))  as Y

    from master..spt_values

    where type...

  • RE: Speeding up a select count(*)

    Just guess why you were getting slower results I would bet that in the composite PK 'sdate' was not the First column. ORDER matters

  • RE: Views

    <<I tried deleting relationship from view but tht did not reflect in the daigram too. >>

    Correct Diagram Has to be refreshed / updated

    <<I understand that I can get my resultset...

  • RE: TRUNCATE TABLE followed by INSERT produces Primary Key Constraint Violation

    Not only this is a convertion issue you must also keep in mind that datetime is sql server has a limited resolution of 3ms, integers do not suffer from that

    Cheers,

     

Viewing 15 posts - 2,536 through 2,550 (of 5,103 total)