Forum Replies Created

Viewing 15 posts - 301 through 315 (of 790 total)

  • RE: Schema Help

    Groovy,

    Maybe, to enforce your rules, a schema such as:

     
    
    CREATE TABLE Book (
    ID INT IDENTITY PRIMARY KEY,
    Book_name...
  • RE: Query Performance within Stored Procedure

    As a start, you can trace it with SQL Profiler.

    Trace Event: SP:StmtCompleted

    Trace Columns: default + databaseid + objectid

    Filters: databaseid = <your database id>, objectid = <object id of the...

  • RE: full text search - embedded dots

    Not only that, it's after lunch Friday.

    Cheers,

    - Mark

  • RE: full text search - embedded dots

    It would work the other way around. Depends on whether it's going to break your app if you remove the dots prior to issuing the search. Eg.

  • RE: Generating SQL scripts on the fly

    Yes, as far as I know, sp_executesql is the best way to go.

    Alternatively, use EXECUTE (<someString>) to achieve the same sort of thing.

    Just wondering.... do you really have to have...

  • RE: Has Indexed View Materialized?

    You can use the NOEXPAND hint in the query.

    eg. SELECT * FROM MyIndexedView (NOEXPAND)

    If the view is materialised you see an entirely different (and simpler) query plan.

    If the view...

  • RE: Temp Table errors

    Or, going back to your original idea of a string variable....

     
    
    create table #ThisTable (
    a int not null,
    ...
  • RE: Temp Table errors

    Difficult question. It CAN be done, but it's not an ideal solution. The example below will acheive the aim (in a very ugly way), using SQL's automatic creation...

  • RE: Mirroring SQL databases ...

    I would suggest log shipping, but I take it both of your databases will be subjected to updates - will they?

    Cheers,

    - Mark

  • RE: QOD 11 Sep 2003

    I thought it was a good question, and very relevant to common DBA troubleshooting activities.

    Cheers,

    - Mark

  • RE: What did you do before SQL?

    Frank's recent "Brief History of SQL" article brought back bad memories.... SQL/DS.

    Am I showing my age? Lucky I've kept it a closely guarded secret.

    And before that, I...

  • RE: Execution Plans

    I'm with jeffwe. I suggest doing an update statistics on both tables, then re-trying the execution plans.

    Cheers,

    - Mark

  • RE: Converting SQL 6.5 database to 2000

    On occasions when I didn't want to go the "upgrade" route I would:

    1. create the db under sql2000

    2. script all objects under 6.5

    3. execute the script on sql2000

    4. use dts...

  • RE: a lot of count()s

    an example:

     
    
    SELECT
    Null_discounttype = SUM(CASE WHEN [discounttype] IS NULL THEN 1 ELSE 0 END),
    Null_stor_id =...
  • RE: Using Cursor to SET local variables

    You're declaring but not initialising @LruListOut and @CurOut. They are NULL after declaring them, and any subsequent operations where they are one of the operands will also return NULL.

    SET...

Viewing 15 posts - 301 through 315 (of 790 total)