Sunday, July 31, 2011

Generate SQL Queries

select *from AM_DataSource

select 'Insert into AM_CalculationMaster(Id,Name,IsFinancialField,AccountNumber,EquationString)values('+ CAST(Id As Varchar(100))+','+ QUOTENAME(Name,'''')+',1,0,'+ IsNULL(QUOTENAME(EquationString,''''),'')+ ')' from Am_DataSource

 

Capture

0 comments:

Post a Comment