Viewing 15 posts - 91 through 105 (of 183 total)
Here is the table structure:
CREATE TABLE [dbo].[T_Payments](
[OrderID] [int] NOT NULL,
[CCNumber] [nvarchar](1024) NULL,
GO
CREATE TABLE [dbo].[OrderHeader](
[OrderID] [int] NOT NULL,
[CustomerID] [int] NULL,
[ShipSurname] [nvarchar](50) NULL,
[ShipForename] [nvarchar](50) NULL,
[ShipTitle] [nvarchar](20) NULL,
[ShipAdd1] [nvarchar](50) NULL,
[ShipPostcode] [nvarchar](50) NULL,
[OrderDate] [datetime]...
August 1, 2008 at 8:56 am
Will this query pull out records where the card has been used more than once with the date range, one or more different orders?
August 1, 2008 at 6:24 am
Hello Chris
What if I want to separate it: will it be like this?
SELECT hr.OrderID, hr.OrderDate, p.CCNumber
FROM T_OrderHeader h
LEFT OUTER JOIN T_Payments
ON (p.OrderID = h.OrderID d
...
August 1, 2008 at 4:42 am
Hi Chris
The reason why I wanted the card number from the payment table is because the card number column in the customers table has no records
August 1, 2008 at 3:54 am
T_Payments has the card number column, while T_OrderHeader has the OrderDate column
August 1, 2008 at 3:22 am
I later re-wrote the query and its something like this:
SELECTDISTINCT
CONVERT(VARCHAR(7), T_OrderHeader.OrderDate, 120) AS [YYYY-MM],
CONVERT(VARCHAR(20),T_OrderHeader.OrderDate, 106) AS OrderDate,
T_OrderHeader.OrderID,T_OrderHeader.CustomerID, T_OrderHeader.ShipTitle, T_OrderHeader.ShipForename, T_OrderHeader.ShipSurname,
...
August 1, 2008 at 2:15 am
Hi Guys
This is an overview, of what is intended, maybe that will give you a logical view of the process.
August 1, 2008 at 2:09 am
Hello Nigel
Some my report doesn't display in the right format. I am using the following query:
--LOST IN POST REPORT QUERY--
SELECTRIGHT(CONVERT(VARCHAR(10), T_OH.OrderDate, 103), 7) AS [MM/YYYY],
T_OH.OrderDate,
T_OH.OrderID,CustomerID, T_OH.ShipTitle, T_OH.ShipForename, T_OH.ShipSurname,
T_OH.OrderTotal,
T_RR.ReasonID,...
July 31, 2008 at 6:54 am
Thanks Chris
It worked and pulled out accurate results, was also wandering if it will be possible to pull out records of orders made by the same card within a 3...
July 31, 2008 at 5:05 am
Thanks Guys
Finally got to work, my group name within the expression wasn't the same when I checked the edit group section.
July 30, 2008 at 11:01 am
This is the expression I used: ="Orders Cancelled: " + CountRows("CancelledBy").ToString
I have also attached a screen shot of the table in BIDS.
July 30, 2008 at 10:12 am
Viewing 15 posts - 91 through 105 (of 183 total)