"b3148336-3c1b-44ed-a059-14dbb3.tif" stored in it. The stored procedure should return that value.
The stored procedure is actually returning "b3148336-3c1b-44ed-a059-14dbb3"
Why is it trunkating the .tif from the return value? It is cast in the DB as a varchar(40)
What else should i check/test? If i just run the query in query analyzer it works fine
select image_file from patient_images where person_ID=(pid)
that returns the correct result. Im wondering if its a cast issue, any thoughts?
SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GOALTER Procedure lei_get_last_test_image ( @pid varchar(50), @imagetype varchar(50), @imagename nvarchar(40) OUTPUT)Asselect @imagename=image_filefrom patient_imageswhere person_id=@pidAND image_desc LIKE @imagetypeGOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GO
Just a trivial question, the field image_file has the full image name with the extension? Or could be another field with that information.
As THBA said, what happens if you executes for example:
SELECT * -- try with * to see if there are a different field with that information
FROM patient_images
WHERE person_id= *** put the id here
AND image_desc LIKE *** put the desc here
Is the "image_file" information complete or there are any other field?