Ingres 9.2 で GROUP_CONCAT 機能をシミュレートできる簡単な方法はありますか?
次のようなテーブルがあります。
OrderID LineNumber LineText
1 1 This is an example note which is trunc
1 2 ated at a certain point.
2 1 Another note which is just one line.
等々。1 行のメモもあれば、50 行以上のメモもあります。
クエリが返すようにしたい:
OrderID FullText
1 This is an example note which truncated at a certain point.
2 Another note which is just one line.
MySQL または SQLite では、GROUP_CONCAT を使用します。MS SQL ではより困難ですが、FOR XML 機能を使用して解決策を実現します。Ingresでこれを行う方法がわかりません。単一の注文 ID の連結されたメモを返すことができるストアド プロシージャの作成を開始しましたが、それをクエリに統合する簡単な方法がわかりませんでした。
何か案は?