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 John Tel 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. SarasotaIT

    Table Name Changed...need to change many queries

    I am doing very well - now - thanks to your help!!! Your code worked like a charm! AWESOME, detailed response! I am going to file it away for future reference! Thanks again, AceMan1! Terry
  2. SarasotaIT

    Table Name Changed...need to change many queries

    I have a database with 30 queries based on one table: tblCustomers. The table name was changed to tblCustomersOld. How can I change all 30 queries to reflect the new table name without having to open each query and edit individually? My expertise is SQL; I am not a VBA programmer but can stumble...
  3. SarasotaIT

    Crosstab Query To Populate Table

    WORKS PERFECTLY!! Thanks PHV and JonFer! AWESOME! You each get a star! Terry
  4. SarasotaIT

    Crosstab Query To Populate Table

    Awesome, PH! Your sol'n works almost flawlessly...only has one small problem: If StoreOwnerID does not own a Store1, but owns a Store2 or Store3, StoreOwnerID is blank for that record in the query results. For instance, in my tbl1 above, for record 6, if you change Store1 to Store3, then...
  5. SarasotaIT

    Crosstab Query To Populate Table

    Thank you very much PH! I will give it a shot. Also, John, you are correct in that there are store owners with store2 and no store1. so, if i get you correctly, the FROM should read: FROM ((Select Distinct StoreOwnerID from Sales) A LEFT Join (SELECT * FROM Sales WHERE StoreName...etc? Are...
  6. SarasotaIT

    Crosstab Query To Populate Table

    Hello, I have a single table (tbl1) with 4 columns: StoreName, StoreOwnerID, ProdSold, Sales. It looks like this: StoreName StoreOwnerID ProdSold Sales ------------------------------------------------------------- Store1 001 100 1000...
  7. SarasotaIT

    Change size of multiple columns

    I am looking for the proper syntax to change the size of 2 or more columns in my table in one query. Here is what I have to change the size of just ONE column: ALTER TABLE MyTable ALTER COLUMN [COL1] char(6); But, what if I wanted to change the column size of COL1 and COL2 in the same query...
  8. SarasotaIT

    Update query help needed!

    Thanks much, Rudy! You helped me out of the abyss! Kudos! Terry
  9. SarasotaIT

    Update query help needed!

    I am trying to increase a field's value in tbl1 by 2 if the same account number exists in tbl2. I think I may be partially there but Access returns an error. Here's what I have... UPDATE tbl1 SET fld = fld+2 WHERE (SELECT T1.account, T2.account FROM tbl2 T2, tbl1 T1 WHERE...
  10. SarasotaIT

    Replace if target is in a set

    Thanks, Golom! Worked like a charm!! I am using your first suggestion, but the next time we run these conversions, I will use your second sugg. Thanks again for saving my hide! :-) Terry
  11. SarasotaIT

    Replace if target is in a set

    I have a very large table that I am trying to replace text in. I would like to design, using SQL, a query that will replace a string with a new value only if that string is part of a pre-specified group of values. For instance: In the CODE field, replace all the ocurrences of: 543, 545, 548...
  12. SarasotaIT

    Data Type Conversion Error

    IT WORKED!! HATS OFF TO YOU! KUDOS, DUANE!!! I know this was a small step for Access gods like yourself, but it was huge to me. Thanks much!!! Terry
  13. SarasotaIT

    Data Type Conversion Error

    Thanks, Duane! I am not much of a programmer...if it falls out of the scope of basic SQL, I am lost. How would I assign your Fn to a particular table? Is this done under Modules? I would appreciate any tips on how to apply it. :-/ Thanks yet again! Terry
  14. SarasotaIT

    Data Type Conversion Error

    Thanks! no calculations...merely to keep from having to write and execute queries that trim the leading zeros. I know converting to integer will drop leading zeros, otherwise I have to do something like the following: UPDATE [tablename] SET [tablename].colname = Right([colname],9); and so...
  15. SarasotaIT

    Data Type Conversion Error

    I had data in a char. field that was in the form 0000-000-0000. After stripping out the dashes to make the data all numeric, I tried to convert the field from char. to long integer. Access errors out (table contains 280,000 records). SO, I thought I would outsmart Access and create an exact...
  16. SarasotaIT

    Registry Hive Import - User Not Local Administrator

    I am trying to automate the setup of the printer environment of 150 users that all have local printers attached to their w/s. I have set the advanced settings of the printer and exported the registry hive [HKEY_CURRENT_USER\Printers\DevModePerUser] to a .reg file on the server. At user logon, I...
  17. SarasotaIT

    Invalid Syntax in Create Table Query

    Thank you again...and again your response has been very helpful. I am now going to entertain the thought of leaving Column1 a text field since a big reason I was making it a number field is because that field, after export to a txt file, must be 20 characters AND be right-justified. As I...
  18. SarasotaIT

    Invalid Syntax in Create Table Query

    Thank you for such a timely response! Your suggestion worked, however, the number field MUST be 20 characters max. (the table will be exported in fixed-width format txt file). Is there a way to set a maximum length of a number field in a create table query?
  19. SarasotaIT

    Invalid Syntax in Create Table Query

    I am trying to make a simple "data-definition" query in Access 2002 and cannot due to "invalid syntax" error. Here is my Query: CREATE TABLE Table1 (COLUMN1 number (20), COLUMN2 text (30), COLUMN3 text (30)); In my query, if I replace "number" with...
  20. SarasotaIT

    Merge 2 fields in one table

    THoey: Wow! This is wierd! I just relocated to Sarasota, FL from the Muskogee, OK area (between Okmulgee and Muskogee)! Hmmmmm... Strange! :-) -Terry

Part and Inventory Search

Back
Top