Forum Replies Created

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

  • RE: Help with SELECT Statement

    One possibility and possibly the simplest is:

    update

    r

    set

    Status = isnull(

       (

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: date as int

    Is it a genuine day-series integer, where +100 means +100 days, or is it integer storage of concatenated values, e.g. 20053101? If it looks like dates it is the latter.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Using Quoted Field Delimiters

    No problem. I should have explained - for others if not you - the column in question holds the field terminator for that field. For the last field, that typically...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: I want to copy data from one table to ....

    If you often need to join on a lot of columns you may find that an indexed calculated column defined as checksum(*) is more convenient than an index on...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Loading files into table

    Since this is the TSQL board and since this is presumably an admin rather than production task [edit: I'm thinking of security issues in particular], I'll suggest

    select...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Using Quoted Field Delimiters

    That's part of my signature, not directed at you. It's starting to annoy me now actually; I think I'll get rid of it. Apologies for the confusion. I should have put some...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Use SET TRANSACTION ISOLATION LEVEL in Views

    A view definition can only consist of a single (possibly very complicated) SQL statement.

    IF (you have to avoid reserving or respecting locks AND you don't mind retrieving inconsistent data) OR the data...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Trigger Order Of Execution?

    This almost certainly is to do with the original order of execution (of which there must have been one, even if we don't know what it will be).

    One of the statements...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Using Quoted Field Delimiters

    8.0

    17

    1 SQLCHAR 0 1 "" 0 quote ""

    2 SQLCHAR 0 8000 "\",\"" 2 fldDate ""

    3 SQLCHAR 0 8000 "\",\"" 0 Col002 ""

    4 SQLCHAR 0 8000 "\",\"" 0 Col003 ""

    5 SQLCHAR...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Calculating the time difference between consecutive records in a RecordSet

    Those queries aren't equivalent. The column you are calling 'task' is supposed to be unique. So your use of it in the subquery should mean that the query returns no...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Deriving financial years

    OK - sorry for my curtness.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Calculating the time difference between consecutive records in a RecordSet

    Yes.

    I could perhaps have guessed that by rereading your original post, but putting time into speculative answers which are potentially irrelevant is beyond the call of duty as far...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Calculating the time difference between consecutive records in a RecordSet

    Yes. The query is working fine, but every record is in a group of 1. You need to decide what you are grouping on - probably whatever entity it is...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Deriving financial years

    You could at least read a post before you include it in blanket criticism. There's no temp table in my solution. That's for test data. The counterpart of Ryan's code...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Calculating the time difference between consecutive records in a RecordSet

    >Nagabhushanam Ponnapalli - your query works perfectly. But ideally, I'd like to wrap it up in a query without using a temp table - a bit like how Sergiy...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • Viewing 15 posts - 61 through 75 (of 582 total)