cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect syntax near the keyword 'NULL' error message when creating ne w Data Provider

Linda_Hankemeie
Confirmed Champ
Confirmed Champ

Hoping someone can help me with the SQL to correct the  error:  Incorrect syntax near the keyword 'NULL'

I created the input parameters for the DateRange and  DocumentType list and validated that SQL for the DocumentType list.  But when I click "Next" I receive the error message.  Any guidance would be appreciated.   

 

SELECT
i.itemdate AS 'Scan Date',
k1.keyvaluesmall AS 'Employe EE #',
k2.keyvaluechar AS 'Employee First Name',
k4.keyvaluechar AS 'Employee Last Name',
k5.keyvaluechar AS 'Upload By',
k6.keyvaluechar AS 'Kofax Scan ID',
k7.keyvaluechar AS 'Kofax Validation ID'

 

FROM hsi.itemdata i
LEFT OUTER JOIN hsi.doctype d on d.itemtypenum = i.itemtypenum
LEFT OUTER JOIN hsi.itemtypegroup it on it.itemtypegroupnum = i.itemtypegroupnum
LEFT OUTER JOIN hsi.keyitem243 k1 on i.itemnum = k1.itemnum
LEFT OUTER JOIN hsi.keyitem245 k2 on i.itemnum = k2.itemnum
LEFT OUTER JOIN hsi.keyitem246 k4 on i.itemnum = k4.itemnum
LEFT OUTER JOIN hsi.keyitem501 k5 on i.itemnum = k5.itemnum
LEFT OUTER JOIN hsi.keyitem233 k6 on i.itemnum = k6.itemnum
LEFT OUTER JOIN hsi.keyitem234 k7 on i.itemnum = k7.itemnum

 

WHERE (d.itemtypenum @{DocumentType}) AND
(i.status <> '16') AND
(i.itemtypegroupnum = '109') AND
(i.itemdate BETWEEN @{DateRange})

 

ORDER BY i.itemdate DESC

 

 

Linda 

1 ACCEPTED ANSWER

Bill_Schoby
Star Collaborator
Star Collaborator

Are you missing an "=" or other operator in "WHERE (d.itemtypenum @{DocumentType}) AND"?

View answer in original post

2 REPLIES 2

Bill_Schoby
Star Collaborator
Star Collaborator

Are you missing an "=" or other operator in "WHERE (d.itemtypenum @{DocumentType}) AND"?

Linda_Hankemeie
Confirmed Champ
Confirmed Champ

Thank you!