Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PL-SQL Array Handling

Status
Not open for further replies.

batmanforever

Programmer
Jul 23, 2003
4
0
0
US
Hi,

I have a C code on Win2k machine [ purely C code, not MFC ] that reads off an MS excel database (Office 2k version ).
All is well, expcet that I now need some kind of array handling in my SQL queries.

Here is what I am doing now is:
Pass a number ID value from my C code as a parameter to the SQL SELECT stmt.
So, the SELECT stmt looks like this...

wsprintf( szSql," SELECT Code, StreetID, StreetName FROM [Det$] WHERE Code = %lu OR Code =%lu ORDER BY Code, StreetID", scodeID0, socdeID1);

What I want to do is:
Since, I dont know at compile time, how many ID's I will be searching for, ie I dont know the number of scodeID's, How do I make it read from an array which has these values ?
my C code will first fill in an array with ID values at runtime. This will be fed to the SELECT stmt and it has do do the iteration for the values in the array.

I hope u understood the problem
 
Dude:

Sounds like a select statement needs to grab 'em and then the C code should read them from a cursor rather than an array.

I don't really understand what you're doing but sometimes such a dummy thinks differently enough to produce a new idea.

rev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top