SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Passing parameter from Table View from Oracle returns empty result


Passing parameter from Table View from Oracle returns empty result

Author
Message
jazzz308 82675
jazzz308 82675
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 71
Hi All,

I have spent few hours looking into the issue and still cannot figure this one out.

I have created parameter @OrgNumber which I am getting the available values from View(Oracle - connected via OLEDB) and passing it to query to generate report but it returns empty result. Below is i am using ..

SELECT CHANNEL_ID, CHANNEL_CODE, ORGNO, TEAM_CODE, CHANNEL_NAME, CHANNEL_GRADE, CHANNEL_TYPE, CHANNEL_TYPE_NAME, PARENT_ID, STATUS,
LEADER_ID, LEADER_THAI_FULL_NAME, ACNT_ORG_YN, CHANNEL_GRADE_NAME, ZIP, HOUSE_NO, VILLAGE, MOO, SOI, STREET, SUBDISTRICT, DISTRICT, CITY,
TELEPHONE, INSERTED_BY, INSERT_TIME, UPDATED_BY, UPDATE_TIME
FROM DEV_DATAHUB.DH_V_ISTRUCTURE
WHERE (ORGNO = ('@OrgNumber'))

My question is when I insert the parameter it has single quotes wrapped around parameter name. From Oracle the data type is VARCHAR and I am setting value type as tect in ssrs. ANy suggestions? please help.

Thanks,
J
Jack Corbett
  Jack Corbett
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18506 Visits: 14898
You need to get rid of the single-quotes and replace the @ with a :. Check out this blog post



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Michael_Garrison
Michael_Garrison
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1328 Visits: 2754
Jack is correct, for Oracle you need a colon : for parameters.
andymay-496937
andymay-496937
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: General Forum Members
Points: 55 Visits: 200
Hi

This link looks useful, but unfortunatly it suggests using '+' as a concatination, which Oracle doesn't support, and it has the parameter without single quotes which oracle expects to be an object name not a literal string so basically it doesn't work ;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search