Search results

  1. Z

    Add new fields in an update query

    Hi, i am just wondering is there any chance I could add in new fields (columns) in an update query? Thanks!
  2. Z

    Add in computed numbers to the table

    Hello all, I know this is probably a very easy question, but somehow I am just confused... I have a table, say for example, srcTab that has a couple of columns (say "age", "sex", ...) that I need to select into a new table that I would like to make (call it tarTable) and on top of that, I have a...
  3. Z

    What is the SQL expression for the following?

    Hi, What if I need the SQL expression for the following: 31-Dec-2007 - DateofBirth + DateofHire? I tried to use Datediff and dateAdd and it does not seem to allow me to incorporate more than 2 dates. Thanks!
  4. Z

    Multiple joins

    Hello, I have the following code for a multiple join: INSERT INTO [AppendAllFields]SELECT [TreatyList].[Treaty] AS [Treaty],[MLAC 42 Treaty Xref ER].[tai treaty] AS [TreatyType],[txn 01/04].[Policy_Number] (and more other fields from [txn 01/04] table) FROM [txn 01/04] INNER JOIN [MLAC 42...
  5. Z

    What is wrong with this query

    Hello, I have a Query that I wrote as follows: SELECT [TableA].[FieldA], [TableA].[FieldB], TableB.FieldC FROM [TableA],TableB RIGHT JOIN [TableA] ON [TableA].[FieldB] = TableB.[FieldD] GROUP BY [TableA].[FieldA], [TableA].[FieldB], TableB.FieldC; What happened was that TableA has Fields A and...
  6. Z

    compare strings in SQL

    Hello, I would like to put a restriction on the SQL statement such that if one particular field contains the character "MO", then we take in the record, else we ignore them. May I know how could this be done in the "WHERE" part of the SQL statement? I do not think SQL would read things like...
  7. Z

    multiple cases

    Hello, Say for example, I would like to run a query that would search through a table with each person's deposit amount, assign band 1 if they have deposit less than 1 million, band 2 if 1-2 million and band 3 if more than 2 million. How can I: 1. Add in the extra column in the table? 2. Assign...
  8. Z

    date error

    Hello, I was trying to compare to see whether a date is later than 01/01/1900, and include the date only if it is, I ended up having the following code: ... (([Transactions].BirthDate) Is Not Null) AND (DateValue([Transactions].BirthDate) > #01/01/1900#)) ...; However, I ended up having an...
  9. Z

    help with the following statement

    Could anyone please let me know what is wrong with the following statement? I have been trying for 3 hours to debug this: Thanks!
  10. Z

    How do I run the following query?

    Say for example I have the following 2 database tables, the first one contains the old employee data, and has the fields shown below: oldEmployeeID FirstName LastName DateOfBirth HiringDate TerminationDate and another one containing the new employee data with similar fields but instead of...
  11. Z

    Export the export/import specifications for text files

    Hello, Does anyone knows how can I export the export/import specifications (which file/directory) and how can I import/export the specifications between different versions of Access. Thanks!
  12. Z

    Running query about date

    Hello, Say for example I have a database containing the date of birth of people in the format of YYYYMMDD (a string/text field) and another field about the age of the person (a numerical field) and another field is, say, the date they had their birthday last year. I would like to check whether...
  13. Z

    Is the following code correct?

    Hello, I wrote the following code in one of the programs: 'first, define necessary variables Dim db As Database Dim tableCounter As Integer Dim newtablename As String newtablename = "AppendAllFields" Set db = CurrentDb Dim counter As Integer counter = 1 'loop around for tables Do While...
  14. Z

    Get rid of the record that matches

    Hello all, Please refer to the previous thread where I was helped with the WHERE staement: http://www.access-programmers.co.uk/forums/showthread.php?p=588055 Now, say for example, I have 2 records in the claimbase that has the same other fields but the claim_liability field have different values...
  15. Z

    Removing duplicate records programmatically

    Hello there, I am just wondering how can I use VBA to remove duplicate records, as identified by the combination of values of certain fields, would be removed from a table. Thanks!
  16. Z

    "WHERE" in SQL

    Hello, I am just wondering that if I say SELECT something INTO [table] WHERE tableA. fieldA = tableB.fieldB, is that acceptable? Thanks!
  17. Z

    approximate values query

    hello, I am just wondering whether there is any way I could define a query in such a way to include a record in Table A if field FA is approximately equal to field FB in Table B by no more than, say 12. Thanks! Regards, Anyi
  18. Z

    compare table query

    Hello, I am just wondering whether there is any query I could use to compare the data on, say, whether all data in Table A are in Table B although some records in Table B may not be in Table A and give me the record that is in Table A but not in Table B. Thanks!
  19. Z

    Query without duplicates

    Hello, I am just wondering whether there is any way I could run a simple query that would pull all the data I need and inform me of the duplicates if there is any. Thanks!
  20. Z

    parsing date

    hello, I have a module that I would like to parse the original date of birth in the format of dd/mm/yyyy (i.e., 01/05/2007) to the format of yyyymmdd(i.e., 20070501) using SQL statement copy them into another table at the same time, may I know how could this be accomplished programmatically? Thanks!
Back
Top Bottom