그래서 int 목록을 제공하는 SQL 쿼리가 있습니다. 여기에 나열 :다른 쿼리의 표 채우기
이 나에게 내가 다른 것들과 함께 다른 테이블에 삽입 할 필요가 아이디의 목록을 제공select distinct
re_entity_id
from cfo_transaction
inner join cfo_tran_quote ON tq_tr_transaction_id = tr_transaction_id
inner join cfo_trans_entity_rel on te_tr_transaction_id = tr_transaction_id and te_rv_rel_type_id in (713,715)
inner join com_entity on te_co_re_entity_id = re_entity_id
where
dbo.islmsloan(tq_tran_quote_id) = 1
and isnull(re_fictitious_bit,0) = 0
. 다른 테이블은 다음과 같습니다
ens_engine_sponsor_id - PK
ens_rs_sponsor_id - relates to the id from the other query
ens_use_new_models_bit - should always be 1 for each insert
ens_start_dt - should be 09/05/2011 for every one
ens_end_dt - should be null for every one
가 어떻게 자동으로 부여 기준이 새 테이블에있는 그 아이디의 각 행을 삽입 뭔가를 공식화하는 것? (SQL에 그리 좋은 ...)
감사
09/05/2011은 9 월 5 일 또는 9 월 5 일입니까? –
9 월 5 일 ... 좋은 전화 – slandau