Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: capronton
  • Content: Threads
  • Order by date
  1. capronton

    DateDiff not calculating negative value

    When {apc_correlated.sched_time} > {apc_correlated.close_date_time} I should get an "Early" value but I do not. Can someone explain why DateDiff does not give me values less than 0? If DateDiff ("s", {apc_correlated.sched_time},{apc_correlated.close_date_time} ) < 0 then "Early" else If...
  2. capronton

    Suppress records where log.scheduleTime = trip.endTime

    I would like to suppress records in two different tables. I put the code below in "detail section expert" and it is not working. Can someone assist? {incident_log.sched_time} = {trip.end_time}
  3. capronton

    Left Outer Join Syntax error

    Can someone explain why the query below is getting the syntax error below? How could I re-write this query to do a LEFT OUTER JOIN on the fields/columns below? [SQL]: select ts,tr.type,et.text,tr.n,tr.loc_n,bus,drv,run,route,ttp,grp,des,seq,tpbc,longitude,latitude,tr.fs,amt FROM tr LEFT OUTER...
  4. capronton

    How to join Excel Spreadsheet table &quot;Date&quot; field to MS SQL Server &quot;Date&quot; field

    I need to join the two "times" below. I have already joined the "number" fields in the Excel Spreadsheet that I imported into the Crystal Report, however I cannot join the "Date" field. Any idea on how to join Excel Date with MS SQL Server Date? In the EXcel Table that I import into Cystal...
  5. capronton

    Convert IF statement to CASE statement

    How would I convert to the IF statement below to a CASE statement? Thanks in advance for any assistance. If {command.current_route_id} = 103 and {command.direction_description} like "*SOUTH*" and {@earlyLate} = "Early" and {command.tp_id} = 12790 then 15 else If {command.current_route_id} =...
  6. capronton

    Select minimum or first bus arrival time

    I am trying to select the minimum or first arrival time of a bus. Is it possible to put the statement below in the "Select Expert" or in a "Command View" object? How can you select the minimum or first arrival time of a bus grouping by bus? Select Minimum ({incident_log.incident_date_time}...
  7. capronton

    How to shift field down one row

    Is there a way to shift "actHdwy" field down one row? actHdwy schHdwy hdwyDev cmta_Status 14 15 -1 OnTime 15 15 0 OnTime 16 15 1 OnTime 14 15 -1 OnTime 15 15 0 OnTime 15 15 0 OnTime 15 15 0 OnTime 15 15 0 OnTime 15 16 -1 OnTime 14 14 0 OnTime 11 14 -3 OnTime 10 11 -1 OnTime 11 11 0 OnTime 12 11...
  8. capronton

    Subtract previous minimum time from current minimum time

    I'm using the formula below to calculate "actHdwy". However the formula places the "actHdwy" next to wrong vehicle. For example, vehicle 5005 does not have "actHdwy" of 11 minutes, bus 5007 should be 11 minutes. Vehicle 5017 should be 19 minutes, vehicle 5008 should be 11 minutes, 5013 should...
  9. capronton

    Right Outer Join syntax error in &quot;Command&quot; object

    I'm trying to pull all the records in the headway_log table whether there is a matching record in incident_log table or not. Can someone tell me why I get an error in the right outer join below. Thanks for any assistance. select a.sched_version...
  10. capronton

    Force record sort and ignore group sort

    The data set below has the correct sort, however when I refresh the data it uses the group sort and disrupts any calculations I have made on the data sorted as you see below. Also when I choose "original order", this also sorts the data in a way that disrupts calculations. Can I use specified...
  11. capronton

    Subtract previous field value from group of records

    I have grouped by bus and want to subtract the first record in the group from the first record in the next group. Even when I move the fields from detail to the Group Header and the duplicate records are not visible the previous function continues to subtract the non-visible records. Any ideas...
  12. capronton

    Create SubQuery with Union Query

    How can I incorporate the SubQuery listed below into the Union Query listed below. I am trying to pull in the minimum incident_date_time. SubQuery ---(SELECT MIN(incident_log.incident_date_time) FROM incident_log) Union Query SELECT day_type_vs.description, incident_log.sched_time...
  13. capronton

    Need to keep the first record and filter out other duplicate row

    How can I keep the First Row in the data set and filter out the other rows with duplicate "schTime"? I would prefer to filter the rows from the dataset, but if suppressing the rows is the best option that would be okay too. Thanks for any help with this! tDate incTime schTime startTrip...
  14. capronton

    Hard Code FixedTime

    I am trying to set up a condition to check if the current time is greater 8pm. How can I code the "8pm" in the if statement below? If currentTime > 8pm then "No" else "yes
  15. capronton

    Calculate Headway Deviation

    I have the data set below and I would like to calculate headway deviation (actual headway - schedule headway) tDate [/indent]incTime schTime bus HeadwayDeviation 3/23/16 6:39:30 6:37 5015 ? 3/23/16 6:47:30 6:49 5012 ? 3/23/16 7:02:30 7:01 5007 ? 3/23/16 7:34:30 7:26 5022 ? 3/23/16...
  16. capronton

    Keep first and last record for each bus and suppres all other records for each bus

    I would like to suppress all records between the first Pull Out record and the last Pull In record for each bus in the data set below. For example, how could I suppress row 2, 3,and 4, but keep row 1 and row 5 for bus 2253 in the data set below? tDate incTime schTime bus blk incName...
  17. capronton

    How can I put pull-out and pull-in time on the same row?

    I have the data set below. How can I put pull-out and pull-in time on the same row? VEHICLE ID Block ACTUAL TIME TRIP TYPE 2201 1002 1:02:46 Pull In 2201 1002 4:10:38 Pull Out 2208 1001 4:20:44 Pull Out 2208 1001 23:15:00 Pull In 2211 1010 5:35:20 Pull Out 2216 1010 18:29:48 Pull In...
  18. capronton

    How can I select the minimum time in complicated query?

    In select expert query below I only want the minimum "time" record. {day_type_vs.description} = {?ServiceType} and {incident_log.incident_log_id} Mod 2 = 0 and ({timepoint_name.tp_lname} in {?TP_ID} or " ALL" in {?TP_ID}) and {incident_log.current_route_id} = {?CurrentRoute} and...
  19. capronton

    Add &quot;ALL&quot; selection parameter

    Does anyone know how to add the "ALL" selection parameter so the user can select "ALL" choices without having to use the double arrows (>>)? Please see attachment. Thanks for any assistance.
  20. capronton

    Can someone explain how the &quot;&quot; is creating filter in this formula

    I was filtering the end_tpid in the select expert as shown below: {garage.garage_description} = {?Garage} and {incident_log.incident_log_id} Mod 2 = 1 and {incident_types.incident_name} = {?IncidentName} and {incident_log.current_route_id} = {?CurrentRoute} and {incident_log.incident_date_time}...

Part and Inventory Search

Back
Top