Chance1234
IS-IT--Management
this is bit of a newb question as i dont do much reporting type work with SQL,
I know the use of cursors is generally frowned upon , and i have the following scenario where i woudl use a cursor
Ive never really got the hang of this nested queries but should i be looking at them in the following scenario
First of all i have a table called clients
Next i have a dealing table that looks something like this
I then need to produce a report along the folling
Chance,
F, G + Its official, its even on a organisation chart et all
I know the use of cursors is generally frowned upon , and i have the following scenario where i woudl use a cursor
Ive never really got the hang of this nested queries but should i be looking at them in the following scenario
First of all i have a table called clients
Code:
client_id client_name
1 Joe
2 Frank
3 Sid
Next i have a dealing table that looks something like this
Code:
d_type d_client_id d_amount d_day
Reg 1 500 01/01/2007
Reg 1 60 02/01/2007
Reg 1 80 03/01/2007
Reg 2 60 01/01/2007
Reg 2 70 02/01/2007
Lump 1 90 02/01/2007
Lump 2 30 03/01/2007
Lump 2 20 04/01/2007
Lump 3 50 02/01/2007
I then need to produce a report along the folling
Code:
Report Between 01/01/2007 03/01/2007
client_name Reg Lump
Joe 640 90
Frank 130 30
Sid 0 50
Chance,
F, G + Its official, its even on a organisation chart et all