none
Calling Sequence Number depends on Date. RRS feed

  • Question

  • Hi,

    I have a question (linq to sql), in a sql server table, having column Order Number which has integer datatype.

    This column has 1, 2, 3, 4, 5...    depends on the Current Date time.

    Eg., If database got a new record on that date,  column has 1, next time 2 ...

    01-24-2014 1

    01-24-2014 2

    01-24-2014 3

    01-25-2014 1

    01-25-2014 2...

    And also, need to get the sequence number for reference, so that will insert the value to another table.

    If question is not clear, let me know.

    Please help how to could accomplish using linq to sql.

    Thanks in advance.

    Vijayakumar G


    Vijayakumar G

    Monday, March 24, 2014 3:02 AM

All replies

  • Hi,

    >And also, need to get the sequence number for reference, so that will insert the value to another table.

    You are getting the sequence number for each different date. What else you need?

    Or do you just need the LINQ query?

     var li = from el in dbCollection
                         select new { el.Date, el.Sequence };

    What you need to insert to another table?


    One good question is equivalent to ten best answers.

    • Edited by Shyam Kr Monday, March 24, 2014 6:42 AM
    Monday, March 24, 2014 6:38 AM