Question : SQL Select Statement

I have a SQL Query that I need modified.  It currently shows

dealID      EventData      TwoDayNotification     SevenDayNotification
1190         07/29/2010      07/27/2010                 07/22/2010
1340         07/29/2010      07/27/2010                    07/22/2010

What I need is all dealID's where EventData - 2 OR EventData - 7 = today.

And I need the output to be

todaysDeals     TypeOfNotification
1190                         2
1340                         2
dealx                         7
dealy                         7
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Select * into #temp from CRMPROD_01.dbo.P_Events_Table where EventTypeID not in (24,33) and EventData > getdate() -2


Select dealID, CONVERT(VARCHAR(10), eventdata,101) as EventDate, 
		CONVERT(VARCHAR(10), dbo.fn_AddBizDays(EventData, - 2),101) as TwoDayNotification, 
		CONVERT(VARCHAR(10), dbo.fn_AddBizDays(EventData, - 7),101) as SevenDayNotification
from #temp
Where EventTypeID = 14
And  CONVERT(VARCHAR(10), eventdata,101) = CONVERT(VARCHAR(10),getdate() + 2,101)
order by EventData, dealID

Answer : SQL Select Statement

the database desktop is ideal for this

it is located in your directory: c:\program files\borland\database desktop

you can open a file using the tool from the menu / open file
then look for the data files (like biolife) or your file and open it
you can find paradox files in c:\program files\common files\borland shared\data

here is a screen shot of the structure of biolife.db
with the red squared button you get to see the structure
you can then also change it



Random Solutions  
 
programming4us programming4us