Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Default Value or Binding

Author  Topic 

rico1931
Starting Member

37 Posts

Posted - 2009-04-09 : 14:33:51
Hello all,

My question is about SQL 2008 Default value or Binding option. I was wondering if it was at all possible to "get" a value for this from another table.

For example: Table A and Table B

Table A - Default Value in Column A
Table B - Holds current Value in Column B

I want to insert the current Value from column B into Column A when I insert a specific fact into Table A from Table B. Here is the kicker though, When I put a new record into Table A and it is NOT from Table B it needs a default value of 0 or Null or nothing...

I hope this isn't confusing. Just wondering if this was possible.

Thank you!
-X

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-04-09 : 14:35:25
Please show us a data example of what you mean as it's hard for us to understand what you want with just an explanation.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -