I have set up an Access database with a linked table to an SQL table. I've created a query in Access off the linked table. I have shipping software that i've set up to export data to the Access query and it successfully gets passed on to the SQL Table. So far, so good.
Now to the issue. The "weight" column in the SQL table has an "implied" 4 decimal places. So when I export a weight of "1", it shows up in the SQL table as ".0001". I need to multiply the weight by 10000 in order to get it to show up as "1.0000" in the SQL table.
I've tried modifying the Query's SELECT statement to do the math on that column but I get a "Cannot Update Field" error out of the ODBC driver.
Is there a way to make this happen? I'm not using MS Access at all (other than to create the .mdb file). Just using the .mdb file as a bridge between the shipping application and the SQL table.
Thanks for any guidance!
Look at this answer which looks very similar to what you are looking for.
https://stackoverflow.com/a/11296097/886591
Related
I am very new to SQL, MS Access & PostgreSQL. So this might be a very silly question but somehow I can't figure it out. I'm trying to run SQL queries in access and my data is in a PostgreSQL database table which was linked to access by my colleague earlier. When I make this simple query why do I get an error that the table doesn't exist? Is the syntax different for linked database tables? Or is the link not yet established?
You have created a Pass-Through query. This query is executed on the server, not in Access, so you need to use the original table names from the PostgreSQL database.
So it's not FROM public_tb_change but FROM tb_change.
Or maybe FROM public.tb_change, if public isn't the default schema.
I advise to rename your linked tables to the original name (remove public_), that makes things much less confusing. The schema name is automatically added by Access when linking the tables.
I have a database called AQOA_Core with huge amount of data.
I have a newly created database called AQOA_Core1 which is basically empty. I want to write a query to duplicate AQOA_Core to AQOA_Core1 without the data. I guess to be precise I want to create a skeleton of the primary database into the secondary database.
PS: I use Toad for my database operations.
You can use SQL Server Script Wizard for scripting database objects. You can exclude data, and select the database object types you want to include in your script
Please check the SQL Server guide I referenced above,
I hope it helps you
I migrated an access db to SQL using SSMA. My application still contacts the Access .mdb file and returns the record.
before migration : the table which is being used to populate data in the UI has 1000 rows and displays 1000 rows if the application uses the non migrated .mdb file.
post migration: the mdb file which is used by the application returns only 100 records..I tried by having exactly 100 records it worked. but then I tried with 101, which started throwing connectivity error.
How to handle this. Does SSMA have any restriction on the number of records to be returned after migration?
very urgent.Any help is greatly appreciated.
I suggest that use SSIS in order to convert your data from access to SQL server.
If you don't want to use SSIS I suggested that copy date from your access database and paste in Excel file, and then convert your data from Excel to SQL server ( I think that column data type or column size cause that you can't convert from Access to SQL Server).
I've got a database that resides on an SQL server box, and another in a separate mdb file.
Both contain similar data, but I'd like to run a query that checks unmatched records from a field that exists in both.
Is this something that's easy enough to do using ADO (VBA)? If so can you point me in the right direction?
The easiest would be to create a new Access Database or ADP, and link the tables from both the SQL server and the other MDB. That way you've got an interface to both from within the same instance, which allows you to query or join different tables.
I have a DB (in SQL Server 2008 SP3) include many tables and each tables have a lot of columns, in other hand I have an Excel file include description for any of my DB's columns (In SQL Server Management Studio when you want create a table, in design mode, for each column in property window there is a description field), So I am interesting in add this(Excel) description to description of columns in DB (of course not by hand and one by one), does any one have any idea about this?
Knock up some VBA to iterate through the Excel data, calling the database for each table/column.
The SQL Server stored procedure you want (if I understand correctly) is sp_addextendedproperty to add comments about objects in SQL Server
You can get help from some references given below: please have a look over there, thanks
a. Reading and Writing Excel
b. Reading Excel and then save to your DB