Viewing 15 posts - 76 through 90 (of 441 total)
GilaMonster (1/11/2016)
Table definitions and sample data please.
Hi Gail,
I have attached the create script for dbo.Name
January 11, 2016 at 8:34 am
Thanks Jacob, that worked.
I also tried this way and it worked as well, just FYI.
Select * from activity where product_code like '%WELL%' and transaction_date between '2013-01-01' and '2014-12-31'
Thanks again.
January 5, 2016 at 12:19 pm
SQLisAwE5OmE (12/30/2015)
SELECT DISTINCT females_only.*
From dbo.vw_csys_NurserySchool
Cross Apply (
SELECT Parent1_id, Parent1_FullName, Parent1_Email, Parent1_STATUS, Parent1_Gender, YEAR, FULL_ADDRESS
WHERE Parent1_Gender = 'F'
UNION ALL
SELECT Parent2_id, Parent2_FullName,...
December 30, 2015 at 5:07 pm
Okay, Thanks for your inputs. Appreciate it.
December 30, 2015 at 2:52 pm
Jeff Moden (12/30/2015)
SQLisAwE5OmE (12/30/2015)
December 30, 2015 at 1:25 pm
I tried to include the CATEGORY field to the script Jeff provided and it seems working, but my only concern is, this doesn't pull the parent2 field....as my original script....so,...
December 30, 2015 at 11:09 am
ScottPletcher (12/30/2015)
From dbo.vw_csys_NurserySchool
Cross Apply (
SELECT Parent1_id, Parent1_FullName, Parent1_Email, Parent1_STATUS, Parent1_Gender, YEAR, FULL_ADDRESS
WHERE Parent1_Gender = 'F' AND CATEGORY <> 'STF'
UNION
SELECT Parent2_id, Parent2_FullName, Parent2_Email, Parent2_STATUS, Parent2_Gender,YEAR, FULL_ADDRESS
WHERE Parent2_Gender = 'F'...
December 30, 2015 at 10:18 am
SQLisAwE5OmE (12/30/2015)
SELECT DISTINCT females_only.*
From dbo.vw_csys_NurserySchool
Cross Apply (
SELECT Parent1_id, Parent1_FullName, Parent1_Email, Parent1_STATUS, Parent1_Gender, YEAR, FULL_ADDRESS
WHERE Parent1_Gender = 'F'
UNION ALL
SELECT Parent2_id, Parent2_FullName,...
December 30, 2015 at 9:03 am
Not after I modified the script as Alan mentioned as below.
SELECT DISTINCT females_only.*
From dbo.vw_csys_NurserySchool
Cross Apply (
SELECT Parent1_id, Parent1_FullName, Parent1_Email, Parent1_STATUS, Parent1_Gender, YEAR, FULL_ADDRESS
WHERE Parent1_Gender = 'F'
UNION ALL
SELECT Parent2_id, Parent2_FullName, Parent2_Email,...
December 30, 2015 at 8:05 am
Jeff Moden (12/29/2015)
SQLisAwE5OmE (12/29/2015)
Jeff, See the attachment for the create view script. Thanks.
Thanks for that. That view is a bit of a "Rosetta Stone" for what the table...
December 30, 2015 at 7:58 am
Jeff, See the attachment for the create view script. Thanks.
December 29, 2015 at 7:55 pm
I am really sorry Jacob. Thank you!....that seems working now.
SELECT DISTINCT females_only.*
From dbo.vw_csys_NurserySchool
Cross Apply (
SELECT Parent1_id, Parent1_FullName, Parent1_Email, Parent1_STATUS, Parent1_Gender, YEAR, FULL_ADDRESS
WHERE Parent1_Gender = 'F'
UNION ALL
SELECT Parent2_id, Parent2_FullName,...
December 29, 2015 at 5:23 pm
Yes, I tried with distinct as I mentioned earlier, but still duplicates shows.
Unless I am inserting distinct at wrong place. See below
Select females_only.*
From dbo.vw_csys_NurserySchool
Cross Apply (
SELECT distinct Parent1_id, Parent1_FullName,...
December 29, 2015 at 5:13 pm
Thanks Scott, it still gives duplicates even after changing as you mentioned.
Anyway, thank you, at least I've got the list, I will export to excel and remove duplicates.
Thank you again...
December 29, 2015 at 4:55 pm
Viewing 15 posts - 76 through 90 (of 441 total)