Re: Extract data to new fields
From: gordzilla2000 (gordzilla2000_at_hotmail.com)
Date: 03/17/04
- Next message: John Vinson: "Re: Calculation"
- Previous message: Paul James: "Re: Generalizing the path in a linked table for a network"
- In reply to: Rodrigo: "Re: Extract data to new fields"
- Next in thread: Rodrigo: "Re: Extract data to new fields"
- Reply: Rodrigo: "Re: Extract data to new fields"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Mar 2004 16:28:43 -0800
That would work except I need to get the Field name "Q2"
into the new table as well as the
The new table will have the fields
SurveyID, Question_no, Reponse
1 Q1 Yes
1 Q2 No
Currently the field Q1 holds the response and the Field
name represents the question number.
There are over 800 fields (questions) in 5 tables
>-----Original Message-----
>try a union query:
>
>make this query and save it.
>select SurveryId, Q1 as Question, Response from
tblSurvey
>union
>select SurveryId, Q2 as Question, Response from
tblSurvey
>union
>select SurveryId, Q3 as Question, Response from
tblSurvey
>union
>select SurveryId, Q4 as Question, Response from
tblSurvey
>union
>select SurveryId, Q5 as Question, Response from
tblSurvey
>
>then make an append query and append all records from
the union query into
>your new table.
>
>Rodrigo.
>
>
>
>Rodrigo.
>"gordzilla2000" <gordzilla2000@hotmail.com> wrote in
message
>news:e4ea01c40b9a$2f4fbb00$a501280a@phx.gbl...
>> I have a table that was created to accept the responses
>> from a survey.
>>
>> The table was created with a field for each response to
>> each question:
>> SurveyID autonumber
>> q1 text 50
>> q2 text 50
>> q3 text 50
>> q4 text 50
>> etc.
>>
>> I would like to change this to one record per question
>> i.e.
>>
>> SurveyID autonumber
>> Question_no text 2
>> Response text 50
>>
>> A sample of records would then be:
>> 1 Q1 Yes
>> 1 Q2 No
>> 2 Q1 No
>> 2 Q2 Yes
>>
>> Is there an easy way to do this?
>>
>
>
>.
>
- Next message: John Vinson: "Re: Calculation"
- Previous message: Paul James: "Re: Generalizing the path in a linked table for a network"
- In reply to: Rodrigo: "Re: Extract data to new fields"
- Next in thread: Rodrigo: "Re: Extract data to new fields"
- Reply: Rodrigo: "Re: Extract data to new fields"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|