If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Informix question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-03-06, 18:22
boku boku is offline
Registered User
 
Join Date: Feb 2006
Posts: 1
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

Rob
Reply With Quote
  #2 (permalink)  
Old 02-04-06, 19:07
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
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
Reply With Quote
  #3 (permalink)  
Old 02-06-06, 15:21
John Grubb John Grubb is offline
Registered User
 
Join Date: Jan 2006
Posts: 27
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
Web: http://www.openlinksw.com:
Product Weblogs:
Virtuoso: http://www.openlinksw.com/weblogs/virtuoso
UDA: http://www.openlinksw.com/weblogs/uda
Universal Data Access & Virtual Database Technology Providers
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On