Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change value to be displayed in mmDataGridView
Message
From
10/07/2008 15:03:56
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01328179
Message ID:
01330332
Views:
13
Hi Linda,

In MS Sql Server you can easily create a SQL view that returns a char Yes or No field based on the value of a bit field in the same table. Just create a User Define Function that return a Yes or No base on the bit input and then use that function to create a puesdo column in the view.

I had a case where a table had a COMPANYNAME field and FNAME and LNAME fields. If COMPANYNAME was not empty, we wanted the company name to display, other wise we wanted lastname,firstname to display. I created a user define function that accepted COMPANYNAME, LNAME & FNAME as parameters and if COMPANYNAME was set it returned the value of COMPANYNAME otherwise it returned LNAME+','+FNAME.

I used this function to create a pusedo column in a view.

Hope this helps.

Tim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform