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)
 SQL Select Query

Author  Topic 

pssumesh2003
Starting Member

35 Posts

Posted - 2009-12-18 : 00:40:21
Hi

I am new in Sql Server 2005,
i have two tables named Account ,Tran, Tran has AccountId as Forign key
.In account account have different Transaction date and finaldate for each Account.
In transaction table transaction of each account.

My problem is to select account who don't make any transaction between
their Transaction date and finaldate.

table fields like

Account

Id, Name, Address, CretedDate ,---
101 , SAM ,jhhj, 1/10/2009
102 , Arun ,iyuy, 26/11/2009

Trans
TranId,AccId,TranDate,Amount,--
1 101 2/10/2009 500



Each account has made an instalment everymonth same day to 5 more days when they created .

i want a report to list all account who fail to made their instalment
their Due date interval

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-18 : 00:41:17
Post some sample data to make your problem clear. Show us the data in the tables and your expected output.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-18 : 00:53:52
I see you edited your post with what I requested. I'll take a look in a bit.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-12-18 : 03:19:19
Hi

Where is finaldate field in your table. can you please post clear table structure and expected output.


-------------------------
R...
Go to Top of Page
   

- Advertisement -