August 10, 2010 at 2:44 pm
Hi Guys,
Complete Newbie. I need to manually add 2-3 rows of data to a table using Ms Sql Server 2005 to allow a user to login with their login details due to a constraint/bug in their usual software that does it. In short I am adding login details to the table.
When I add the data manually in the row of the table using Sql Server 2005 I have some issues:
1 - After adding in the data manually and executing it the row of data I just entered sorts itself within a row amongst 1000's of rows of data way up the page. Should the last row of data not reside at the bottom of the table or is there a way of sorting it?
2 - After a few days the data I manually entered just goes missing and is no longer visible so I have to reinput it again? Any ideas what would cause this? Rows overwriting each other maybe or some automated maintenance script?
3 - Does it matter if cells in rows are just left blank as opposed to NULL - Am i better just copying an existing 'working' row into the 'new' row and just editing the data? Does the copying and pasting bring with it other hidden data.
THANKS!
August 10, 2010 at 4:38 pm
1- The row gets added to the table and is physically placed based on whether the table is a heap or has a clustered index. How it gets retrieved for display depends on whether the sql used to retrieve it has an 'order by' clause or not. The server may be displaying the data based on the clustered index order but that display order may change if there is no 'order by' on the sql that displays it.
2- I have no idea why the data would just go away. Is this table a target for replication from somewhere else? Does it get refreshed periodically ( like a prodction refresh into a dev environment)? It could be that there are other rows that are required for a legal entry and some Q/C process runs periodically to delete orphans. Or it could be that gremlins remove it when you're not looking. Without knowing more about the application, it's impossible to tell what process is removing the data.
3- If you could post the table definitions and the sql you're using to do the update, the folks here might be able to give you a better answer. Or are you just adding data in a data grid?
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply