473,396 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do you import a Table from SQL server to Access with punctuation problems?

anoble1
245 128KB
Hi,

I am having some problems (big problems) importing/Linking tables from the SQL Server to MS Access. Here is the problem: In the SQL server there is a table I need that it wont let me import because it has a column named this:
Expand|Select|Wrap|Line Numbers
  1. No. of Days
Yeah, has a punctuation and spaces in it. There is too much stuff tied to it since it was created many years ago that go out to a lot of customers. But i need it in my Access DB. Any ideas of making tricking MS Access to make it link that table?

Maybe there is some code that can change that column and name it something else before the linking? (Probably not if you always wanted it updated but worth a shot)..

Thanks,
May 11 '12 #1

✓ answered by NeoPa

A View is essentially SQL Server terminology for a query. It's pure T-SQL, but a pass-through (Don't confuse with Pass-Thru in Access.) view is generally as simple as :
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM   [Table]
If you're not responsible for the company SQL Server then I strongly recommend you deal with whomever is.

9 2382
NeoPa
32,556 Expert Mod 16PB
Why not create a view in the SQL Server that simply relays all the data from the table but, for that one field, renames it to something acceptable?

Better yet, provide a view for the existing cr*p and update the actual table to reflect a properly named system ;-) You would then need to create the view with the same name as the existing table, and use a different name for the updated table.
May 11 '12 #2
anoble1
245 128KB
How do I do those in SQL Server? Create views? Most of my skills are in Access, but limited ha! Right now I may try the 1st suggestion, then move to the other one to "correct" it. But I'm not sure how to create a view that relays data.
May 14 '12 #3
NeoPa
32,556 Expert Mod 16PB
A View is essentially SQL Server terminology for a query. It's pure T-SQL, but a pass-through (Don't confuse with Pass-Thru in Access.) view is generally as simple as :
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM   [Table]
If you're not responsible for the company SQL Server then I strongly recommend you deal with whomever is.
May 14 '12 #4
anoble1
245 128KB
Is there anyway to do this in Access in VB?
May 14 '12 #5
NeoPa
32,556 Expert Mod 16PB
Do you mean is there any way to set up the view in Access VBA, or are you asking if there is a way that doesn't require controlling access to the SQL Server?
May 14 '12 #6
anoble1
245 128KB
Is there a way to do the changes in MS Access. Maybe through VB import table by table, then when you get to the problem table rename the columns somehting else and finish the link?
May 15 '12 #7
NeoPa
32,556 Expert Mod 16PB
I don't think so. You could rename the table after a successful link, but renaming of the field would need to be done at the server end I believe.
May 15 '12 #8
anoble1
245 128KB
Update:
I worked around the problem. I went into Access and created a New Pass Through Query. From the pass through query I told it to go to the SQL Server and SELECT * from tblBillHistory, which in return gave me the whole table, but for that 1 column that was messed up, it gave wiped out that column.
May 16 '12 #9
NeoPa
32,556 Expert Mod 16PB
If you're using a PassThru query you can rename the field in the query. Just say :
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2.      , [No. Of Days] AS [NoOfDays]
  3. FROM   [SQLTable]
May 17 '12 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

41
by: Ruby Tuesday | last post by:
Hi, I was wondering if expert can give me some lite to convert my word table into access database. Note: within each cell of my word table(s), some has multi-line data in it. In addition, there...
1
by: Scott Sabo | last post by:
I wanted to have a control button that I can use to replace the import wizard in Access 2000. What I want to do is click the button which will initiate the import wizard in the "find file to...
2
by: amy | last post by:
Hi, all: i am a new end user of access, now I have many excel files need to import to One table in access (combine all excel files into one table in excel). In excel files, some columns will have...
0
by: amy | last post by:
Hi, all: > i am a new end user of access, now I have many excel files need to > import to One table in access (combine all excel files into one table > in excel). In excel files, some columns will...
6
by: BrianDP | last post by:
I have a table that has always been in my back-end of this application. The table is getting quite large, and, on top of that, we lose records out of this table. They just dissappear! No rhyme or...
1
by: Child of His | last post by:
I have been through every trick I know, or has been suggested. I have a one to two million line fixed field database in text format. I want to bring it into Access 97. When I use the external...
2
by: Quique | last post by:
Hello, I've got a problem importing a worksheet Excel into a temporary table in access. All the information is imported but the table is not ordered as it is originally in excel. I'm using a...
13
by: lare | last post by:
Hi, I am currently having one problem with my access application, which was developed in MS OFFICE ACCESS 2000 under the WINDOWS 2000 – PROFESSIONAL. When I copy and run my application on the laptop,...
7
by: perryche | last post by:
Is there a way with MS Access 2002 and above to prevent people importing from a blank Database the tables in another database? I have done a lot of searches but there isn't really a solution that...
6
by: redskin17 | last post by:
Hi all, i import xls to access with TransferSpreadsheet but here is the message "F1" doesn't exist in destination table ".." , but all columns are the same. where is the problem?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.