Advertisement

11.21.2007 at 11:10PM PST, ID: 22977024
[x]
Attachment Details

Creating View for many records based on value of one field  - SQL Server 2005

Asked by Saxitalis in SQL Server 2005

Tags: sql, field, one, records, value

Hello,

I have a table in SQL SERVER 2005. I would like to create a view that populates all records of a given Num value if one or more weights in records of that Num value = 0.

Table1
Num, weight
1,       5.3
2,       0
2,       25.3
2,       32.6
3,       2.3
3,       1.9
4,       53.3
4,       0


I want the view to look like this:

View1
Num, weight
2,      0
2,      25.3
2,      32.6
4,      53.3
4,      0

Note. Records of Num Value 1 and 3 don’t show up because all the weight values for these records is > 0.

Does anyone know how to do this??

Thanks!
Start Free Trial
[+][-]11.21.2007 at 11:16PM PST, ID: 20333016

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: SQL Server 2005
Tags: sql, field, one, records, value
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 2
Solution Grade: A
 
 
[+][-]11.22.2007 at 06:22AM PST, ID: 20334480

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.22.2007 at 06:23AM PST, ID: 20334488

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.22.2007 at 07:32AM PST, ID: 20334835

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628