Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create a custom field from within VB.Net?

Status
Not open for further replies.

randysmid

Programmer
Dec 12, 2001
801
US
Hi ALL,
I am a relative newbie to SQL server. I've created a small handful of views and now I need to go to the next level by creating some custom fields. I am creating these views from within VB.Net for use in a Crystal Report (v. 10). For instance, my database has fields for last and first name. Instead of passing both to the report, I would like to create a custom field called "FullName". The SQL for that might look like this:
LastName & ", " & FirstName

Unfortunately, I've been unable to find any documentation on how to accomplish such a simple task from within the Server Explorer tool in VB.Net.

Any suggestions???
TIA, Randy
 
sql server syntax would be

Code:
update yourtablename
set fullname = lastname+','+firstname
[code]

this would give you a result as such:

Jones,Bill

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
HI DBomrrsm,
Thank you for taking the time to respond.

I am sorry, I must not have explained myself thoroughly. I want to do this in a View inside of Server Explorer, which is a part of the Visual Basic.Net working environment.

TIA, Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top