Search results

  1. P

    Solved Find characters and remove them

    OK that's interesting. Yes I am more into full SQL Server now. No Access FE. Any suggestions?
  2. P

    Solved Find characters and remove them

    I used this with CASE WHEN for both POS and R since I didn't know that you could use it this way
  3. P

    Solved Find characters and remove them

    Yes moving from Access VBA to SQL is tricky but I am learning. Any tips? What do you mean by "USE THE ENGINE"?
  4. P

    Solved Find characters and remove them

    I didn't know you could use the 3rd part of replace that way REPLACE(REPLACE(field_name, 'POS', ''), 'R', '') so thanks for the tips
  5. P

    Solved Find characters and remove them

    Yes I actually used an UPDATE SET with CASE WHEN in a stored procedure because I did need parameters and it worked. Thank you
  6. P

    Solved Find characters and remove them

    Yes I used and UPDATE tbl_name SET field_name = CASE WHEN... and I had to use WHERE conditions match the case condition otherwise it updated everything and put a NULL value in the other records. I am working on it as we speak.
  7. P

    Solved Find characters and remove them

    I used to use MS Access as an FE. I used it for almost 7 years and learned a lot but this new company I work for does not use Access. Solely SQL Server and other tools such as SSRS for reporting. so I am now deep in TSQL. I haven't really used it to the extent that I previously learned but I...
  8. P

    Solved Find characters and remove them

    I'm going to try this and report back. I need to get better at using IF BEGIN END in TSQL...In Access VBA, I was able to do some if-then statements pretty easily but I have to learn how to do it with TSQL. I just need it to say If the value in this field and this record ends with R then change...
  9. P

    Solved Find characters and remove them

    Unfortunately, I can only use SQL Server now. New Job :) I have to use TSQL...I just need to figure out how to better use IF in tsql, I think
  10. P

    Solved Find characters and remove them

    So far here is what I am trying to make work BEGIN DECLARE @strID NVARCHAR = 'my_tbl_name.Column_name' IF @strID LIKE '%R' BEGIN UPDATE my_tbl_name SET Column_name = REPLACE(@strID,'R','') END END It runs successfully but when I go to check my...
  11. P

    Solved Find characters and remove them

    So I need the query to change an ID of the form 20R to 20 so it will remove the R at the end and update that value. I just did an UPDATE and got it to work on a temp table BUT how do I use it on an if statement? When an ID is chosen, IF that ID has R at the end so (LIKE '%R') then UPDATE that...
  12. P

    Solved Find characters and remove them

    No I didn't try the update statement but wouldn't I need to still use the REPLACE function? Oooohh wait. Do you mean UPDATE tbl_name SET field_name = REPLACE(field_name,'R','') WHERE field_name LIKE '%R' But won't this add an empty character at the end? Should I instead use UPDATE tbl_name SET...
  13. P

    Solved Find characters and remove them

    Ok I will try that but what metadata function can I use to return a field name. I have been using OBJECT_ID(DB_NAME) to return a database name. Can I use OBJECT_NAME(FIELD_NAME) to return a field name. something like IF OBJECT_NAME(field_name) LIKE '%R' BEGIN REPLACE(...) END...
  14. P

    Solved Find characters and remove them

    Hello all, This is my first time using the SQL Server side of this forum after using the VBA side for over 6 years :) I am working on a project and need help with a tsql script that will read a string Most of the values are of the form 20R, 20POS, 200R or 200POS or 200.... and I want a script...
  15. P

    Finding the proper Event for Workflow email

    Ok I'll test that also. Question: I created a maco with the name of my function but it keeps telling me that it can't find that function? What could be the issue?
  16. P

    Finding the proper Event for Workflow email

    On a specific schedule. The Code includes this piece 'If today is the 15th of the month If todaysDate = dateFirstDayOfCurrMonth + 14 Then Call CorpLicSendEmail("Rpt_RenewNow") 'If today is the first Monday of the Month ElseIf todaysDate = dateFirstDayOfCurrMonth Then...
  17. P

    Finding the proper Event for Workflow email

    Hello Guys, I didn't know how to word the subject of this thread for future reference but, I want to create a function for workflow emails that will be called rather the Access DB is opened or not. Some background: I currently have a function that sends emails on date conditions but it is on...
  18. P

    Solved Error 13 - Type mismatch when trying to change text box color

    I am using continuous form so that won't work. Thank you
  19. P

    Solved Error 13 - Type mismatch when trying to change text box color

    oops yes that fixed the error issue but I the text box value is not changing color when the form loads. Any idea?
  20. P

    Solved Error 13 - Type mismatch when trying to change text box color

    Hello. Any idea why I would be getting error 13: Type mismatch in this block of code? Private Sub Form_Load() If Me.MaxQt.Value > Me.MinQt.Value Then Me.SupplyCateg.ForeColor = vbRed Else Me.SupplyCateg.ForeColor = vbBack End If End Sub
Top Bottom