显示标签为“loop”的博文。显示所有博文
显示标签为“loop”的博文。显示所有博文

2012年3月19日星期一

BCP newbie question

I am trying to run the bcp utility. When I run it from the command prompt it
works. When I try it from a bat it goes into this crazy endless loop
repeating the command again and again. Any ideas what I am doing wrong?
Regards, Chris.
bcp pubs..publishers out C:\test.txt -c -U****** -P***** -S******
pauseIs your command file by chance named BCP.BAT or BCP.CMD? In that case, it's
calling itself rather than BCP.EXE. You can remedy the problem by
specifying BCP.EXE and/or using a different name for you command file. It's
a good practice to avoid naming command files the same as EXE or command
names.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Chris" <123@.123.com> wrote in message
news:OO3%23CBbLGHA.1124@.TK2MSFTNGP10.phx.gbl...
>I am trying to run the bcp utility. When I run it from the command prompt
>it
> works. When I try it from a bat it goes into this crazy endless loop
> repeating the command again and again. Any ideas what I am doing wrong?
> Regards, Chris.
> bcp pubs..publishers out C:\test.txt -c -U****** -P***** -S******
> pause
>

2012年2月16日星期四

BATCH Update ?

Hi all,

we need to update many single cells with individual MDX Update Statements.
We're doing this with ADOMD now (C# Project) in a loop.
In order to save roundtrips and put things in one transaction
we considered using the <Batch> Element of XMLA.
I could'nt find a example how to use this with MDX Commands.
this doesnt work:
<Batch>
<Command>
<Statement>
UPDATE ..
</Statement>
</Command>
<Command>
<Statement>
UPDATE..
</Statement>
</Command>
</Batch>

The Batch element at line 7, column 22 (namespace urn:schemas-microsoft-com:xml-analysis) cannot appear under Envelope/Body/Execute/Command.

Do you have any hints ?
BTW: what happend to www.xmla.org, its down?
Wher can I find a complete schema file for XMLA?
a lot of questions...
Thanks a lot,
mik

You can update multiple cell values in a single Update statement seperated by commas.

For example:

UPDATE CUBE [Cube1] SET

(USA, Sales) = 100 USE_EQUAL_ALLOCATION,

(Canada, Sales) = 50 USE_EQUAL_ALLOCATION

You can also find some information on XML/A at

http://msdn2.microsoft.com/de-de/library/ms186604.aspx