Calling Oracle stored procedure from C#?

Please visit this ODP site set up by oracle for Microsoft OracleClient Developers: http://www.oracle.com/technetwork/topics/dotnet/index-085703.html Also below is a sample code that can get you started to call a stored procedure from C# to Oracle. PKG_COLLECTION.CSP_COLLECTION_HDR_SELECT is the stored procedure built on Oracle accepting parameters PUNIT, POFFICE, PRECEIPT_NBR and returning the result in T_CURSOR. using Oracle.DataAccess; … Read more

Call a stored procedure with another in Oracle

Your stored procedures work as coded. The problem is with the last line, it is unable to invoke either of your stored procedures. Three choices in SQL*Plus are: call, exec, and an anoymous PL/SQL block. call appears to be a SQL keyword, and is documented in the SQL Reference. http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_4008.htm#BABDEHHG The syntax diagram indicates that … Read more

Store query result in a variable using in PL/pgSQL

I think you’re looking for SELECT select_expressions INTO: select test_table.name into name from test_table where id = x; That will pull the name from test_table where id is your function’s argument and leave it in the name variable. Don’t leave out the table name prefix on test_table.name or you’ll get complaints about an ambiguous reference.

Dynamic Sorting within SQL Stored Procedures

Yeah, it’s a pain, and the way you’re doing it looks similar to what I do: order by case when @SortExpr=”CustomerName” and @SortDir=”ASC” then CustomerName end asc, case when @SortExpr=”CustomerName” and @SortDir=”DESC” then CustomerName end desc, … This, to me, is still much better than building dynamic SQL from code, which turns into a scalability … Read more