Showing posts with label friends. Show all posts
Showing posts with label friends. Show all posts

Monday, March 19, 2012

Bulk insert in to a partitioned View?

Greetings once again my SQL friends,

I am getting the following error when I attempt to complete my data flow task. The destination is a partitioned view but I get the following error message when I run the package :

Partitioned view 'PRICE_DIM' is not updatable as the target of a bulk operation

How to solve this problem?

Hi,

Bulk insert operations are not supported for partitioned views. See for more details:

Exporting Data from or Importing Data to a View
http://msdn2.microsoft.com/en-us/ms187086.aspx

You can import Data within a Data Flow Task into a Partitioned View if you use an OLE DB Destination with the Data Access Mode option set to Table or View instead of "Table or View - fastload", which is the default and technically a bulk operation.

Please be aware that locally partitioned views are supported in SQL Server 2005 only for backward compatibility. See also:

Scenarios for Using Views
http://msdn2.microsoft.com/en-us/library/ms188250.aspx

I hope that helps,

Bertil

Friday, February 24, 2012

Bulk Insert

Friends,
If I need to import a text file into a pre-existing table using T-SQL, then
BULK INSERT works fine. But I cannot figure out how to import that same tex
t
file, using T-Sql in QA, if no target table currently exists. Is there a wa
y
to do this?
To clarify, I can import the same text file through DTS, even though the Sql
Server db doesn't currently contain a table to import into - I tell DTS to
import the data into Table_X, and DTS takes care of creating the necessary
table, naming column headers, and importig the data. Can I write my own
Bulk Insert statement in QA that performs the same action?
Thanks in advance for your help ...
bill morganI think you will have to create the table upfront and then use BULK INSERT
from QA.
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
"bill_morgan" <billmorgan@.discussions.microsoft.com> wrote in message
news:7292E462-D6F5-47AD-82F8-F194A6A5FB8B@.microsoft.com...
> Friends,
> If I need to import a text file into a pre-existing table using T-SQL,
> then
> BULK INSERT works fine. But I cannot figure out how to import that same
> text
> file, using T-Sql in QA, if no target table currently exists. Is there a
> way
> to do this?
> To clarify, I can import the same text file through DTS, even though the
> Sql
> Server db doesn't currently contain a table to import into - I tell DTS to
> import the data into Table_X, and DTS takes care of creating the necessary
> table, naming column headers, and importig the data. Can I write my own
> Bulk Insert statement in QA that performs the same action?
> Thanks in advance for your help ...
> bill morgan|||Thanks for your input. I think yer right. Good to get that confirmation.
"SriSamp" wrote:

> I think you will have to create the table upfront and then use BULK INSERT
> from QA.
> --
> HTH,
> SriSamp
> Email: srisamp@.gmail.com
> Blog: http://blogs.sqlxml.org/srinivassampath
> URL: http://www32.brinkster.com/srisamp
> "bill_morgan" <billmorgan@.discussions.microsoft.com> wrote in message
> news:7292E462-D6F5-47AD-82F8-F194A6A5FB8B@.microsoft.com...
>
>

bulk insert

hi friends

i am trying for bulk insert using SQL server 2000

using this code

bulk insert xyz
from 'D:\authors.txt'
WITH (FIELDTERMINATOR = ',')

but it gve me error saying that

Could not bulk insert because file 'D:\authors.txt' could not be opened. Operating system error code 21(error not found).

i check file security

it has given full control to the file

can any one give me idea about Operating System error code 21(error not found)

thanks

See if you can see the directory/folder contents by using xp_cmdshell 'dir D:\'. Does SQL Server have enough permissions to access the folder?