Follow us: Connect on YouTube Connect on YouTube Connect on YouTube

Pages

Friday, 23 June 2017

Difference between Procedures and Functions

Share this article :

2 comments:

  1. Hi There,


    What you’re saying is absolutely correct Difference between Procedures and Functions , but this isn’t the exact situation everywhere. Where most smart folk work on a project - why can’t you do this the Boss asks :).

    I need your assistance to build a select statement..
    is it possible to help ?
    for e.g if a customer 1200 is entitled to 4 number of products then the first 4 article_code and article_desc (from article_tbl) should be displayed
    and dummy column printed for these should be Y else if no entitled its null.

    So depending on the entitle_no the article_code & article_desc should be available for a customer.

    Any suggestion pls how to build this select? Tables structure are attached and output should be like below:

    TBL_ARTICLE.ARTICLE_CODE TBL_ARTICLE.ARTICLE_DESC TBL_PAYMENT.PAYMENT_DATE "PRINTED"
    A02 TABLETS SAMSUNG 01/03/17 Y
    A03 HUAWEI 02/03/17 Y
    A04 LG TV
    A05 COOKER

    Very useful post !everyone should learn and use it during their learning path.

    Merci Beaucoup,
    Preethi

    ReplyDelete
  2. Hi There,

    Difference between Procedures and Functions being contrived to exist for many projects simply so it can be run will be the first to hit the wall, but those projects where the functions to make existing transactions cheaper in real world applications will find the elusive real world demand.

    I need to setup auditing (or logging) for RESULTS of queries that are run by certain users against certain tables.

    For example, when they run some select statement against "patients" table I need to log all PatientID that were selected from this table. So, if there were 100 records selected, there should be 100 "audit" records with patientID logged. Is this possible?

    Fine-grained auditing will result in one audit record with the text of the select statement. But how can I audit the actual result of a select query? It seems to me that it should be "select for each row" trigger for this that does not exist.

    Appreciate your effort for making such useful blogs and helping the community.

    Gracias,
    Preethi.

    ReplyDelete