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

  1. d222222

    Trigger from one table to update another

    Thanks markros. I tried that and it worked too. You're right, I could have caught that if I'd looked at it closer. And you didn't make me feel like I was being yelled at.
  2. d222222

    Trigger from one table to update another

    Thank you so much gmmastros!! It worked!!!!!! Thank you sooooooo much. I found some code on the internet that said to use an Inner Join but I still couldn't get it right. Thanks for your help!!!
  3. d222222

    Trigger from one table to update another

    To bborissov I was NOT trying to code it according to just one row being affected. I was trying to explain that I think that's what my code was doing but NOT what I wanted. All I wanted it to do is update the count in the rm table after ANY change is made to the em table. I tried your code...
  4. d222222

    Trigger from one table to update another

    ...UPDATE, DELETE AS Update rm set rm.count_em = A.EmployeeCount From rm Inner Join ( Select em.bl_id, em.fl_id, em.rm_id, Count(*) As EmployeeCount From em Group By em.bl_id, em.fl_id, em.rm_id ) As A On em.bl_id = rm.bl_id...
  5. d222222

    Trigger from one table to update another

    We have a field in the rm (room) table that counts how many employees occupy the room according to the em (employee) table. We want to create a trigger to update the rm.count_em field when a change is made to the em (employee) table. It also uses the bl (building) field, fl (floor) field to...
  6. d222222

    Loop through each report to display next table

    I hope this will make sense. I'll do the best I can to explain what I'm trying to do. I have a report that is not returning the results the way I want it to. This is how I want it to display: Site Code Site Name SENIOR_CTR Senior Center Property Code Property...
  7. d222222

    Alias' Problems

    We are using Archibus Web Central. I got it working. I don't know if it was the SQL statement changes or the changes to the other code but all of a sudden it works. Thank you for your efforts.
  8. d222222

    Alias' Problems

    Unfortunately I can't do either one because it is being done in an existing application that already had the tables created. Making changes to the table would be a nightmare. I agree that it would be a lot better if the names were better but I don't have any choice in the matter. We also...
  9. d222222

    Alias' Problems

    I have several fields in multiple tables that have the same name so I have to use alias's. I have changed the code so many times and keep getting errors either from the alias's, the grouping or the key fields. This is the latest code: SELECT rmpctsum.bl_id, rmpctsum.dv_id, bl.bl_id...
  10. d222222

    Comparing two dates

    I've been playing with it and now I get it to read the date but it's not quite right. I'm using an alert popup box so that I can see the date the it is using. Here is the code: var myDate = new Date(); myDate.setDate(myDate.getDate()-160); var myNewDate =...
  11. d222222

    Comparing two dates

    I have a date that is in a form that is retrieved from the database and I need to check the date and see if it is more than 6 months old and if it is, make the row red. However the only way I can get it to work is if I use "innerHTML" and hardcode the date. I'm trying to find the code that...
  12. d222222

    Problem Converting Access 2003 Query to SQL

    Thank you for all of the references. I will read up on everything. I added a "right join" and that's what got it to work. No wonder it didn't work if it was doing a cross join and creating so many records. I made a mistake in my original post. It didn't work in Access 2003 but it worked...
  13. d222222

    Problem Converting Access 2003 Query to SQL

    Thanks for everyone's help. I am new at using Access and trying to run it through SQL is definitely challenging. I will definitely take all of your advice into consideration. After seeing qmmastros comment about the JOIN I decided to try adding the JOIN back in that was once there and it...
  14. d222222

    Problem Converting Access 2003 Query to SQL

    Since it works without the GROUP BY I was wondering how to get it to work with it.
  15. d222222

    Problem Converting Access 2003 Query to SQL

    No, it's not working since I changed the DISTINCTROW to DISTINCT. I still have the problem. I have form fields in other queries and they work OK so that's not the problem. I will look and see if any of them are using IIF. Looking at the history of the query there was a JOIN at one time but...
  16. d222222

    Problem Converting Access 2003 Query to SQL

    I have a query that we use in Access 97 and upgraded to Access 2003 and works fine. Now we want to run them using a SQL database but an Access 2003 frontend. When I open the new query in Access 2003 it takes close to an hour to run but when I run the same query in the Access 2003 database, it...
  17. d222222

    Leading Zeros on a Timestamp Date

    I'm sorry. Your code did work when I put it elsewhere in my code. It just didn't work where I have a loop so I will have to adjust the code. Thank you for your help.
  18. d222222

    Leading Zeros on a Timestamp Date

    I think the best way to do this is to have code that will count how many characters there are from the left to the first "/". If there is only one character, add a "0". Then repeat to the next "/".
  19. d222222

    Leading Zeros on a Timestamp Date

    This is what I tried and it didn't return any records: <% strDate = objRsFolder("Timestamp") datestring = split(strDate, " ") dateparts = datestring(0) dateitems = split(dateparts, "/") mm = dateitems(0) dd = dateitems(1) yyyy = dateitems(2) sDate = yyyy & "/" & mm & "/" & dd %> <td> <%=...

Part and Inventory Search

Back
Top