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!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top