Code to create the view: V_AD_VAX_ONSET_DT_EXACT_YEAR_MULTIPLE
The view V_AD_VAX_ONSET_DT_EXACT_YEAR_MULTIPLE
is used to find rows in VAERSDATA where
VAX_DATE and ONSET_DATE are identical in Month and Day
but differ in the Year
Most probably indicating a clerical error
It is used in queries to get more accurate results.
—-
The name means:
V: View
AD: All Data
VAX_DATE
ONSET_DATE
are an EXACT_YEAR_MULTIPLE from each other
See analysis at:
Field Analysis Of AGE_YRS and NUMDAYS
use VAERS_2019
go
drop view V_AD_VAX_ONSET_DT_EXACT_YEAR_MULTIPLE
go
Create view V_AD_VAX_ONSET_DT_EXACT_YEAR_MULTIPLE
as
select
/*
View to find the rows where
VAX_DATE and ONSET_DATE
are identical in Month and Day
but differ in the Year
*/
VAERS_ID
, convert (float, AGE_YRS) AS AGE_YRS
, vax_date
, onset_date
, convert (int, numdays ) NUMDAYS
, ( convert ( float, NUMDAYS ) / 365.0 ) as NUM_YRS
, year ( vax_date ) - year ( onset_date )
as YRS_DIFF
, concat (SYMPTOM_TEXT, SYMPTOM_TEXT2 ) symptom_text
from dbo.[VAERSDATA]
where year ( vax_date ) <> year ( onset_date )
and month ( vax_date ) = month( onset_date )
and day ( vax_date ) = day ( onset_date )
go
—–
select count(*) Count from dbo.[V_AD_VAX_ONSET_DT_EXACT_YEAR_MULTIPLE] go
—–
Count:
571