I have a table (myData) with lots of columns and rows,
and have another table (myFileNo) single value which means single row, single column, single cell (FileNo),
I wrote an sql query which updates myData by checking myFileNo, and after process ends it changes the value of FileNo.
It does not make much sense to me to keep the single value data in a table, is this the proper way to do it ?
Edit: purpose of FileNo
It acts as an identification number, but not created like a primary key. An example (before, and after):
Before
myData, FileNo
A, NULL
A, NULL
B, NULL
C, NULL
A, NULL
D, NULL
D, NULL
FileNo: 15
After
myData, FileNo
A, 16
A, 16
B, 17
C, 18
A, 16
D, 19
D, 19
FileNo: 19
In the case that the fileNo is being referenced by multiple tables and processes then storing it in a table is fine, you could investigate extended properties, but I would keep it in a table.
If you only need it for this table and you only need to be able to identify the maximum value + 1 for the next load, I suggest you just check Max(FileNo) before inserting, providing this does not cause performance issues, based on the size of the table.