All, Say I have a table that looks like this:
SerialNumber | Stim | Resp -------------|-------|--------- . | . | . . | . | . 123 | V0 | 0.136 123 | V1 | 0.201 123 | V2 | 0.297 123 | V3 | 0.311 123 | V4 | 0.408 123 | V5 | 0.599 124 | . | . 124 | . | . I want the rows containing V0 and V5 to become columns like this: SerialNumber | V0 | V5 -------------|-------|------- 123 | 0.136 | 0.599 124 | 0.126 | 0.587 125 | 0.119 | 0.602 I am presently using two SELECT statements as follows: SELECT SerialNumber, Resp AS V0 WHERE SerialNumber = '123' AND Stim = 'V0' SELECT SerialNumber, Resp AS V5 WHERE SerialNumber = '123' AND Stim = 'V5' And then reformatting the results using C# code before outputting to .csv file. Is there a way to do everything in SQL? I looked this up online and found some pretty complicated examples. Is it really that hard? Thanks, -- Bill Drago Senior Engineer L3 Narda-MITEQ 435 Moreland Road Hauppauge, NY 11788 631-272-5947 / William.Drago at L-3COM.com CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any attachments are solely for the use of the addressee and may contain information that is privileged or confidential. Any disclosure, use or distribution of the information contained herein is prohibited. In the event this e-mail contains technical data within the definition of the International Traffic in Arms Regulations or Export Administration Regulations, it is subject to the export control laws of the U.S.Government. The recipient should check this e-mail and any attachments for the presence of viruses as L-3 does not accept any liability associated with the transmission of this e-mail. If you have received this communication in error, please notify the sender by reply e-mail and immediately delete this message and any attachments.