select ZSGiftSignIn_m.ZStart_Date,sum(zqty) as zqty into 一个表 from ZSGiftSignIn_d,ZSGiftSignIn_m where ZSGiftSignIn_d.ZGift_ID in (select ZGift_ID from ZSGiftInfo where zGift_Category='白金卡')and ZSGiftSignIn_m.ZVouch_ID=ZSGiftSignIn_d.ZVouch_ID and ZSGiftSignIn_d.ZScore_ID in (select ZScore_ID from ZSMemberInfo)and ZSGiftSignIn_m.ZStart_Date between @data and @data2 and ZSGiftSignIn_d.ZGift_ID in (select ZGift_ID from ZSGiftInfo )group by ZSGiftSignIn_m.ZStart_Date
SELECT [select_list] INTO {:hvar [,...]} select_options---------------------------------
select ZSGiftSignIn_m.ZStart_Date,sum(zqty) as zqty into [tablename] from
~~~~~~~~~~~~~~~~
select ZSGiftSignIn_m.ZStart_Date,sum(zqty) from ZSGiftSignIn_d,ZSGiftSignIn_m where ZSGiftSignIn_d.ZGift_ID in (select ZGift_ID from ZSGiftInfo where zGift_Category='白金卡')and ZSGiftSignIn_m.ZVouch_ID=ZSGiftSignIn_d.ZVouch_ID and ZSGiftSignIn_d.ZScore_ID in (select ZScore_ID from ZSMemberInfo)and ZSGiftSignIn_m.ZStart_Date between @data and @data2 and ZSGiftSignIn_d.ZGift_ID in (select ZGift_ID from ZSGiftInfo )group by ZSGiftSignIn_m.ZStart_Date