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.
Author |
Topic |
JR83
Starting Member
31 Posts |
Posted - 2014-08-14 : 06:11:40
|
Hi AllI was wondering how can i reference a column in a view.What i am trying to do is this:My duplicate check runs against the entire column. There might be another test field that has the same value, and that might be valid, so im trying to make sure that when i do the check, i am checking only against the serial number field and not all test fields. |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-08-14 : 07:55:22
|
Not enough info, Please post:1. CREATE TABLE statements to create the tables used in the view2. INSERT INTO statements to populate the tables with test data3. Your query (view) so far4. Expected results of the view you are writing |
 |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2014-08-14 : 19:36:01
|
A View is a virtual table. You reference its columns the same way you would a table. The way to check for duplicates in the SerialNumber column of a table or a view are the same. Too often we enjoy the comfort of opinion without the discomfort of thought. - John F. Kennedy |
 |
|
|
|
|