Forum Replies Created

Viewing 15 posts - 2,341 through 2,355 (of 6,036 total)

  • RE: parameters = NULL

    It only confirms that such a lame database design is not good enough for you.

  • RE: parameters = NULL

    What you need is a clusted index on [DW_PROD].[dbo].[SPF053_SALES] (dwyear, dwweek, dw_dow, dwstore)

    Then your query will return results instantly.

    But schedule index creation for weekend: on a table with 900 mil...

  • RE: Delete thrashed Header Record

    Check for triggers on the table.

  • RE: Random Updates of rows

    the original poster wanted to keep the same set of values in the ID column

    IDENTITY property on ID column suggests otherwise.

  • RE: Select rows based on 5min interval

    Can you explain this sequence?

    18271999 2010-08-03 07:49:00.000

    18271988 2010-08-03 07:51:00.000

    And what should happen after 08:05:00.000?

    Should the next record be after 08:10:00.000?

    Or should it be the first record of the next 5...

  • RE: INSERT NULL

    Answer on both questions - yes.

  • RE: group by help... pls

    This should be more effective:

    select main.sno, main.name, L.address

    from main

    inner join (

    select sno, max(loca.address) address

    ...

  • RE: export to csv file from table

    You might also wish to consider using osql or isql for exporting files with headers.

    Check BOL for details and syntax.

  • RE: SQL Decides to NOT Use My DISTINCT Clause. Why?

    DISTINCT is not a silver bullet.

    It's quite opposite.

    I'd suggest not to use it in production code at all. Ever.

    DISTINCT/GROUP BY is applied after all joins and WHERE clause.

    If you have...

  • RE: Order By in function???

    Can you post full text of procedure f_StockItemDepoQuantitySelect?

    Or at least first 70 rows, where the error happens.

  • RE: Trigger to populate a column

    Remove trigger "using inserted". You don't need it.

    Use "using deleted" only.

    Put

    SELECT * FROM inserted

    SELECT * FROM deleted

    into the trigger code.

    Those table exist only while trigger is running and...

  • RE: Is there a Do While loop?

    I believe both solutions are identical and work perfectly for the request.

    Only issue I can see here is that Ken@Work did not bother to read and understand either of them.

  • RE: insert XML data into MS SQL 2000

    And though you cannot declare a variable longer than 8000 characters in SQL2000 you still can declare a SP parameter with type "text" ot "ntext".

    Then you can pass the whole...

  • RE: Rollback statement missing

    Did you check the flow?

    What's gonna happen if the first statement returns an error?

    Your code will rollback transction and continue - then what?

    This way it should work:

    SET NOCOUNT ON;

    DECLARE @ErrNo...

  • RE: Need Expert advice on my sql query for speed improvement

    Use Wayne's advice for WHERE clause and make sure yout table is built like this:

    CREATE TABLE [dbo].[Log_Transactions] (

    [LogID] [int] IDENTITY (1, 1)...

Viewing 15 posts - 2,341 through 2,355 (of 6,036 total)