Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Query is not giving the results

Author  Topic 

khufiamalik
Posting Yak Master

120 Posts

Posted - 2008-08-20 : 05:03:49
Hello All,
I have been using the following syntax to execute my dynamic query

EXEC sp_executeSql @lComplete_Query_Temp, N'@output VARCHAR(100) OUTPUT', @opRuleQueryResultTEMP OUTPUT

When I Run the Query , it is working fine BUT
When I try to print opRuleQueryResultTEMP variable, it doesn't show any thing.

My Query is

With Table2(Emp_Code,Basic_Pay,[Start_Date],End_Date,Fiscal_Year_ID) as (select Emp_Code,Basic_Pay,[Start_Date],End_Date,Fiscal_Year_ID from EMP_Salary union select Emp_Code,Basic_Pay,[Start_Date],End_Date,Fiscal_Year_ID from EMP_Salary_History ) select Basic_Pay*60/100 as RuleResultantColumn from Table2 where Emp_Code=Sys_EMP1 and Fiscal_Year_ID=1 and [Start_Date]=(select MAX([Start_Date]) from Table2)

dexter.knudson
Constraint Violating Yak Guru

260 Posts

Posted - 2008-08-20 : 05:22:59
Is there more to the query? I can't see where you are assigning the output values.
Go to Top of Page
   

- Advertisement -