Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
NickyW
Starting Member
10 Posts |
Posted - 2003-04-29 : 13:05:20
|
Hi,I trying to create some tables in Access linked to an ODBC data source, the trouble is the table I am trying to link to has more than 255 fields which is the maximum Access can handle in a table, so it just displays the first 255. However I actually only need the last 30 fields, is there any way to get just the fields I need?Thanks for your help,Nicky |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2003-04-29 : 13:30:53
|
This is a trick almost no one uses:Use a linked query or a pass-through query.Create a new query, but don't add any tables (linked or otherwise) to it. Then, change the query type to a "PASS THROUGH" query. You will then lose the grid and move to regular SQL text. In the Connection property of the query, click the "..." and choose your ODBC data source.Then, just type a regular SELECT statement selecting the fields you need from the table you need. Click "!" to run the query and make sure it works. Then, just save the query. it will be saved with a different type of icon so you know it's a pass-through query.You may need to consult the help menu for more details.Note that for pass through queries, it is almost like QA -- you can type whatever syntax that the datasource you are querying allows. you CANNOT use an Access functions or syntax -- Access doesn't parse or validate or execute the SQl in any way, it just sends it to the server and returns the results.Note you can also execute stored procedures from Access in this manner.- Jeff |
 |
|
NickyW
Starting Member
10 Posts |
Posted - 2003-04-30 : 17:41:38
|
Thanks Jeff, that did the trick. |
 |
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2003-05-01 : 17:24:09
|
> 255 fields..... Bet there is a lot of empty space. Sounds like someone should learn about Relational Databases. If you have Access Xp (2002) or 2000 you could also use .adp to get at the data or write your own view and it is much faster than a Linked ODBC.JimEdited by - JimL on 05/01/2003 17:27:32 |
 |
|
|
|
|
|
|