Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008
    Posts
    2

    Text field max number as integer in sql query of MS Access

    I have a table, empno as a field with text datatype..


    when i store the data it store like wise

    Actually my customer has more than one site like 7005,7002 etc.,
    so am storing the value 7005/101 where 7005 is site id and 101 is reference number
    if it is for 7002, we are storing 7002/101 like wise
    so now what am doing is

    7005/101
    7005/102
    .......
    ......
    7005/999

    from the above am getting the the maximum one
    i wrote the query like that
    "select max(eno) from the table "
    it gives 7005/999
    after storing the next record ie) 7005/1000
    am not able to get the maximum, that is 7007/1000 for this query "select max(eno) from the table "
    it fetch onle 7005/999....

    Please also check my post at sqlteam forum http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=112242
    and http://forums.microsoft.com/MSDN/Sho...iteID=1&mode=1

  2. #2
    Join Date
    Oct 2008
    Posts
    2
    select max(Cint(replace(id, '/','') )) from employee worked

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Split text field into two text fields
    By Grant in forum Access
    Replies: 6
    Last Post: 01-31-2008, 05:52 AM
  2. Quick way to stuff field names into text field
    By kfinpgh in forum Programming
    Replies: 0
    Last Post: 01-04-2007, 01:13 PM
  3. exporting text produces a number
    By greend in forum Import/Export Data
    Replies: 0
    Last Post: 07-12-2006, 03:55 PM
  4. Replies: 1
    Last Post: 06-09-2006, 05:44 PM
  5. Concatenate two fields (text & number) for key field
    By Larry Elfenbein in forum Forms
    Replies: 2
    Last Post: 11-10-2005, 07:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums