You are here: Using trigger to export xml file « MsSQL Server « IT news, forums, messages
Using trigger to export xml file

Posted by lytung on 05/04/06 21:23

Hi all,

i am having trouble trying to export this in xml. Basically inside an
update trigger i need to export in xml or file the qty that has been
changed. This then gets updated to another system. Is this a good idea
? should i be using another table in between in case something happens
on the other end?

However, I tried something like this and it didn't recognize the
selected table inside the bcp:

CREATE TRIGGER [TRIGGER NAME] ON [fastpic].[FP_INVTRANS]
FOR INSERT, UPDATE
AS

DECLARE @selected varchar (100)

IF NOT UPDATE(system_qty)

BEGIN

RETURN

END

DECLARE @cmd varchar(200)
set @cmd = 'bcp "select system_qty, part_name from selected " queryout
c:\parts.xml -S. -Usa -P -c -r -t'
exec master ..xp_cmdshell @cmd '

IF someone could help or suggest something else i would appreciate it,
than you

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация