Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 2nd, 2011, 08:03 AM
cmorse723 cmorse723 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 8 cmorse723 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 56 m 58 sec
Reputation Power: 0
Parameter query to give a result if meets requirements

Code:
SELECT Cluster_Owner_Lookup.Cluster_Owner
     , Ticket_Data.Number
     , Ticket_Data.Asset
     , Ticket_Data.Open_Time
     , DATEDIFF("d",Ticket_Data.Open_Time,NOW()) AS Age
  FROM Ticket_Data
INNER
  JOIN Cluster_Owner_Lookup
    ON Cluster_Owner_Lookup.Asset = Ticket_Data.Asset
ORDER 
    BY Cluster_Owner_Lookup.Cluster_Owner;


This is my code so far, its to select Number, Asset, Open Time, calculate the age of a ticket, and also lookup a owner of the ticket based on a lookup table.

What i need it to do now is give me a range of the age so say if the ticket is 310 days old that the result should be >300 in the new column showing all the tickets with their new respective range.

My ranges should be 0-100, 101-200, 201-300, >300.

Would i start with a Like expression?

Btw this is in Microsoft Access right now

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Parameter query to give a result if meets requirements

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap