Thousand separator in value passed to linked report

(3 posts) (2 voices)

Tags:

No tags yet.

  1. Deepak, Member

    Hi,

    I am trying to pass value 12467 which is an integer to a linked report. The in parameter is also declared as int but the value i get as 12,467 with a thousand separator. This value does not return any results as my query expects integer value.
    inSellermap is the inparameter appearing as 12,467

    How do i get only int values.

    select fd.id,fd.dnrf_id,fd.title,fd.documentid,
    from TEMP_launch_docs ld
    JOIN sipo_db.frf_documents fd on fd.id=ld.frf_id
    JOIN sipo_db.frf_values fv on fd.id=fv.document_id and fv.field_id=144
    where
    (fd.significant = 1 or fd.future_sig = 1)
    AND fv.value like ('%inSellermap%')
    group by fd.id;

  2. myDBR Team, Key Master

    Hi,
    the code:

    fv.value like ('%inSellermap%')

    will not evaluate the inSellermap-parameter, but evaluates it as a string 'inSellermap'. If inSellermap is defined as int, you should use:

    fv.value = inSellermap

    --
    myDBR Team

  3. Deepak, Member

    Hi,

    Thanks it was a mysql issue variable cannot be passed into a like parameter, we have to choose like (CONCAT('%',inSellermap,'%'))


Reply

You must log in to post.