Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change value to be displayed in mmDataGridView
Message
De
10/07/2008 15:03:56
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01328179
Message ID:
01330332
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform