Information générale
Catégorie:
The Mere Mortals .NET Framework
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement