|
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]
|