So my question is:
If the requirement is as simple as
--selecting unique rows from table1
--inserting into temp table
--populatinf rest of data
--displaying temp table data
Then why you need to go for a temp table ? Do it in a single SQL statement, like:
SELECT <Whatever>, CASE WHEN col1 IS NULL THEN <Populate data here>
FROM table1
Here i supposed we want to populate col1 if the value is null (you can adjust accordingly).
Or better you tell us the complete scenario (e.g; what needs to be populated and from where) and maybe we will be able to help you more
Main Topics
Browse All Topics





by: bgloddePosted on 2005-09-11 at 14:35:24ID: 14860506
Also, can that type of operation be done in a view if needed?