Viewing 10 posts - 76 through 85 (of 85 total)
Awesome I got my output..
But can u explain me ur code...
I haven't come across charindex before... What does it do???
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...
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...
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...
October 29, 2012 at 9:58 am
I got it
SELECT Customer.CustomerName, Count(customerorders.customerID) AS Count
FROM Customer
JOIN CustomerOrders ON (Customer.CustomerID= CustomerOrders.CustomerID)
Group By CustomerName
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......
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,...
October 15, 2012 at 9:08 am
Viewing 10 posts - 76 through 85 (of 85 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy