FORM on a SQL Query APEX - sql

I am working in Oracle APEX 4.2. I have created Form on Table, Tabular Form and Form on Table with Report. I have tried a lot to create form on a SQL Query but i can't.
I have two Question related of Form on a SQL Query !
First i want to make Form on SQL Query on Two Tables i-e `
Patient_Registration
Pat_Id(Pk),Name,Address,Gender ,Age,Contact
and Patient_Charges
P_Ch_Id(Pk),Patient_Id(Fk),P_Doc_Charges,P_Extra_Charges
Second is that if the from is made then we will be able to make insertions on two tables in one form ?

I *think * I understand your question.
Create a view with your SQL query and then add a Before Insert trigger which does the necessary DML.
Check out some of the sample apps for ideas in this respect.

Related

How to add new row data to PowerBi table on refresh

On our SQL Server, our org has a table that contains a current instance of records. I need to query that table and append the output row(s) to a PowerBi data table.
I have researched doing this in Power Automate with the “Add Rows to a dataset” step. Unfortunately, I cannot find a way to use the aforementioned SQL query as the payload.
Has anyone else encountered this use case? Is there an alternative way to continuously add rows to a table based on a SQL query?
I would start with this stock template:
https://powerautomate.microsoft.com/en-us/templates/details/ab50f2c1faa44e149265e45f72575a61/add-sql-server-table-rows-to-power-bi-data-set-on-a-recurring-basis/
There are few ways
Incremental refresh https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-overview
Duplicate's remover, you download whole DB, and then remove dublicates
Crete SQL side VIEW which do same things, and in PBI side use this VIEW

Access update table that is being used by a maketable query

I have a form in access that I have embedded a query on.
The query was made using the make query wizard.
The values of the linked table need to change to reflect changes to the underlying data.
It seems ridiculous that this table is now locked from editing.
Is there away around this?
Cheers
D

Create database view from SQL stored as string in Netezza

I got a task to create a view based on 10 SQL queries, which are stored in one of the tables. In this table, there are two columns. First of them is Site, and the second is mentioned before SQL query.
Now, there whole deal is, that I would like to create a view, with two columns - first would be the name of the Site and the second one would be whatever ID mentioned query returns.
Can anyone please tell me how to execute this string as a query?
I have done something like this couple years ago on SQL Server (using procedure), non the less on Neteeza I can't figure how this should works; as a further complication, we are forbidden to use procedures an PROD.

Add exsiting query to report

My report calculates the stock of inks in my stores. I built a SQL statement in VB.NET and got the correct results. How can I display these results in my Crystal Report? Or design a report such that same results will be retrieved?
I tried to use SQL Expression builder but failed.
Usually you will link Data Tables to your report using Database Expert. Do the same in Database Expert, select the Database and you can see Add Command. Select that and click the > button. You will get a Window, write your SQL Query there and press OK.
After finishing this you can see Command in Database Fields which contains all your records got from the SQL Query as result.
In Database Manager choose Add Command and then type your SQL Statement there.

To Use Pivot Table as View in SQL Server

I have got a pivot table. I prepared it in SQL. But I cant use this table in View. I using SQL Server 2008.
See this answer to a somewhat related question:
sql-pivoted-table-is-read-only-and-cells-cant-be-edited
You need to make the view updateable via an INSTEAD OF trigger, and there are specific conditions to using that trigger, such as the pivot-table view being fully identifiable to source record-column.