Here a small one: CREATE OR REPLACE PROCEDURE ProcName (paraName IN VARCHAR2) There are a bunch of examples how to create a procedure. THEN INSERT INTO PURCHASEORDERS (new_orderType) VALUES (orderNextDay) THEN INSERT INTO PURCHASEORDERS (new_orderType) VALUES (orderSameDay) ĮLSE INSERT INTO PURCHASEORDERS (new_orderType) VALUES ('no order needed') SELECT ir.itemId, ir.ORDERSAMEDAY, ir.ORDERNEXTDAY FROM INVENTORYREPORTįETCH C1 INTO new_inputDate, new_orderType, c_orderSameDay, c_orderNextDay SELECT REPORTDATE INTO inputDate FROM dual New_orderType PURCHASEORDERS.ORDERTYPE%TYPE Ĭ_orderSameDay INVENTORYREPORT.ORDERSAMEDAY%TYPE Ĭ_orderNextDay INVENTORYREPORT.ORDERNEXTDAY%TYPE New_inputDate PURCHASEORDERS.PODate%TYPE It this doing what it's supposed to be doing? CREATE OR REPLACE PROCEDURE placeorder (inputDate in DATE) Assume it’ll be populated I added to the if statements but still getting a couple errors when trying to compile the procedure. Your procedure should leave the “Price” (for the purchase order) empty (i.e., it can remain null). If no order is needed for the provided input date (i.e., no order at all across ALL raw materials), raise an application error with a message: “no order needed” (see Triggers and Procedures tutorial on D2L for an example of how to raise this error). If the Inventory Report for a day (e.g.,ģ) has a 0 value for the ordersameday attribute, it means Only make an entry (insertion) in PURCHASEORDERS if needed, i.e., ifĪn entry exists for a raw material and report date combination in the The input date format accepted should be: 'DD-MON-YYYY', e.g., 0.įor each raw material in the Inventory Report table (where: ReportDate matches inputDate), make a separate entry in the PURCHASEORDERS table for a next-day delivery order and a same-day delivery order (each raw material may generate up to 2 inserts).Ĭorresponding order type should be either next_day or same_day ![]() The procedure should take one parameter: inputDate (use the datatype of the PODate column in PURCHASEORDERS). This is an exercise for a beginner database class (which seems to be at a level way above beginner)Ĭreate a procedure to place a purchase order for a specified date based on data in the inventory report table. I understand the basic syntax of writing a procedure. Use the search bar to find the sslmode property.I'm not really sure how to approach this question. See the official Aqua Data Studio documentation for instructions on how to edit driver properties and configure SSL for PostgreSQL. This is done from the Driver tab of the Edit Server Properties dialog. Next, you must set the SSL mode value as ?sslmode=require. See the documentation for full instructions on how to generate and use non-expiring credentials. Query Service also offers non-expiring credentials to allow for a one-time setup with third-party clients. For complete directions to find your login credentials, host, port, and database name, please read the credentials guide. To find your credentials, log in to the Platform UI and select Queries from the left navigation, followed by Credentials. Use the value for the Platform UI credential dbname: prod:all. Database: The database that will be used.You must use port 80 to connect with Query Service. Host and Port: The host endpoint and its port for Query Service.It takes the form of Password: This is an alphanumeric string found on the Query Service credentials dashboard. Login Name: The login name is your Platform Organization ID.You are recommended to provide a friendly name to recognize the connection. Once the Register Server dialog appears for a PostgresSQL server, provide the following details for the server settings. See the official Aqua Data Studio documentation for instructions on how to launch the Register Server dialog and register the server. ![]() Register the serverĪfter installing Aqua Data Studio, you must first register the server. Please contact your IMS Organization administrator if you do not currently have access to the Queries workspace. To acquire the necessary credentials for connecting Aqua Data Studio to Experience Platform, you must have access to the Queries workspace in the Platform UI. ![]() There may be minor discrepancies in the UI between the versions. Screenshots in this guide were taken using the macOS desktop app. ![]() There are Windows and macOS versions of Aqua Data Studio.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |