Select IF

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Select IF

Hans Chen
*Dear Sir or Madam:*

* *

*I have a dataset which contain following columns*

* *

*Customer |Sales |Quantity |Sales Price |Type| Finish| Color |Province|
Year| Month| day|*

*Penner*

*Distinctive*

*...*

*Walters*

* *
*Could you tell me how to select all the records of customer "Penner" from
the huge data in SPSS(syntax)and then conduct analysis? Thanks!*
**
**
**
**
*Hans Chen*
Reply | Threaded
Open this post in threaded view
|

Re: Select IF

Richard Ristow
At 10:43 PM 11/24/2006, SPSS Chen wrote:

>*I have a dataset which contain following columns*
>
>*Customer |Sales |Quantity |Sales Price |Type| Finish| Color
>|Province|
>Year| Month| day|*
>
>*Could you tell me how to select all the records of customer "Penner"
>from
>the huge data in SPSS(syntax)and then conduct analysis? Thanks!*

To select those for customer "Penner" and drop the rest from the
working file (so you MUST have a saved copy of the file including all
customers):

SELECT IF Customer EQ "Penner".

To keep all customers, but run analyses on only those records for
customre "Penner",

COMPUTE Is_Penner = (Customer EQ "Penner").
FILTER BY IS_Penner.