Click here to Skip to main content
15,881,882 members
Home / Discussions / Database
   

Database

 
GeneralRe: date manipulation Pin
scottichrosaviakosmos16-Oct-10 22:40
scottichrosaviakosmos16-Oct-10 22:40 
GeneralRe: date manipulation Pin
Mycroft Holmes17-Oct-10 2:02
professionalMycroft Holmes17-Oct-10 2:02 
AnswerRe: date manipulation Pin
Alegria_Lee17-Oct-10 19:01
Alegria_Lee17-Oct-10 19:01 
QuestionInsert Excel OR CSV File into MySQL OR MSSQL Database Pin
jasonmp16-Oct-10 12:17
jasonmp16-Oct-10 12:17 
AnswerRe: Insert Excel OR CSV File into MySQL OR MSSQL Database Pin
Mycroft Holmes16-Oct-10 12:37
professionalMycroft Holmes16-Oct-10 12:37 
AnswerRe: Insert Excel OR CSV File into MySQL OR MSSQL Database Pin
SimulationofSai16-Oct-10 14:31
SimulationofSai16-Oct-10 14:31 
AnswerRe: Insert Excel OR CSV File into MySQL OR MSSQL Database Pin
SQLMechanic29-Oct-10 5:47
SQLMechanic29-Oct-10 5:47 
QuestionMultiple Rows to Single Rows Pin
Chris Meech15-Oct-10 8:32
Chris Meech15-Oct-10 8:32 
I have a query of the form
select * from (
select ...
      ,...
      ,...
      ,a.value_1  open_value_1
      ,to_number(NULL) close_value_1
  from table a
 where a.date_col = date_1
union all
select ...
      ,...
      ,...
      ,to_number(NULL) open_value_1
      ,b.value_1  close_value_1
  from table b
 where b.date_col = date_2
);

If the list of columns represented by the ... is considered a primary key, for the situations where the primary keys are the same I end up with multiple rows
AA   BBB    CCC  open_value_1      
AA   BBB    CCC                 close_value_1

How would I tailor my query to give me only one row instead of two rows. Like this
AA   BBB    CCC  open_value_1   close_value_1


Thanks for any suggestions. Smile | :)
Chris Meech
I am Canadian. [heard in a local bar]

In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

AnswerPivot Pin
David Mujica15-Oct-10 9:06
David Mujica15-Oct-10 9:06 
AnswerRe: Multiple Rows to Single Rows Pin
PIEBALDconsult15-Oct-10 12:44
mvePIEBALDconsult15-Oct-10 12:44 
AnswerRe: Multiple Rows to Single Rows Pin
Alegria_Lee15-Oct-10 17:01
Alegria_Lee15-Oct-10 17:01 
GeneralRe: Multiple Rows to Single Rows Pin
Blue_Boy16-Oct-10 5:51
Blue_Boy16-Oct-10 5:51 
GeneralRe: Multiple Rows to Single Rows Pin
Chris Meech18-Oct-10 4:17
Chris Meech18-Oct-10 4:17 
GeneralRe: Multiple Rows to Single Rows Pin
Alegria_Lee18-Oct-10 4:48
Alegria_Lee18-Oct-10 4:48 
Questionsplitting one column into many Pin
rakeshs31215-Oct-10 0:42
rakeshs31215-Oct-10 0:42 
AnswerRe: splitting one column into many Pin
J4amieC15-Oct-10 1:17
J4amieC15-Oct-10 1:17 
GeneralRe: splitting one column into many Pin
rakeshs31215-Oct-10 2:23
rakeshs31215-Oct-10 2:23 
GeneralRe: splitting one column into many Pin
J4amieC15-Oct-10 2:53
J4amieC15-Oct-10 2:53 
AnswerRe: splitting one column into many Pin
PIEBALDconsult15-Oct-10 3:07
mvePIEBALDconsult15-Oct-10 3:07 
AnswerRe: splitting one column into many Pin
Rajesh Anuhya19-Oct-10 23:57
professionalRajesh Anuhya19-Oct-10 23:57 
Questionexesute ssis package Pin
samerh14-Oct-10 3:24
samerh14-Oct-10 3:24 
AnswerRe: exesute ssis package Pin
Vimalsoft(Pty) Ltd14-Oct-10 4:53
professionalVimalsoft(Pty) Ltd14-Oct-10 4:53 
Question1 recursive field in a Query Pin
Herman<T>.Instance14-Oct-10 0:25
Herman<T>.Instance14-Oct-10 0:25 
AnswerRe: 1 recursive field in a Query Pin
Simon_Whale14-Oct-10 0:41
Simon_Whale14-Oct-10 0:41 
AnswerRe: 1 recursive field in a Query Pin
Alegria_Lee14-Oct-10 2:11
Alegria_Lee14-Oct-10 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.