Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2006

    Unanswered: Informix question

    Hey everybody.
    I have a simple query
    select gvwr from comm_veh where user_id=123

    the problem is that the gvwr field is not consistant
    the data that users have entered can have a value from 20 to 80000
    this is a weight value. All of the weights should be over 1000
    is there a way that I can multiply the gvwr field by 1000 for every entry that is less than a thousand?
    by the way the gvwr field is an integer
    Thanks for your help


  2. #2
    Join Date
    Aug 2005
    I'm not sure , if this is what you want:
    select gvwr*1000 from comm_veh where gvwr <1000 and user_id=123
    union all
    select gvwr from comm_veh where gvwr >=1000 and user_id=123

  3. #3
    Join Date
    Jan 2006
    Hate to say it, but it sounds like you have a serious data hygeine issue. Somehow I doubt that a simple *1000 if less than 1000 would make ANY kind of logical sense. If it does, you need to fix the values permanently, and then set some constraints.

    Jay Grubb
    Technical Consultant
    OpenLink Software
    Product Weblogs:
    Universal Data Access & Virtual Database Technology Providers

Posting Permissions

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