Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2007, 07:14 AM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sql Server Database

Sir,
While creating Table I want to use the Computed column Specification. but i don't know how to use it. please give me suitable example.

 
Old May 16th, 2007, 07:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you post us here on what is that you wanted to do, so that we can help you better.

_________________________
- Vijay G
Strive for Perfection
 
Old May 17th, 2007, 02:13 AM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Thanks for giving me reply.
Sir, When we create table in Sql Server Database. there is a column property (Computed Column Specification). We can make formula over there. but i don't know how to make the formula.
Suppose i have to make table (TBSalary)
Columns are:
1. EmpID - nvarchar(50)
2. Basic - INT
3. TA (Use Computed Column Specification to calculate 5% of Basic Assumed)
4. DA 500 RS. Fixed.
5. Gross (Use Computed column Specification to calculate Basic + TA + DA)
5. Deductions (Use computed columns Specification to calcuate 12% of Basic Assumed)
6. Net (Use Computed Column Specification to calculate Gross - Deduction)
the formula for Gross = ([Basic] + [ta] +[da])
but the questin arise how can we take computed column in formla , to calculate Deduction from gross.

Vineet Kharbanda





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database connection with SQL Server yubaraj JSP Basics 3 May 29th, 2007 04:39 AM
install database on SQL Server decap_itate VB Databases Basics 0 May 2nd, 2006 10:02 AM
SQL database from one server to another. singhvicky MySQL 1 February 25th, 2005 05:57 AM
sql server database is read-only jram SQL Server 2000 2 October 1st, 2003 02:18 PM
Recovering a SQL Server 4.2 database bluckcuck SQL Server 2000 3 July 2nd, 2003 06:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.