ここで問題が発生しました。
その列の max(timestamp) に基づいて列を選択したいのですが、取得に行き詰まっています。次のデータがあるとします。
Comments
========
abcd 2012/08/14 8:03:03 AM more data inside <- I want to retrieve this
hshsh 2012/08/13 1:03:03 AM some other comments
hahhah 2012/08/10 8:03:03 PM test it.
max(timestamp) を取得するための私の SQL は
select max(substr(comments, instr(comments, '2012'), instr(comments, 'M') - 6)) from TABLEA
しかし、このステートメントに基づいてこの列を選択するにはどうすればよいですか?
編集:
これを行うことは可能ですか:
select comments from tableA where comments like (select max(substr(comments, instr(comments, '2012'), instr(comments, 'M') - 6)) from TABLEA)
コメント列の最初の行を取得したいと思っていましたが、出力がありません。あいまいすぎないことを願っています...私はOracle SQLを使用しています。