General information
Category:
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only