Hi,
At this point I would search the database for the document number and see where it falls out. The Query is quite easy, run it against you company database:
/*
07-06-2001
The following is a SQL Script that can be run on a database to return
all tables and columns where a particular string value is stored.
Put the value you are searching for in the line
where 'SET @string_value' appears.
*/
DECLARE @table VARCHAR(64)
DECLARE @field VARCHAR(64)
DECLARE @string_value VARCHAR(64)
DECLARE @sql_script VARCHAR(1024)
-- replace 10084 with your string. Be sure it is enlosed in single quotes like below
SET @string_value = 'x32'-- <<<<<< replace 'x32' with your value>>>>>>>
CREATE TABLE #ResultsTable (
TableName VARCHAR(64),
ColumnName VARCHAR(64)
)
DECLARE TABLES CURSOR
FOR
SELECT sysobjects.name, syscolumns.name
FROM syscolumns
INNER JOIN sysobjects ON syscolumns.id = sysobjects.id
WHERE sysobjects.type = 'U' AND syscolumns.xtype IN (167, 175, 231, 239)
ORDER BY sysobjects.name, syscolumns.name
OPEN TABLES
FETCH NEXT FROM TABLES
INTO @table, @field
WHILE @@FETCH_STATUS = 0
BEGIN
SET @sql_script = 'IF EXISTS(SELECT NULL FROM [' + @table + '] '
--SET @sql_script = @sql_script + 'WHERE RTRIM(LTRIM([' + @field + '])) = ''' + @string_value + ''') '
SET @sql_script = @sql_script + 'WHERE RTRIM(LTRIM([' + @field + '])) LIKE ''%' + @string_value + '%'') '
SET @sql_script = @sql_script + 'INSERT INTO #ResultsTable VALUES (''' + @table + ''', '''
SET @sql_script = @sql_script + @field + ''')'
EXEC(@sql_script)
FETCH NEXT FROM TABLES
INTO @table, @field
END
CLOSE TABLES
DEALLOCATE TABLES
SELECT *
FROM #ResultsTable
DROP TABLE #ResultsTable
Depending on the number of transactions you have it could take a bit but it will leave you the trail to follow to see what happened to your elusive transaction.
Kind regards,
Leslie