Question : SQL server 2008 query with grouping

I am working on a report in SQL server 2008 using the report desinger and need to do some unique grouping.  

Here is my current select statement that works great except for the grouping.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
SELECT
  CustInv.TransactionDate
  ,CustInv.UserTranNumber
  ,Cust.CompanyName
  ,CustIDet.AircraftNumber
  ,CustIDet.NumNameCode
  ,CustIDet.Quantity
  ,CustIDet.SalePrice
  ,CustIDet.UnitCost
  ,CustIDet.SalePrice - CustIdet.Unitcost AS Margin
FROM
  CustInv
  JOIN Cust
    ON
       CustInv.CustomerID = Cust.CustomerID
  JOIN CustIDet
    ON
       CustIDet.TransactionID = CustInv.TransactionID
WHERE
  CustInv.TransactionDate BETWEEN @startDate AND @endDate
AND
  CustInv.LocationID = @location
AND
  CustIDet.NumNameCode LIKE 'JET-A%'
ORDER by CustInv.TransactionDate ASC


The results are currently being grouped in the report designer on the field NumNameCode. The values in this field are one of the following:

Jet-A
Jet-A w/Prist
Jet-A * Base
Jet-A * Base w/Prist
Jet-A * Contract
Jet-A * Contract w/Prist
Jet-A * Fractional
Jet-A * Fractional w/Prist

The current grouping keeps them all separated which I know is correct.  What I am trying to do is group them into the 4 types regardless if it is w/prist or not.  My groups should be:
Jet-A
Jet-A*Base
Jet-A*Contract
Jet-A*Fractional

How can I accomplish this?  Do I need 4 individual queries or is there another way to do it?

Answer : SQL server 2008 query with grouping

view the running config of your firewall and look out for rules like this;

ip nat inside source static 172.16.1.1 11.22.33.44

where172.16 or 10.0 or 192.168 can be your private ip range and 11.22.33.44 (respective entry in ur config) is your public IP.

Go through this link.

http://www.cisco.com/en/US/docs/security/asa/asa82/configuration/guide/nat_overview.html

Random Solutions  
 
programming4us programming4us