[Evergreen-reports] Question about nullability

Beth Willis willis at noblenet.org
Mon Apr 14 11:51:07 EDT 2014


I am working on a report template that uses asset.copy as the initial 
source.  From there, I want to create joins to asset.call_number, 
config.circ_modifier, and config.copy_status sources.

I need to create an outer join to the config.circ_modifier source 
because some of our copy records have null values for circ_modifier. 
But, I cannot seem to generate SQL with this outer join.

As I understand it, if I select the "default" option I should get an 
inner join, but if I select the "none" option I should get an outer 
join.  This is not the case.

Has anyone else run into this?  If so, can you tell me what I am doing 
incorrectly?  I have attached the SQL to this e-mail.

Thanks in advance for any assistance.
Beth


-- 
Beth Willis
Digital & Catalog Librarian
NOBLE, Inc.
26 Cherry Hill Drive
Danvers, MA 01923
-------------- next part --------------
SELECT	"bdd43e1440a00047b1e66cb9619865c0"."name" AS "Owning Library",
	COUNT("7d74f3b92b19da5e606d737d339a9679"."id") AS "# of Items",
	"6b663e7d6e19312c3955f23f35918291"."name" AS "Name"
  FROM	asset.copy AS "7d74f3b92b19da5e606d737d339a9679"
	INNER JOIN asset.call_number AS "286d7899ae25bee8bdd7dcde49f9e0b7" ON ("7d74f3b92b19da5e606d737d339a9679"."call_number" = "286d7899ae25bee8bdd7dcde49f9e0b7"."id")
	INNER JOIN actor.org_unit AS "bdd43e1440a00047b1e66cb9619865c0" ON ("286d7899ae25bee8bdd7dcde49f9e0b7"."owning_lib" = "bdd43e1440a00047b1e66cb9619865c0"."id")
	INNER JOIN config.circ_modifier AS "6b663e7d6e19312c3955f23f35918291" ON ("7d74f3b92b19da5e606d737d339a9679"."circ_modifier" = "6b663e7d6e19312c3955f23f35918291"."code")
	INNER JOIN config.copy_status AS "9547fadabf916ce4fd3eb232e0902c9c" ON ("7d74f3b92b19da5e606d737d339a9679"."status" = "9547fadabf916ce4fd3eb232e0902c9c"."id")
  WHERE	"7d74f3b92b19da5e606d737d339a9679"."deleted" = 'f'
	AND EXTRACT(YEAR FROM "7d74f3b92b19da5e606d737d339a9679"."create_date") || '-' || LPAD(EXTRACT(MONTH FROM "7d74f3b92b19da5e606d737d339a9679"."create_date")::text,2,'0') BETWEEN '2014-03' AND '2014-03'
	AND "286d7899ae25bee8bdd7dcde49f9e0b7"."owning_lib" IN ('16')
	AND "9547fadabf916ce4fd3eb232e0902c9c"."id" = '108'
	AND "6b663e7d6e19312c3955f23f35918291"."code" IN ('cassette','book','bookclubkit','cd','cdrom','campusonlyaudio','campusonlybook','campusonlydvd','campusonlykit','campusonlymedia','campusonlyvideo','childrensbook','childrenscd','childrensdvd','childrenskit','childrensperiodical','dvd','deposit','e-game','equipment','film','govdoc','ill','image','kit','laptop','map','microform','misc','museumpass','onorder','online','part','periodical','perkins','picture','playaway','playawayview','quickpick','realia','record','rental','rentalaudio','rentaldvd','rentalvhs','reserve','reserve2','reserve3','reserve4','reserve5','reserve6','reserve7','reserve8','room','score','summerreading','textbook','textbook2','textbook3','video','ereader','ipad')
  GROUP BY 1, 3
  ORDER BY "bdd43e1440a00047b1e66cb9619865c0"."name" ASC, COUNT("7d74f3b92b19da5e606d737d339a9679"."id") ASC, "6b663e7d6e19312c3955f23f35918291"."name" ASC


More information about the Evergreen-reports mailing list