Forum Replies Created

Viewing 15 posts - 166 through 180 (of 581 total)

  • RE: Getting old backup files from all drives

    You can use the search functionality in windows explorer. Not sure if you can script this as a Windows command batch, though.

  • RE: Join performance question

    Logically speaking, the join order per se is irrelevant to the optimiser, unless you use join hints or the force_order query hint, inwhich case the joins are performed in the...

  • RE: Determine which row is causing error

    You can't do what describe since a SQL statement is a transactuion which will succeed or fail as a whole.

    Changing the UPDATE to a SELECT would tell you whether the...

  • RE: Help with Split Proc

    You definitely don't need any sort of split function.

    The code you posted is fine, with the (optional) amendments I suggested above.

    Getting rid of the ISNULLs would definitely help. Locigally speaking,...

  • RE: Performance on full table scans

    If you do the scan often, and if the table's not too big, you could consider using DBCC PINTABLE on startup to ensure the table stays in memory. Be warned that this could...

  • RE: events in trigger

    The events to which DML triggers can respond are: UPDATE, INSERT, DELETE.

    A DML trigger may also cause any of these 'events' to occur, too, if it performs UPDATE, INSERT or DELETE...

  • RE: Flat tables

    All tables are flat. The question is whether the data in the table is itself flat. If the data isn't really flat but has been flattened to fit in a rectangular...

  • RE: Help with Split Proc

    Here's how I would change the first SELECT. As mentioned above, it would help if the zip columns could be compared without wrapping them in isnull(). What exactly are the rules...

  • RE: Help with Split Proc

    You only need to use split if you are forced to accept comma-divided strings by (a)circumstances beyond your control (pre-existing data, legacy system), or (b) the fact that it is impossible to...

  • RE: Need help with a Conditional Insert or Update statement

    Based on what i can deduce about your requirement, and if this is for single rows only, this would do it:

    pseudocode:

         update table1

        

         if rowcount is 0, insert table1

        ...

  • RE: using a date in a where clause without hardcoding it

    If you want to report data for whole calendar months, why not use

    datediff(month, salesDate, getdate())<6

    ?

  • RE: using a date in a where clause without hardcoding it

    Restriction to the current year means that too little data will be returned if the query is run before july.

    Use of datepart(month,...) means that dates outside the last 6-month (i.e. approx...

  • RE: Table Variable in SP?

    no problem.

  • RE: group by 1/2 hour

    declare

    @querylboundinc datetime, @queryuboundex datetime, @halfhourstart datetime

    declare @halfhour table(halfhourstart datetime)

  • RE: Table Variable in SP?

    Typo in your first INSERT statement. TBL_LINK_GROUP_OBJECT_OBJECTID has an S added to make TBL_LINK_GROUP_OBJECTS_OBJECTID.

    The error message and a look at the declarations section confirmed this was the case; a...

Viewing 15 posts - 166 through 180 (of 581 total)