Hi All,
I was wondering, do I going to the get the output with one single query .
Temp_Table has 3 col's
Temp_Table Values
PName PAmt PType
---------------------------------
Type1 100 1
Type2 100 1
Type3 100 1
Type1 50 2
Type2 50 2
Type1 25 1
PType 1 = Approved
2 = Pending
The output should be
PName Approved Pending
-------------------------------------
Type1 125 50
Type2 100 50
Type3 100 0
I can generate this report with 2 query's is that possible with one single query. Which helps me to reduce my calls to the DB.
Thank you in advance.
venu
I was wondering, do I going to the get the output with one single query .
Temp_Table has 3 col's
Temp_Table Values
PName PAmt PType
---------------------------------
Type1 100 1
Type2 100 1
Type3 100 1
Type1 50 2
Type2 50 2
Type1 25 1
PType 1 = Approved
2 = Pending
The output should be
PName Approved Pending
-------------------------------------
Type1 125 50
Type2 100 50
Type3 100 0
I can generate this report with 2 query's is that possible with one single query. Which helps me to reduce my calls to the DB.
Thank you in advance.
venu