Joined: 04 Jun 2012
Online Status: Offline
Posts: 13
Topic: How to Pass A Variable to SQL Soted Procedures Posted: 18 Jun 2012 at 6:35am
I know I have to do a stored procedure to look up values for my report. I have never done one before and was wondering how to pass a variable value to the stored procedure out of crystal. I have abbreviations in a sting array that i need to pass one at a time to the stored procedure. I have a for loop set up, just need to know how to pass it to the stored procedure
Joined: 04 Jun 2012
Online Status: Offline
Posts: 13
Posted: 18 Jun 2012 at 7:35am
I pull directions from one table, but they are stored with the abbreviations and the program that we use does a real time conversion to the full text based on said abbreviations. So when I build and run the report I can only get the abbreviation unless i parse out the abbreviation and pull the full text out of a different data base
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 18 Jun 2012 at 8:04am
Why are you specifically putting the abbreviations into an array? If you put them into a delimited string of some sort, you can have a stored procedure that returns a cursor in an In/Out parameter that will return the translated values in a format you can join to from the data in your report.
Joined: 04 Jun 2012
Online Status: Offline
Posts: 13
Posted: 19 Jun 2012 at 7:46am
That does sound like a better idea. I have never written a stored procedure before. I put the values into an array while trying to figure out how to perform the look up of the expanded values. But my idea did not work
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum