Search results

  1. J

    issue with extracting portion of name with access query

    Hey all, There's a problem with this query: SELECT p.aname INTO GenericForgottenWithoutInitial FROM (SELECT Left([TheName],IIf(InStrRev([TheName]," ")>1, InStrRev([TheName]," ")-1,Len([TheName]))) AS aname FROM TheForgotten) AS p; Basically I am trying to extract away a middle initial (or...
  2. J

    if field has two spaces pull content to the left of second space

    Hey all, I have this query: SELECT p.aname INTO GenericForgottenWithoutInitial FROM (SELECT Left([TheName],IIf(InStrRev([TheName]," ")>1, InStrRev([TheName]," ")-1,Len([TheName]))) AS aname FROM TheForgotten) AS p; Problem is it pulls content to left of first space because of this part...
  3. J

    Changing the text value of legends

    Hey all, I found it surprisingly difficult to change the text value of legends when creating a chart on a report. I read in another forum that you have to alter Row Source in Property Sheet. The thing is the Row Source just contains a query: SELECT [mailer_states_id],Count(*) AS [Count] FROM...
  4. J

    Syntax error in query expression 'SELECT update_mailer_step_two.id FROM...

    I get the above error with this query: INSERT INTO mailers ( contacts_first_filter_id, mailer_states_id, created_at ) VALUES (SELECT update_mailer_step_two.id FROM update_mailer_step_two, 1, Now()); I'm not only trying to pull data from another table and insert it into one, but I'm also trying...
  5. J

    nested joins to update one table based on the comparison between two other tables

    Hey all, I have a table called mailers which I want to update the mailer_states_id with a user required input and update contacts_first_filter_id field with the id of the contact from the contacts_first_filter table whose address, city, and zip code (in the contacts_first_filter table) is equal...
  6. J

    running queries one after another

    Hey all, I'm trying to figure out a simple way to run queries one after another. For example, I have these queries: defense_query (a create query) append to defense (append query) finalize defense (create query) There's several other queries. But they will all still run successively. I did...
  7. J

    checking whether field in table has space or not

    Hey all, I have a table called FinalForgotten which contains this: aname (field) Smith John Smith,John Smith,Jane I have a table called defense_final which contains this: last_name (field) first_name (field) middle_initial (field) Smith John T Smith,John Ruby Smith,Jane Lis Marie,Ann Sam...
  8. J

    split table, compare its splitted fields with another table, and then append content

    Hey all, I have this query, but it's giving me syntax errors: SELECT s.fullname INTO SummaryJudgment_FinalForgottenWithMiddle FROM ( SELECT( (SELECT Left([aname],InStr(1,[aname],",")-1)) As lastname FROM SummaryJudgment_FinalForgotten) & " " & (SELECT RIGHT([aname],InStr(1,[aname],",")+1)) As...
  9. J

    Trying to speed up query without sacrificing inner join

    Hey all, I had a query taking over half hour to run. It was too long. So I cleaned up data so I could use this, which only takes less than 20 seconds to run: SELECT possibles.fullname, uniSelectedContacts.addresses, uniSelectedContacts.cities, uniSelectedContacts.us_states_and_canada...
  10. J

    macro supposed to extract cells with comma, it extracts nothing

    Hey all, I have this macro below: Sub extract_deeds() Dim LR As Long LR = Range("A" & Rows.Count).End(xlUp).Row Range("B1:B" & LR).FormulaR1C1 = _ "=IF(ISNUMBER(FIND("","", A2)),A2,"""")" Range("B1:B" & LR).Copy Range("B1").PasteSpecial xlPasteValues End Sub It's...
  11. J

    removing duplicate records based on duplicate address

    EDITED removing duplicate records even when zip codes aren't really duplicates I am editing the question. It didn't make sense what I wrote. I have this query: SELECT * INTO KeepThese_SummaryJudgment FROM final_output_summary_judgment AS f LEFT JOIN (SELECT t.fullName FROM...
  12. J

    Queries fail to filter out certain states even though specified in query

    Hey all, This query fails to filter out states that aren't either FL or NY, even though I specify to do exactly that in the query: SELECT contacts.id, contacts.names_1, contacts.names_2, contacts.addresses INTO PrepareForDuplicateCheck FROM contacts, possibles WHERE (INSTR(CONTACTS.NAMES_1...
  13. J

    Extracting only records that are not identical

    Hey all, I'm trying to pull records that don't match. I have two tables: TestForgotten fullName Atkins,Ernest Bacchus,Marsula KeepThese f_fullname Atkins,Ernest Notice table 1 and tabel 2 both have Ernest, so I don't want to pull that record. But notice table 1 has a field name that's not...
  14. J

    Avoiding a cartesian product

    Hey all, I don't have flexibility with this. The names I am trying to match with superfluous can either be in one of four fields in contacts table. And because all names in those four fields go together - since they all have same address - they must all be part of the same record. So I am...
  15. J

    Strange error message when running query

    Hey all, I have a query that basically finds first and last names that match between contacts and superfluous table. Finds the first and last names of contacts table that has "," and "&" characters in them. So far these two criteria must be met. Then since I don't want to retrieve the same...
  16. J

    query to check pattern in name

    Hey all, I have a record that looks like this: APEL,RICHARD & RHINA Notice the ampersand before the first name and notice there's another name after the last name, which is Apel. So I would like to account for this pattern. I come up with this: INSERT INTO possibles ( fullname ) SELECT...
  17. J

    update a column in one table with the value of another column in another table

    Hey all, I would like to update one column with the value of another column from another table: table_1 names_1 addresses BLAIR,SHERON S 6110 Browen Road BROWN,BRENON I H/E BROWN,WANDA R 1100 Lake Road RODRIGUEZ,LILLIAN M 3332 Brick Road...
  18. J

    > Refactoring sql into regexp - Microsoft Access

    Hey all, Any idea how to use a function to do a RegExp Replace and then calling it from the query in Microsoft Access? The idea is to match the three fields in the temp_table query: last_name || first_name || middle_initial Blair || Sheron || S Brown || Wanda || R Rodriguez...
  19. J

    Query showing unexpected results

    Hey all, I had my query getting closer to being accurate until I had to make some additional changes. One change was if in our temp_query, the middle_name field had a value in it and therefore was not null, then we use the sql like to find like characters in the print_ready query that match...
  20. J

    delete 4 out of 5 records where name field and address field repeat more than 5x

    Hey all, I am trying to delete 4 out of 5 records from table where name field repeats same value more than 5 times and the address field repeats more than five times for a table. So if there are 5 records with a name field and address field that are the same for all 5, then I would like to...
Top Bottom