Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)

  • RE: Merge queries

    Thanks Al for your explaination 🙂

  • RE: Merge queries

    Yes, thanks Mark. Its what I need, just remove the parameter 'ReceivedDate'.

    Place_ID AllAvai Today Tomorrow

    1201

    2211

    3000

    4000

    Hi Alzdba,

    I'm taking time on functions DATEADD and DATEDIFF. Yes, really I also feel my subtraction...

  • RE: Problem with top record

    OMG, sorry for this silly question, I just ran small database, so all results returned 00:00:00.

    Using datediff is easy.

  • RE: Problem with top record

    Oh, Lutz, you're master. So many things to learn, I'm taking time on them. By the way, how to get the exact time when executing a query (to compare the...

  • RE: Problem with top record

    Ouch, I think I understand something from Harin's code. He lists all the number available from 1 to 999999, then puts them in a range between min and max Invoice...

  • RE: Problem with top record

    In my view, the perfect answer here is based on most requests that want to know all the missing codes. Like Harin's solution or this article:

    http://www.sqlservercentral.com/articles/SQL+Puzzles/findinggapsinasequentialnumbersequence/2336/

    But Lutz, your...

  • RE: Problem with top record

    First, I wish Lutz, Harin and other members a new year full of health and joy 🙂

    Thank Lutz again, with your solution, now I know how to refer to other...

  • RE: Problem with top record

    Thank LutzM, your keyword "sequence gaps" is really useful for me.

    But how can I have the result like this:

    Invoice_Code | Missing_Code

    1 ...

  • RE: Problem with date type

    Hm, might I take some advice from you, Jeff 🙂

  • RE: Problem with date type

    OK, thank Kingston, Subquery is not new to me, but Table variable. And I think the important thing here is to create 2 alias names to compare, good idea with...

  • RE: Problem with date type

    Kingston, would u mind explaining me more about "tmp_inn" (maybe Temporary objects) ? Any link talks about it's usage.

    Thanks.

  • RE: Problem with date type

    Yes, Wayne, thank for your sharing.

    I also think that to look another way to solve it rather than writing ROW_FUNCTION() in SQL 2000 (not feasible with my little skill).

    I know...

  • RE: Problem with date type

    Really? I tried your code and it works correctly. With just my 5 records, I dont find the error.

    DECLARE @tblTemp TABLE

    (

    Patient_code...

  • RE: Problem with date type

    Yes, Lynn, it works. But just on my Laptop. On my office's desktop, there's a Error Message:

    'row_number' is not a recognized function name.

    Both my laptop and office's desk are installed...

  • RE: Problem with date type

    Thank Lynn but your solution still has problem. Now when Anna returned to the clinic on the other day, her status is New while it must be Return.

    20 ...

Viewing 15 posts - 1 through 15 (of 16 total)