Toad for Oracle - Copy Column from Columns Tab without all details - toad

An arbitrary behavior in Toad that annoys me when composing my queries.
It is not a problem really, rather than an annoying issue.
If you describe any table in toad, or clicked on the table name from the Schema Browser, in Columns tab, copy and paste a column
Sometimes you get the column name only, and sometimes you get the column name with the details of the column {name length data type...etc}
When does toad coy the column name alone, and when does it copy the entire column description?
I searched many SO questions for something related, and google trying to understand how to copy only column name, but I didn'y find any reference at all related tho this.

While in Schema Browser,
select any table and
navigate to "Columns" tab (that's what you're doing anyway).
Right-click, a menu should open.
It contains the Row select item. If it is checked, when copy/pasting a column, you'll actually copy the whole row.
Therefore, uncheck it.
Make sure you click on a column name when copy/pasting it; otherwise, you'll copy a column value you clicked on (such as Data Type or Null).

Related

Sorting Virtual/Created Column in Interactive Grid

I'm not quite sure whether the description for the column I'm working on is proper, so bear with me.
I got an Interactive Grid that I'm adapting, and it's supposed to work such as this:
It should select a name on the first column (an autocomplete field), followed by 3 columns, each with a checkbox. I need to order the data in the grid by the name in the first column. Problem is, I can't use an "order by" in the select statement, so I need to use APEX's "Column sorting".
The column for the name, however, isn't shown in the list to select the order by value. I only get the 3 checkboxes as an option to order it.
I tried having a copy of the name column, but this time, hidden (and not an autocomplete field), but it doesn't work either. Is there a workaround for this?
The IG will only allow you to sort by columns that have been enabled for sorting. By default, only columns of certain data types and maximum lengths are enabled for sorting, but you can override this for each column in your IG definition.

Is there a way that POWERBI does not agregate all numeric data?

so, I got 3 xlsx full of data already treated, so I pretty much just got to display the data using the graphs. The problem seems to be, that Powerbi aggregates all numeric data (using: count, sum, etc.) In their community they suggest to create new measures, the thing is, in that case I HAVE TO CREATE A LOT OF MEASURES...Also, I tried to convert the data to text and even so, Powerbi counts it!!!
any help, pls?
There are several ways to tackle this:
When you pull a field into the field well for a visualisation, you can click the drop down in the field well and select "Don't summarize"
in the data model, select the column and on the ribbon select "don't summarize" as the summarization option in the Properties group.
The screenshot shows the field well option on the left and the data model options on the right, one for a numeric and one for a text field.
And, yes, you never want to use the implicit measures, i.e. the automatic calculations that Power BI creates. If you want to keep on top of what is being calculated, create your own measures, and yes, there will be many.
Edit: If by "aggregating" you are referring to the fact that text values will be grouped in a table (you don't see any duplicates), then you need to add a column with unique values to the table so all the duplicates of the text values show up. This can be done in the data source by adding an Index column, then using that Index column in the table and setting it to a very narrow with to make it invisible.

Toad Import - Change column value based on which excel worksheet the data came from

I am trying to import to a table an excel file with 3 worksheets. For one of the columns I would like to vary the value populated based on which worksheet it came from. Is there a way to do this with Toad Import. The sheets look the same and have the same columns. But if it is sheet 1 I want a certain column to be be ABC, if sheet 2 XYZ, sheet 3 ETC. Is there a way?
I load Excel files frequently, but I didn't notice such an option. So I went to see the loader once again, step-by-step, checked carefully what it offers - nope, there's nothing like that.
A workaround, quite simple, is to edit the Excel file and create that column. Then
enter ABC into the first cell of that column
select the cell
double click the bottom right corner
it'll auto-populate all rows in that worksheet with ABC (in that column)
do the same for other sheets
Another option is to set column's default value, e.g.
alter table test modify ident varchar2(3) default 'abc';
You'd have to do that for each sheet you load, modify 'abc' to 'def' etc.
Or, if you switch to SQL*Loader (there's that option in the same menu as "Import table data"), create a control file which utilizes the CONSTANT keyword, e.g.
load data
infile excel.csv
append
into table test
fields terminated by ',' optionally enclosed by '"'
(name,
value,
ident constant "abc"
)
Just like in previous case, you'd have to modify the constant value before loading each worksheet's data.
Also, note that SQL*Loader can't load XLS file - you'd have to save each sheet into its own .csv file first.
Which option would I choose? Probably the first one; seems to be the simplest & the fastest.

Power BI - Model Object Names must be non empty

I made few changes in the query editor. But when I close and apply the changes. I get the error Model object names must be non empty. I tried deleting the last changes I made in query editor. The error still exists.
In Power Bi, this error is saying you have empty columns in your data set. You have to delete that columns and refresh the document and it should work.
#HuaGong is correct. Most likely one or more columns are loaded without a name.
This says that you have left one Column heading blank.
Delete the column or give a name to the column.
This happens when you enable "Use First Row as a header" and there are null values in the first row.
This can also happen if the Excel (other source document you are using) is open on your desktop. You have to close the document and then try again.

SELECT * breaks when adding columns in Oracle Application Express (ApEx) 3.0

When I define a report region's SQL as SELECT * FROM some_table, all is fine until new columns are added to some_table -- then it breaks with a "ORAxxx No data found" error. It is easy to remediate, as it's enough to Apply Changes on the region again, even without making any changes. However, it does not make for a robust application.
Is there some combination of parameters that would allow SELECT * that does not break with new columns? It would be enough to apply any default formatting or heading to the new columns.
I'm aware I could construct the column list from data dictionary and then concatenate everything into the SELECT statement to evaluate, but this seems rather inelegant.
Normally is not recommended to use SELECT * queries because:
Returns all the columns, then the optimizer have less play to do.
It makes less robust the applications because adding new columns changes the result of the query giving unexpected results. Without SELECT *, I mean giving exactly the columns you need, adding new columns does not matter to the application.
Anyway, remember that creating a SELECT * for a view, oracle create the view replacing the * for all the columns, may be APPEX is making the same thing.
Currently your region source is (I presume) set to "Use Query-Specific Column Names and Validate Query". This means that a report column is defined explicitly for each column in the query, and the SQL is expected to be static.
If you change the region source to "Use Generic Column Names (parse query at runtime only)", then it will still work after a new column is added, with the column title defaulting to the column name.
There is another property "Maximum number of generic report columns" that defaults to 60 and must be set to a value big enough to accommodate any future columns added to the table.