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 Mike Lewis 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: *

  1. LMGroup

    Conditional sorting with group and multiple fields

    I just created several more formulas to cover the extra sort fields and added them into the record sort expert since I couldn't come up with a formula that would work with all of them together. Thanks for you time!!
  2. LMGroup

    Conditional sorting with group and multiple fields

    All 4 fields are numeric. When I add anything besides + between the fields in the first condition, it wants a string for the second condition. If I use ToText on the second, the sort order changes.
  3. LMGroup

    Conditional sorting with group and multiple fields

    I've changed the group to use the formula but it still isn't working for type 1. This is what it currently says: if {?ReportType} = 1 then {SalesmanN}//+{CustomerN}+{InvoiceN}+{JobN} else {CustomerN} I removed the other sort fields from the Record Sort Expert so it only has Group...
  4. LMGroup

    Conditional sorting with group and multiple fields

    I'm using CR2008 with a SQL DB and need to create a conditional sort. The report has 2 RH, 2 PH, 1 group and 1 detail section. If the user selects the detailed sales report, the first RH, PH and detail lines are displayed and I need to sort by salesperson, customer, invoice. There is no...
  5. LMGroup

    Need to get a value from a completely unrelated table to use as a constant

    I'm using CR2008 v12.3.0.601 with SQL Server 2008. I need to pull a date value from a system parameter table. I need to use the date to filter the required data but there is no link between the parameter table and the production data. The parameter table has 2 fields: Cell (the one I need is...
  6. LMGroup

    Only want the trigger to fire the first time 1 of 2 codes are entered

    I'm using SQL Server 2005. I got a lot of help on here a while ago getting this set up and it works perfectly except when someone enters one of the codes after one has already been used. They aren't supposed to, but it happens. I need to prevent this because it is doubling (or tripling) the...
  7. LMGroup

    Convoluted record selection

    Thanks. That's very helpful :)
  8. LMGroup

    Convoluted record selection

    Temporary tables could work. I'll give that a try. Thanks!
  9. LMGroup

    Convoluted record selection

    I'm using SQL Server 2005 and trying to create a view from a single table that will select a myriad of different records based on other records it finds. I have to manipulate the dates to calculate time intervals. I have to find the time between the filedate and enddate and also the time...
  10. LMGroup

    Conditional INSERT Trigger

    It makes perfect sense :) I hate messy code but hate messed up data even more. I thought the variables would make things easier to deal with. Oh well. The data itself is much more important and I'll be the only one looking at the code. I started working with triggers about 2 months ago...
  11. LMGroup

    Conditional INSERT Trigger

    I figured out what the required formulae are. Now it doesn't like the code again. I hate those "could not be bound" errors. I know they're coming from the way I set the variables. Do I have to embed everything into the SELECT statement? (I modified the code to turn it into a query and look...
  12. LMGroup

    Conditional INSERT Trigger

    Fantastic! Thanks :)
  13. LMGroup

    Conditional INSERT Trigger

    Thanks for replying so quickly. I thought it was looking a little complicated. Will this insert multiple records into JobMaterial is there are multiple records for the job in PrintItems? I guess I better check it out.
  14. LMGroup

    Conditional INSERT Trigger

    I'm using SQL Server 2005, trying to create a conditional trigger that will fire when one of 2 status codes are entered. Once they are entered, I need it to get all the records from the PrintItems table that have the same job number and also have an MCC code and generate records in a 3rd table...
  15. LMGroup

    Can't isolate the records that I need

    Thank you once again, gmmastros! Once I added the Case_Stage to the CaseID in the partition, I got exactly what I needed!
  16. LMGroup

    Can't isolate the records that I need

    It's definitely an improvement. Everything I was trying was doubling and tripling the number of records. This one went the extreme opposite. There are 299 records that have either Responded or Solved in the Stage field. Of those, I need about 200 of them (first occurrence of Responded and...
  17. LMGroup

    Can't isolate the records that I need

    I'm using SQL Server 2005 I need to gather data from 3 tables, but 1 table has a 1:many relationship with the main table. From that table, I only want the first record for that case and stage. This is what I was trying (and failing): SELECT Cases.Case_ReferenceID, Company.Comp_Name...
  18. LMGroup

    How do I convert time from text to show business hours and calculate averages

    The code only calculates the time for the first record of each case. What I need is an average of all the times in the last column. The numbers are calculating correctly. 8/31 & 9/01 were weekend days and 9/02 is a holiday. Business hours are 8am-5pm, M-F. Reference Id Created...
  19. LMGroup

    How do I convert time from text to show business hours and calculate averages

    I'm using CR 2008 with an ODBC connection to a db on SQL Server 2005. The following code does almost everything that I need. I also need to be able to calculate the average response time. I'm not sure what to use or how to convert it to what I need. My times are based on a 9 hour business...

Part and Inventory Search

Back
Top