Viewing 10 posts - 76 through 86 (of 86 total)
Oops I got it... Have googled it
Thanku so much again
--Pra:-):-)--------------------------------------------------------------------------------
December 10, 2012 at 9:38 pm
Awesome I got my output..
But can u explain me ur code...
I haven't come across charindex before... What does it do???
--Pra:-):-)--------------------------------------------------------------------------------
December 10, 2012 at 9:36 pm
Perfect.... I got the result now.....Thanku again Sean...
select
Customer.CustomerID, (case when Customer.CustomerID >3 then Orders.PONumber else cast(Orders.OrderID AS varchar) end) as 'PONumber/OrderID'
from
Customer
inner join CustomerOrders on Customer.CustomerID =CustomerOrders.CustomerID
inner join...
--Pra:-):-)--------------------------------------------------------------------------------
October 29, 2012 at 11:24 am
BriPan (10/28/2012)
select
* -- What ever column you want
,(case when Customer.CustomerID >3 then Order.PO else Order.OrderID end) as 'PO/OrderID'
from
Customer
inner join CustomerOrders on Customer.CustomerID =CustomerOrders.CustomerID
inner join Order on...
--Pra:-):-)--------------------------------------------------------------------------------
October 29, 2012 at 11:03 am
Thanks for the reply I tried using this and got some error
Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the nvarchar value 'Verbal' to data type...
--Pra:-):-)--------------------------------------------------------------------------------
October 29, 2012 at 9:58 am
Hey Thanku 🙂
--Pra:-):-)--------------------------------------------------------------------------------
October 15, 2012 at 11:05 am
I got it
SELECT Customer.CustomerName, Count(customerorders.customerID) AS Count
FROM Customer
JOIN CustomerOrders ON (Customer.CustomerID= CustomerOrders.CustomerID)
Group By CustomerName
--Pra:-):-)--------------------------------------------------------------------------------
October 15, 2012 at 10:30 am
So I get to use joins concept along with the group by clause in this case as i am going to use two differnt tables??? Not a question to you......
--Pra:-):-)--------------------------------------------------------------------------------
October 15, 2012 at 9:33 am
For the same data Provide the SQL statement that would return every CustomerName and the count of orders they have ever placed.
I have tried using the below code
select Customer.CustomerName,...
--Pra:-):-)--------------------------------------------------------------------------------
October 15, 2012 at 9:08 am
Thanku Jeff
--Pra:-):-)--------------------------------------------------------------------------------
October 15, 2012 at 8:32 am
Viewing 10 posts - 76 through 86 (of 86 total)