+ Reply to Thread
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 38

Thread: Design help-can this be done?

  1. #11
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Maybe about a month -- tho is was done in Oracle, Coldfusion and Javascript.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  2. #12
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Ok, trying to estimate a completion date/time. I will be using sql2000 and asp. Wish me luck! I'm gonna need it.

  3. #13
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Luck.

    I usually get the question "We need a Forecast to Actual comparison web site. How many hours is this going to take?"
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  4. #14
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Hi W0lffy,

    so you mentioned earlier you kept tables separate, can you take alook at screenshot...you mean like the ones on the left vs the one on right, correct?

    Also, I will have the Region and Location tables as JMH suggested but won't I need RegionID in the actual/forecast table(s) so I can sum values by region?

    Thanks!

    hey jmh,
    you had this listed:
    Code:
    Regions
    RegionID | Region
     
     
    Locations
    LocationID | Location
     
     
    LocationsInRegions
    RegionID | LocationID
    
    but is there anything wrong with doing this?
    Code:
    Regions
    RegionID | Region
     
     
    Locations
    LocationID | Location | RegionID
    
    Attached Images
    Last edited by Rebelle; September 18th, 2009 at 02:30 PM. Reason: added question for jmh

  5. #15
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    You can determine the Region by the Location by doing a JOIN. So there is no need to store the RegionID in the table as well.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  6. #16
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Might I add, that I'm against using two separate tables...not that it doesn't work, it's just a preference that tables that hold the same data (same column names) shouldn't need to be duplicated.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  7. #17
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    You will probably find it easier to store the Year and Month values as integer rather than a single datetime value. It will allow you to join on these fields and it work semantically when referring to the April 2009 estimate.

    Value is a reserved word. Probably don't want to use it for a field name (tho I sure have in the past)

    Yes, I like the tables on the left. To get to your report then, you would a join something like:
    Code:
    Select F.Year, F.Month, F.LocationID, F.JobDescID
      F.[Value] as ForeCast, A.[Value] as Actual
    From tblForecast F
    Left Join tblActual A
     On (F.Year = A.Year AND F.Month = A.Month 
      AND F.LocationID = A.LocationID And F.JobDescID = A.JobDescID)
    
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  8. #18
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Wolffy,

    On the Actuals and Forecast tables I have the Date(date/time-mm-dd-yyyy) value vs Month and Year, is this ok or should I change it to Month(int) and Year(int)?

    I am testing and made view/query in sql but I'm not sure how/what my results should look like to make it easy to display on how I want it on the asp web page? currently shows as for location 1:
    Code:
    LocID-LocName-JobCatID-JobCat-ActualDt-ActualVal-RevenueDt-RevenueAmt
    	1	Australia	1	FieldDD	1/1/2009	11	1/1/2009	1902
    	1	Australia	2	FieldLWD	1/1/2009	22	1/1/2009	1902
    	1	Australia	3	FieldSDL	1/1/2009	0	1/1/2009	1902
    	1	Australia	4	FieldADT	1/1/2009	0	1/1/2009	1902
    	1	Australia	5	FieldMLT	1/1/2009	2	1/1/2009	1902
    	1	Australia	6	FieldUBA	1/1/2009	0	1/1/2009	1902
    
    This query only contains the actuals atm, haven't yet added data for the Forecast.
    Last edited by Rebelle; September 25th, 2009 at 03:35 PM.

  9. #19
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    After further thought, store the date values as DateTimes, but then use the Month() and Year() functions in the queries and in the reports.

    Not sure what your data means -- what do the fields ActualVal and RevenueAmt mean?

    For each record will ActualDt and RevenueDt be the same Month and Year? If not, in what Year/Month will it be reported?
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  10. #20
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Quote Originally Posted by Wolffy View Post
    After further thought, store the date values as DateTimes...
    Gee, why didn't I say that here? Design help-can this be done?
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


+ Reply to Thread
Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. Design/Logic Help
    By Rebelle in forum Database Design Help
    Replies: 5
    Last Post: March 24th, 2009, 02:05 PM
  2. Database Design
    By dtz in forum Database Design Help
    Replies: 15
    Last Post: March 13th, 2009, 08:55 AM
  3. help with form design
    By Ziggy in forum Microsoft Access
    Replies: 12
    Last Post: February 16th, 2009, 02:00 PM

Bookmarks

Posting Permissions

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

SEO by vBSEO