Link to home
Start Free TrialLog in
Avatar of csePixelated
csePixelatedFlag for United States of America

asked on

program or way i can automatically capture each new line of a sql table

i am looking for a way to get appended rows from a table as plain text files.
I have a microsoft sql database that renews every month "history1217" (historyMMYY) is the current database. on an irregular basis this database has a new line written to a table labeled "SignalHistory". it gets somewhere between 1-300 rows added every minuet as data trickles in. each new row of data has a [signalID] which is a unique number starting at 1MMYY, so the 1st row on this months database is 11217 and it simply counts up from there.
i would like to have a file folder that has files named 11217.csv (i don't really care what the file extension is, i would prefer columns be separated by | or tabs)
and these files would exist as soon as the row exists or at least very quickly after the row exists.
is there some utility i can use to do this, monitor the newest of these databases for changes and save these changes to a file?
Avatar of PatHartman
PatHartman
Flag of United States of America image

Have you tried using a trigger?
Avatar of csePixelated

ASKER

I have not, im not very familiar with Microsoft Sql Querys.
https://docs.microsoft.com/en-us/sql/relational-databases/triggers/create-dml-triggers 
what would be the query I would have to enter for the trigger to accomplish this?
Provide some input and output in an excel...
Trigger will help but you need build logic inside that..
ASKER CERTIFIED SOLUTION
Avatar of csePixelated
csePixelated
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
although I never actually got what i was looking for according to my original question. i found a solution that was more fitting to my situation.