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
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...
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...
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...
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...
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...
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...
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
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...
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
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.