I did create #tblTemp on sql but can not use it with "outside" bcp routine
from command line:
Error = [Microsoft][ODBC SQL ...][SQL Server]Invalid object name '##tblTemp'.
Any idea why?
--
gokWhy do you want to BCP into a global temp table? If you are already in tsql
then why not use Bulk Insert instead? Not that I am recommending you use
temp tables but at least Bulk Insert can see a local temp table.
Andrew J. Kelly SQL MVP
"gok" <gok@.discussions.microsoft.com> wrote in message
news:A182DF5D-B64F-4E66-8F38-7A06EEFD6159@.microsoft.com...
>I did create #tblTemp on sql but can not use it with "outside" bcp routine
> from command line:
> Error = [Microsoft][ODBC SQL ...][SQL Server]Invalid object name
> '##tblTemp'.
> Any idea why?
> --
> gok
>|||I have a data file (from user verification in xsl) I need to import to sql.
the idea was to give client copy of bcp.exe and he will post data from his
machine to sql. In BULK INSERT I have to use shared folder to import data
from file, otherwise this file still "invisible" for sql (I was trying query
analyzer on non-sql machine).
What would be a correct way to append data from file?
"Andrew J. Kelly" wrote:
> Why do you want to BCP into a global temp table? If you are already in ts
ql
> then why not use Bulk Insert instead? Not that I am recommending you use
> temp tables but at least Bulk Insert can see a local temp table.
> --
> Andrew J. Kelly SQL MVP
>
> "gok" <gok@.discussions.microsoft.com> wrote in message
> news:A182DF5D-B64F-4E66-8F38-7A06EEFD6159@.microsoft.com...
>
>|||The correct way is dependant on your needs. But I would never want to give
a client direct permission to import a file with BCP to my production
server. Why not have them FTP it to a secure folder on your server or
somewhere the server can get to it. Then use Bluk Insert to load it.
Andrew J. Kelly SQL MVP
"gok" <gok@.discussions.microsoft.com> wrote in message
news:105F0D2F-92B5-427A-96FB-F17BEAABE17F@.microsoft.com...
>I have a data file (from user verification in xsl) I need to import to sql.
> the idea was to give client copy of bcp.exe and he will post data from his
> machine to sql. In BULK INSERT I have to use shared folder to import data
> from file, otherwise this file still "invisible" for sql (I was trying
> query
> analyzer on non-sql machine).
> What would be a correct way to append data from file?
> "Andrew J. Kelly" wrote:
>|||you'r right, no reason to give bcp to user. In my case it is hidden by
front-end .exe app.
Right now I dont see any advantages to use bcp (so BULK INSERT) to upsize
data: it is not secure, it cannt handle table relations and creating temp
tables on sql side has no benefits either. Better lets bring those tree-like
data directly to dbase and make sql to do all quality control checks!
"Andrew J. Kelly" wrote:
> The correct way is dependant on your needs. But I would never want to giv
e
> a client direct permission to import a file with BCP to my production
> server. Why not have them FTP it to a secure folder on your server or
> somewhere the server can get to it. Then use Bluk Insert to load it.
> --
> Andrew J. Kelly SQL MVP
>
> "gok" <gok@.discussions.microsoft.com> wrote in message
> news:105F0D2F-92B5-427A-96FB-F17BEAABE17F@.microsoft.com...
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment