Click here to Skip to main content
15,915,975 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have to build a select statment after this in which MY system processes transactional data between April 1, 2009 or client activation date till last completed EOD(end of day) date for each segments, using where clause. There are 6 different segments and i want to build the logic for each segment separably.

I have to set @todate=MAx(saudadate) with where clause
and call that todate in select statement with some codition

CAn some one plz help me with this.
Posted
Updated 13-Jun-12 20:39pm
v3
Comments
RDBurmon 14-Jun-12 2:42am    
Thanks saurabh for started using Codeproject . My request you to format your question in below format
1) {I have this data stucture}
2) {I have this data}
3) {I want this logic to be implemented in my solutions}
4) {so I will get this result as per data which is described above}

That would be better to understand your question and you will get helpful response quickly.

1 solution

as i understand your query i am giving u a solution which will return last 10 days changes in your database. convert it as your requirment

SQL
SELECT name AS object_name
  ,SCHEMA_NAME(schema_id) AS schema_name
  ,type_desc
  ,create_date
  ,modify_date
FROM sys.objects
WHERE modify_date > GETDATE() - 10
ORDER BY modify_date
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900