Populating Columns

  • Thread starter Thread starter Ian Frawley
  • Start date Start date
I

Ian Frawley

Hi All,

I was just wondering if this is possible.
I have a strongly types dataset that has a number of columns that are
populated and a couple of columns that aren't populated. I was wondering if
it is possible to populate the unpopulated coulmns using a SqlDataAdapter
and a stored procedure that takes in one parameter. I would like this
parameter to come from one of the populated columns.

Is this at all possible or do I have to iterate through the dataset and
update each row seperately?

Regards
 
If you are selecting the data out, you can create aggregate and derived
columns in your sql statement quite easily. For example (SQL Server):

SELECT column1
, CASE WHEN column1 IS null THEN 0
WHEN column1 < 0 THEN -1
ELSE column1 END AS derivedcolumn
FROM Mytable

You can add information later, but it is unnecessary in most implementations.



---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top