I would like to create a stored procedure that imports a txt file into an existing table using a format file and also update certain fields that will be null in the import. The import file will just update one column and I need to manually assign values
for the other columns.
bulk insert QueryData from 'E:\TrackInputLogs\NMSLog.txt'
with(FORMATFILE = 'E:\TrackInputLogs\NMSFormat.fmt',
ROWTERMINATOR='\n')
I need to update the following columns as follows at the same time
dateimported = getdate()
idkey = asdfg
importmethod = manual
oh by the way, this is an existing table and I do not want to delete current contents but also the import will update the fields where the idkey matches the values associated with the file contents.