Viewing 15 posts - 16 through 30 (of 42 total)
i tried to get all the productid within a package (and apackage itself is also a product) with the following query.
WITH RecursiveTable_CTE(ProductID, PackageID)
AS
(
SELECT pp.ProductID, pp.PackageID FROM ProductPackage pp
UNION...
January 20, 2009 at 11:23 am
Go it now .
Below is the query i just tweaked it more.
with PG as (Select Distinct OD.OrderID, P.ProductGroup
from OrderDetail OD join Product p on P.ProductID = OD.ProductID
where P.Productgroup...
January 9, 2009 at 4:11 pm
I want to show on report where any body ordered
CFA &FRM Ordered Together that means they can order any number on this combination.
CAIA & CFA Ordered Together that means they...
January 9, 2009 at 3:03 pm
Results of Above query:
SELECT '39495','PREL1','CFA Book','PREL1' UNION ALL
SELECT '39496','1','Flashcards (Palm Pilot Version)','CFA' UNION ALL
SELECT '39497','2','Flashcards (Palm Pilot Version)','CFA' UNION ALL
SELECT '39498','3','Flashcards (Palm Pilot Version)','CFA' UNION ALL
SELECT '39499','1','Flashcards (Paper Version)','CFA' UNION...
January 9, 2009 at 2:07 pm
Table Name : Products And Orderdetail
PRODUCTID PRODUCTGROUP LEVELS
1 ...
January 9, 2009 at 1:22 pm
Table Name : Products And Orders
PRODUCTID PRODUCTGROUP LEVELS
1 ...
January 9, 2009 at 12:45 pm
Requirement: I need a query to report where if any one ordered more than one product group it should show me on report but have exception if
CFA &FRM Ordered Together...
January 9, 2009 at 12:36 pm
Got It Sir, My Bad
Corrected Query:
SELECT
CASE
When NOEmail = 1 then '1'
WHEN EMail
In (Select emailaddress from Reports.dbo.OptOutEmailAddresses) then '1'
When
Substring(Customer.Email, (CHARINDEX('@', Customer.Email)+1), 1000)
in
(select emaildomain from Reports.dbo.optoutemaildomains) then '1'
else...
December 18, 2008 at 11:01 am
Got It Sir, My Bad
Corrected Query:
SELECT
CASE
When NOEmail = 1 then '1'
WHEN EMail
In (Select emailaddress from Reports.dbo.OptOutEmailAddresses) then '1'
When
Substring(Customer.Email, (CHARINDEX('@', Customer.Email)+1), 1000)
in
(select emaildomain from Reports.dbo.optoutemaildomains) then '1'
else...
December 18, 2008 at 11:01 am
Got It Sir, My Bad
Corrected Query:
SELECT
CASE
When NOEmail = 1 then '1'
WHEN EMail
In (Select emailaddress from Reports.dbo.OptOutEmailAddresses) then '1'
When
Substring(Customer.Email, (CHARINDEX('@', Customer.Email)+1), 1000)
in
(select emaildomain from Reports.dbo.optoutemaildomains) then '1'
else...
December 18, 2008 at 11:00 am
Got It Sir, My Bad
Corrected Query:
SELECT
CASE
When NOEmail = 1 then '1'
WHEN EMail
In (Select emailaddress from Reports.dbo.OptOutEmailAddresses) then '1'
When
Substring(Customer.Email, (CHARINDEX('@', Customer.Email)+1), 1000)
in
(select emaildomain from Reports.dbo.optoutemaildomains) then '1'
else...
December 18, 2008 at 11:00 am
Got It Sir, My Bad
Corrected Query:
SELECT
CASE
When NOEmail = 1 then '1'
WHEN EMail
In (Select emailaddress from Reports.dbo.OptOutEmailAddresses) then '1'
When
Substring(Customer.Email, (CHARINDEX('@', Customer.Email)+1), 1000)
in
(select emaildomain from Reports.dbo.optoutemaildomains) then '1'
else...
December 18, 2008 at 10:59 am
Datatype for no email is bit in customer table i wnat to include this in a case statement.
SELECT
CASE
WHEN NoEMail NOT IN
(select emailaddress from Reports.dbo.OptOutEmailAddresses)
AND
substring
(Customer.Email, (CHARINDEX('@',...
December 18, 2008 at 10:36 am
Viewing 15 posts - 16 through 30 (of 42 total)