Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002
    Posts
    7

    Unanswered: Expression as criteria

    I have tables


    tbl_Last_Update
    Last_Update (dd:mm:yyyy hh:mm:ss)


    tbl_Imported_data

    Fields.....
    Create_stamp (dd:mm:yyyy hh:mm:ss)



    I need to create a view showing records from tbl_Imported_data where tbl_Imported_data.Create_stamp > tbl_Last_Update.Last_Update

    Problem is how to set criteria into the view.

    Expression 'Dmax("[Last_Update]","tbl_Last_Update")' as criteria works fine in MS ACCESS.

    Is there any solutions for SQLServer, how to set corresponding expression (referring to other tables or queries) as criteria ?

    Thanks in advance

    - Mark

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    What is the data type you are using datetime/smalldatetime/timestamp ?

  3. #3
    Join Date
    Nov 2002
    Posts
    7

    Data type

    rnealejr:

    What is the data type you are using datetime/smalldatetime/timestamp ?

    ---

    Data type is datetime.

    Thank a lot for your interest !

    BR,

    Mark

    ---

  4. #4
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249

    Re: Data type

    I am not sure, you may want something like this:

    select *
    from tbl_Imported_data
    where Create_stamp>
    (
    select max(Last_Update) from tbl_Last_Update
    )

  5. #5
    Join Date
    Nov 2002
    Posts
    7

    Smile Re: Data type

    ---

    I am not sure, you may want something like this:

    select *
    from tbl_Imported_data
    where Create_stamp> (select max(Last_Update) from tbl_Last_Update)

    ----


    This syntax works fine. THANK YOU !


    - Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •