我有两张桌子;
DummyTable
Column1 | Column2 | Column3
a | b | c
GoodTable
Column1 | Column2 | Column3
a | b | c
我是T-SQL的新手,需要帮助做以下事情;
使用条件
将数据从DummyTable合并到GoodTable中以下是我的不工作尝试
MERGE INTO GoodTable AS Target
USING (VALUES (SELECT Column2 FROM DummyTable)) AS source (Column2)
ON Target.Column2 = Source.Column2
WHEN MATCHED BY TARGET THEN
UPDATE (Column2) VALUES (Column2)
WHEN NOT MATCHED BY TARGET THEN
INSERT INTO GoodTable VALUES DummyTable
答案 0 :(得分:0)
看看这是否适合您。这是基于您的逻辑。
@Override
public void bindView(View view, Context context, Cursor cursor){
int row_id = cursor.get('_id'); //Your row id (might need to replace)
Button button = (Button) view.findViewById(R.id.buttonEE);
button.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v){
//ADD STUFF HERE you know which row is clicked. and which button
}
});
}