Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

SQL


  • Please log in to reply

#1
Simmy

Simmy

    Member

  • Member
  • PipPip
  • 27 posts
Hi,

I am doing a query to select wearers by size from a wearer table.
I need to display + or - a half size for each wearer i.e. if they are a size 7 then i need to display 6.5, 7, 7.5.

I am thinking and trying it with a case statement.
Would this be a good idea or is there ant better ways?

Thanx a lot.

Simmy.
  • 0

Advertisements


#2
Ctrl_Alt_Del

Ctrl_Alt_Del

    Member

  • Member
  • PipPip
  • 74 posts
Just loop through the returned recordset and add the half sizes to the return values.

If your recordset is rsSizes and the return column is sizes

SmallHalf = Cstr(Val(rsSizes("sizes").value)-1) & ".5"
RegularSize = rsSizes("sizes").value
LargeHalf = rsSizes("sizes").value & ".5"


You could actually even do this in the query. If your size is numeric

Select (Size-.5) as SmallSize, Size, (Size + .5) as LargeSize from tablename

Edited by Ctrl_Alt_Del, 08 July 2005 - 03:21 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP