if (convert(date,'2012-09-03') < convert(date,'2012-09-04'))
(
PRD_file VARCHAR(1024),
PRD_date VARCHAR(20),
)
print '1 '
create table dbo.GTS_PRD_201303(
PRD_file VARCHAR(1024),
PRD_date VARCHAR(20),
)
create table #tmptb
(
PRD_file VARCHAR(1024),
PRD_date VARCHAR(20),
)
1.check tables.
========
select
name
--*
from sysobjects where type='U' and id in
(
select id from syscolumns where name like '%_DESC%'
) order by name
2.case select
================
select count(case when PROC_UNIT='051' then 1 end)C051,count(case when PROC_UNIT='741' then 1 end)C741 from ACCT_TEAM;
exec SP
========
declare @OCR_REQ_IND char(1)
exec USP_CGET_OCR_REQ_IND 'HK1', 'ILC', '', @OCR_REQ_IND out