I posted this earlier, but it did not seem to get any views. Please help!
I'm trying to import an excel spreadsheet into SQL Server. I keep getting an error saying that 2 columns cannot except NULL values. Here's the setup of each file.
SQL TBL:
My table has 9 columns. the first column is a Primary Key and IDENTITY(1,1). My last column is a dateCreated column with a default of getDate(). Both values are set to NOT NULL. The 7 inside columns are just plain varChar datatypes.
XLS:
My spreadsheet has 7 columns which corelate to the 7 inside columns of my SQL TBL. I do not want to specify my first and last columns because they should be unique to the SQL TBL (identity and getDate()).
Any help with how to do this would be great. If you need more info, please let me know.
Thanks,
TimTim:
If this table is already full of data, edit the DTS package Transformation properties to NOT Copy to EITHER your PK or Date field.
Otherwise, if the table's empty, drop the PK & Date fields for the initial import THEN re-add them back.
Hope this helps
RobbieD
Showing posts with label views. Show all posts
Showing posts with label views. Show all posts
Friday, February 24, 2012
Friday, February 17, 2012
DTS utility
Hello,
I am using the DTS utility available with Enterprise Manager in MSSQL server 2000. I can transfer the tables and views without any issues but when i try to transfer the stored procedures it always gives an error. I have tried transferring individual objects too but it does'nt works. The error given is "the user <username> cannot perform the following action". Any help is appreciated.
Thanks in AdvanceEasy is to script them and run at target server.|||I always liked Nigel's sig...
==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
http://www.sqlteam.com/forums/pop_profile.asp?mode=display&id=1578
And what that basically means, is what your are fundamentally trying to do is not the best way to skin a cat...
You need to undestand the methodolgy of deployement...
If you describe what you are ultimatley trying to do, I'm sure we can help..|||On the lighter side Brett conveyed the message... :D
On the hardest part I feel DTS must be used for data transfer and for this sort of things use Generate Script utility.
Also one of my peer raised this may be a security issue, so convey the permissions for this user on database objects.|||Got the point guys!!! I used the generate script utility, it is easier and without any issues.
Thanks
I am using the DTS utility available with Enterprise Manager in MSSQL server 2000. I can transfer the tables and views without any issues but when i try to transfer the stored procedures it always gives an error. I have tried transferring individual objects too but it does'nt works. The error given is "the user <username> cannot perform the following action". Any help is appreciated.
Thanks in AdvanceEasy is to script them and run at target server.|||I always liked Nigel's sig...
==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
http://www.sqlteam.com/forums/pop_profile.asp?mode=display&id=1578
And what that basically means, is what your are fundamentally trying to do is not the best way to skin a cat...
You need to undestand the methodolgy of deployement...
If you describe what you are ultimatley trying to do, I'm sure we can help..|||On the lighter side Brett conveyed the message... :D
On the hardest part I feel DTS must be used for data transfer and for this sort of things use Generate Script utility.
Also one of my peer raised this may be a security issue, so convey the permissions for this user on database objects.|||Got the point guys!!! I used the generate script utility, it is easier and without any issues.
Thanks
Subscribe to:
Posts (Atom)