我需要查询数据库以查找返回HISTOLOGY_NUM的记录:
到目前为止,我有一个查询返回的HISTOLOGY_NUM具有最大的AP_RCVL_ACTIVITY_ID的值,但我不知道如何将其合并为需要ACTIVITY_TYPE ='His:In Queue'的>
SELECT a.HISTOLOGY_NUM, a.AP_RCVL_ACTIVITY_ID
FROM V_HISTOLOGY_ACTIVITY a
INNER JOIN (
SELECT HISTOLOGY_NUM, MAX(AP_RCVL_ACTIVITY_ID) AS AP_RCVL_ACTIVITY_ID
FROM V_HISTOLOGY_ACTIVITY
GROUP BY HISTOLOGY_NUM
) b ON a.HISTOLOGY_NUM = b.HISTOLOGY_NUM
答案 0 :(得分:0)
这将起作用:
type state = string;
type action =
| InputChange(string);
let component = ReasonReact.reducerComponent("Input");
let make = (~onSubmit, _children) => {
...component,
initialState: () => "",
reducer: action =>
switch (action) {
| InputChange(text) => ReasonReact.Update(text)
},
render: ({state: todo, send}) =>
<input
className="input"
value=todo
type_="text"
placeholder="What do you want todo"
onChange={e => send(ReactEvent.Form.target(e)##value)}
onKeyDown={
e =>
if (ReactEvent.Keyboard.key(e) == "Enter") {
onSubmit(todo);
send(() => "");
}
}
/>,
};