Skip to main content
added 61 characters in body
Source Link
nzsquall
  • 405
  • 2
  • 11
  • 27

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001              05
55001    05        10
55001    10        15
55001    15        20
55001    20        30
56215    06        11
56215    11        22

I need to write a query (or a SP) to produce a result set to list all movements for each distinct event_ID which looks like this: Event ID Movements

Event ID Movements
55001    05 10 15 20 30
56215    06 11 22

How can I do that?

*Edit to simplify the example

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001              05
55001    05        10
55001    10        15
55001    15        20
55001    20        30
56215    06        11
56215    11        22

I need to write a query (or a SP) to produce a result set looks like this: Event ID Movements

55001    05 10 15 20 30
56215    06 11 22

How can I do that?

*Edit to simplify the example

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001              05
55001    05        10
55001    10        15
55001    15        20
55001    20        30
56215    06        11
56215    11        22

I need to write a query (or a SP) to produce a result set to list all movements for each distinct event_ID which looks like this:

Event ID Movements
55001    05 10 15 20 30
56215    06 11 22

How can I do that?

*Edit to simplify the example

deleted 111 characters in body
Source Link
nzsquall
  • 405
  • 2
  • 11
  • 27

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001              05
55001    05        26
55001    26        28
55001    28        27
55001    27        2610
55001    2610        2715
55001    2715        2820
55001    28    20    30
55001    30        40
56215    05        10
56215    1006        8511
56215    8511        5522

I need to write a query (or a SP) to produce a result set looks like this: Event ID Movements

55001    05 26 28 27 2610 2715 2820 30 40
...56215    06 11 ...22

How can I do that?

*Edit to simplify the example

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001              05
55001    05        26
55001    26        28
55001    28        27
55001    27        26
55001    26        27
55001    27        28
55001    28        30
55001    30        40
56215    05        10
56215    10        85
56215    85        55

I need to write a query (or a SP) to produce a result set looks like this: Event ID Movements

55001    05 26 28 27 26 27 28 30 40
...      ...

How can I do that?

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001              05
55001    05        10
55001    10        15
55001    15        20
55001    20        30
56215    06        11
56215    11        22

I need to write a query (or a SP) to produce a result set looks like this: Event ID Movements

55001    05 10 15 20 30
56215    06 11 22

How can I do that?

*Edit to simplify the example

added 10 characters in body
Source Link
nzsquall
  • 405
  • 2
  • 11
  • 27

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001              05
55001    05        26
55001    26        28
55001    28        27
55001    27        26
55001    26        27
55001    27        28
55001    28        30
55001    30        40
56215    05        10
56215    10        85
56215    85        55

I need to write a query (or a SP) to produce a result set looks like this: Event ID Movements

55001    05 26 28 27 26 27 28 30 40
...      ...

How can I do that?

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001    05
55001    05        26
55001    26        28
55001    28        27
55001    27        26
55001    26        27
55001    27        28
55001    28        30
55001    30        40
56215    05        10
56215    10        85
56215    85        55

I need to write a query (or a SP) to produce a result set looks like this: Event ID Movements

55001    05 26 28 27 26 27 28 30 40
...      ...

How can I do that?

I have a database table looks like this:

EVENT_ID TEXT_FRO TEXT_TO
55001              05
55001    05        26
55001    26        28
55001    28        27
55001    27        26
55001    26        27
55001    27        28
55001    28        30
55001    30        40
56215    05        10
56215    10        85
56215    85        55

I need to write a query (or a SP) to produce a result set looks like this: Event ID Movements

55001    05 26 28 27 26 27 28 30 40
...      ...

How can I do that?

added 10 characters in body
Source Link
nzsquall
  • 405
  • 2
  • 11
  • 27
Loading
deleted 14 characters in body; edited title
Source Link
John Saunders
  • 161.9k
  • 26
  • 252
  • 403
Loading
added 62 characters in body
Source Link
John Woo
  • 264.5k
  • 70
  • 508
  • 500
Loading
Source Link
nzsquall
  • 405
  • 2
  • 11
  • 27
Loading