Tags down


Oracle APEX - How to use page items as bind variables to substitute column names and table names in SQL

By : redindianknight
Date : August 01 2020, 04:00 PM
may help you . Basically I have a region (can be classic report, or any other types), which content is sourced from a SQL where column names and table names are page items that can be changed, like below , Instead of binds, they become substitutions, ie
code :
select &P1_COLUMN1., &P2_COLUMN1., etc

Share : facebook icon twitter icon

Is it possible to refer to column names via bind variables in Oracle?

By : William Hutter
Date : March 29 2020, 07:55 AM
wish help you to fix your issue No. You cannot use bind variables for table or column names.
This information is needed to create the execution plan. Without knowing what you want to order by, it would be impossible to figure out what index to use, for example.
code :
order by decode(?, 'colA', colA, 'colB', colB)

I want to substitute variables for Worksheet and Table names in an AutoFilter script

By : user3251202
Date : March 29 2020, 07:55 AM
Hope that helps If there is only one Table on the new worksheet, then we don't need a variable for the ListObject
code :
Private Sub Worksheet_Change(ByVal Target As Range)
    With ActiveSheet.ListObjects(1)
    End With
End Sub

Using variables in oracle as table names for insert command oracle

By : user2010122
Date : March 29 2020, 07:55 AM
it helps some times This is the right syntax, but not recommended for such a simple operation
code :
testes:= 'INSERT INTO ' || n_tab2 ||' SELECT * FROM ' || n_tab;
INSERT INTO tab2(col1,col2,col3)  SELECT col1,col2,col3 FROM tab;

How to convert row names to column names and bind it by order in r

By : hiddenjelly
Date : March 29 2020, 07:55 AM
wish helps you Assuming your long-form data starts with the rows in the order you want, try this:
code :
month_order = unique(returns)
returns.df <- returns %>%
  spread(key = DATE, value = RETURN) %>% 
  select(c("TICKER", month_order))

creating, directly, data.tables with column names from variables, and using variables for column names with :=

By : Muskaan
Date : March 29 2020, 07:55 AM
Hope this helps For the first question, I'm not absolutely sure, but you may want to try and see if fread is of any help creating an empty data.table with named columns.
As for the second question, try
code :
DT[, c(nameOfCols) := 10]
Privacy Policy - Terms - Contact Us © voile276.org