Its possible to open a view definition in the console and add a description
Is it possible to create descriptions using DDL? i.e. Can I define column descriptions using a CREATE VIEW statement?
Related
I have JSONL data being loaded into a GCS bucket, and some "record" field types are blank (i.e., {}). So auto detecting the schema ends up creating a RECORD type which has no sub fields (this is not allowed in BigQuery).
As a workaround, I have created the external table as such:
CREATE EXTERNAL TABLE `my_table`
OPTIONS
(
uris=['gs://path/to/files/*'],
format=JSON,
ignore_unknown_values=true
)
(this table cannot be queried fully as I receive an error: Unsupported empty struct type for field '<field name here>'). So I create a view on top of this external table as such:
CREATE VIEW `my_table_view` AS
select TO_JSON_STRING(value) as column from `my_table`
and then I can successfully query this view (built on top of the external table) for any column.
My question is, can I skip creating the view and add this TO_JSON_STRING function in the external table definition itself? I have not been able to figure out how as I keep getting syntax errors.
i dynamicaly create Views which refering other Databases (mainly to import data from there)
use [RezepteDB]
in this DB i create a view like this
CREATE VIEW [dbo].bla as select * from ZutatenDB.dbo.Bla
Later i need the name of the Database, on which is the view based.
For this example 'ZutatenDB'.
How can i done this? a small function to pass the name of the view and return the name of the database.
One technique is to use sys.dm_sql_referenced_entities:
SELECT *
FROM sys.dm_sql_referenced_entities ('dbo.bla', 'OBJECT');
You can see the referenced server, database, schema and objects.
After creating some pages using Apex 5.1's Data Load Wizard, would it be possible via the Page Designer to somewhere hack into the data and add in 2 extra column data. I am attempting to add the following columns (1) Updater (2) Update date/time. I was able to do the same thing with an Interactive Grid page by adding PL/SQL code to the 'Save' Page Processing section but could not do the same for the Data Load Pages.
I have a five attribute table, 2 of which (Updater, Update date/time) are hidden to the APEX app user.
One option is to use a Data Load Transformation Rule. You can add this by editing the Data Load Definition via Shared Components. You specify the column, and you can specify a Rule Type of PLSQL Expression and set the expression to whatever you want, e.g. SYSDATE.
Another option is to add a trigger to the table to set those columns.
How will I create a new structure in the ABAP dictionary has the following attributes.
Name Type,MyNAME CHAR(25),FatherNAME CHAR(25),DEGREE CHAR(25),AGE INT4,BIRTHDAY DATS
and write a ABAP program that will use your created structure, fill in all of the information on the structure & write it out to the screen
This requires no coding at all.
Just create the table ( use transaction SE11 ), then run the table generator ( you will find it in the menu in SE11 ). Then run SM30, fill in your table and hit display or maintain.
You can make then a parameter transaction that pre-fills the initial SM30 screen, this requires no coding as well.
I have Access as my back end. Student is the database name and its path is c:\Project\student.mdb
And am having few tables in it. When i click a command button in vb.net a new table must be created in the path mentioned. And it should have the fields I declare.
What s the query I need to use ? Is it possible to do like that ?
Yes, it's possible, you can check out the syntax for the create table command.
However, I have to say that creating tables dynamically suggests a bad database design. The database layout should normally remain the same whatever data you put in the database.
If you create tables dynamically, that means that you have data in the table names, but data should go inside the tables, not in table names (or even field names).
Yes it's possible . Just pass the create table command as query and the table name as variable , which you want to add dynamically. for reference of create table command
Create table command