Coil and select string column
Hi guysI'm using a script to some data of the coil, but Im also receive my plsql anonymous block in the text file, any ideas how to disable this option?
Another question, I also have a data in a column that look like this
HOME/IN/DATA/USER/41252
HOME/IN/DATA/USER/4646
HOME/IN/DATA/PROGRESSIVE/4125
HOME/IN/DATA/TEMP/4856
and I want back everything after the 4th backslash, subStr does not because its on different location every time that, any ideas how can I do this?
Thanks for the help
See you soon.
question 1: you can not
2nd question:
SQL> ed
Wrote file afiedt.buf
1 with t as (select 'HOME/IN/DATA/USER/41252' as txt from dual union all
2 select 'HOME/IN/DATA/USER/4646' from dual union all
3 select 'HOME/IN/DATA/NONUSER/4125' from dual union all
4 select 'HOME/IN/DATA/TEMP/4856' from dual)
5 -- end of test data
6 select txt, regexp_substr(txt, '[^/]+', 1, 5) as fifth
7* from t
8 /
TXT FIFTH
------------------------- -------------------------
HOME/IN/DATA/USER/41252 41252
HOME/IN/DATA/USER/4646 4646
HOME/IN/DATA/NONUSER/4125 4125
HOME/IN/DATA/TEMP/4856 4856
SQL>
Tags: Database
Similar Questions
-
Hello
How to add a control (digital button, boolean) dynamically in control instead of lines and columns selected. Please suggest the idea or no matter what example code you have please share with me...
Thank you
Vieu
Essentially, that's what you're looking for:
Please note that you have to account border sizes and the label of the control so that the code does not work right out of the box. You should also check for the height and width of column and if the position is valid at all before moving around the control.
Norbert
-
Problems with get-compliance and select-object
Hello world
I want to generate a report of respect for our guests and run a command similar to "Get-compliance-entity < host name > | Select-Object Entity, baseline. I expect to have the same performance with regard to 'Get-compliance-entity < hostname >' except for the missing 'Status' column. Instead, I get allways the same entry (VMware.VumAutomation.Types.PatchBaselineImpl) in the column "Basic."
No idea what I'm doing wrong.
Thank you in advance for any help
Pedro
Hi Pedro,
try like this:
Get-compliance-entity
| Select-Object Entity,@{N="Baseline; E={$_. Baseline.Name}} The problem is that the base line property is an object not a string. If you redirect to Select-Object he's trying to put a string out of it. And the string that it generates is the type of the object.
Best regards, Robert
-
I have the string as # 456 123 and select (4) [as the second figure either] to add with others not.
What should I do?What to do? What do you mean by "add with the other not? You mean you want to add mathematically the 4 and the 5 to get 9 or perform the concatenation of strings to get '45'? You want to add the 4 and the 56 123?
To select a subset of a string, you can use the function of the subset of the string. There is a zero based index entry and one length. Index 0 is the # 1 index is 4. There is also a default length for entry, the rest of the chain. Wire 1 to that.
-
find if get date and time string function is used in my labview vi
Hi, I am trying to understand a labview project and wanted to determine if the DATE STRING function / hour GET is used in VI. This VI has many void too / vi... I know that we can find all instances of all indicator etc... but I can also do something like this to find all the functions of DATE STRING / hour GET used?
Hi Claudia AG
Open the block diagram of the main vi, press 'Ctrl + F' and select 'object '. See image below
-
Returns the selected table column header
I don't know there is probably a way to do this. But I have not yet found.
I am building an application that will act as a sort of "universal" reports generator for a MySQL database tables.
At startup, a drop-down list box is filled with the names of tables in the database. When the user selects one of these tables, the column names are taken from the base and used to fill the column headers for the table of LabVIEW.
The idea is that the user can select this column and enter the constraints of filter in a text box. These constraints will then be added to the WHERE statement for this column.
So far I've been able to find a way to return the Active cell or a selection of cells, when the user clicks on the actual data of the table.
Is there a direct way to retrun a selected in LabVIEW column header value?
I am dreaming that there may be some sort of workaround using transparent controls over the headers. But because different tables will have a different number of columns that the user defines the width, I'm not really sure that it will work more.
If you the editable headers, this allows Active cells specify that your column is - 1 column selected active line is the selected column. You may need to use the mouse down? to filter the possibility for the user to change the right column headings.
-
Possible to use a wildcard to select all columns?
I have a large table dénormalisée with 108 columns. I know I can "select * from ' to display all values in column, but is there a shorthand notation to select all columns except the first?
I know that I can:
Select * from table;
But if I don't want col1, I do this:
Select col2,
col3,
COL4,
...
col107,
col108
table;
Is it possible to do something like that? :
Select (* less col1) table.
The reason why I ask, is that I write a few features to "clone" the rows of the table. I wrote an insert that looks like this:
Insert into my_table (col2, col3, col4,... col107, col108)
Select col2, col3, col4,... col107, col108
from my_table
where col1 = 123;
I do not insert col1 in the table because I have a trigger and sequence that it will fill in automatically.
Is there a shorthand notation that I could use here to avoid having to type "col2, col3, col4,... col107, col108 '?
There is no wildcard character that will do what you ask, but this does not mean that you must manually type the 100 column names.
Instead of doing something like this:
SELECT column_name | ',' Of all_tab_columns WHERE table_name = 'YOUR_TABLE_NAME_HERE' AND column_id > 1 ORDER BY column_id
Cut and paste the results in your SQL statement as required.
-
Select the column name when the value = something
Is there a way to select the column name when there is a specific value in it?
As follows:
create table (abc123)
COLUMN1 VARCHAR2 (50).
COLUMN2 VARCHAR2 (50).
Column3 varchar2 (50)
);
insert into abc123 values ('yes', 'Yes', 'No');
insert into abc123 values ('no', 'Yes', 'No');
INSERT INTO ABC123 VALUES ('no ',' no', 'No');
insert into abc123 values ('yes', 'Yes', 'Yes');
SELECT CASE WHEN COLUMN1 = 'Yes' THEN - the name of the column would be here somehow?
WHEN COLUMN2 = 'Yes' THEN - the name of the column would be here somehow?
WHERE Column3 = 'Yes' THEN - the name of the column would be here somehow?
Another null
finish as abc123 columnname
final results for the just Column1 would be:
COLUMN1
NULL VALUE
NULL VALUE
COLUMN1
I'm not sure what I use to get the name of column in there
Thank you.
Hello
708631 wrote:
Is there a way to select the column name when there is a specific value in it?
As follows:
create table (abc123)
COLUMN1 VARCHAR2 (50).
COLUMN2 VARCHAR2 (50).
Column3 varchar2 (50)
);
insert into abc123 values ('yes', 'Yes', 'No');
insert into abc123 values ('no', 'Yes', 'No');
INSERT INTO ABC123 VALUES ('no ',' no', 'No');
insert into abc123 values ('yes', 'Yes', 'Yes');
SELECT CASE WHEN COLUMN1 = 'Yes' THEN - the name of the column would be here somehow?
WHEN COLUMN2 = 'Yes' THEN - the name of the column would be here somehow?
WHERE Column3 = 'Yes' THEN - the name of the column would be here somehow?
Another null
finish as abc123 columnname
final results for the just Column1 would be:
COLUMN1
NULL VALUE
NULL VALUE
COLUMN1
I'm not sure what I use to get the name of column in there
Thank you.
Thanks for posting the CREATE TABLE and INSERT for the sample data.
Don't forget to post the exact results you want from these sample data. If the results depend on the parameters you want to pass a run time, then give a few different examples, with the the desired results of each.
You can hardcode the values you want, such as the column names in a query. For example:
SELECT CASE WHEN column1 = 'Yes' THEN 'Column1' END like y1
CASE WHEN column2 = 'Yes' THEN 'Column2' END like y2
CASE WHEN Column3 = 'Yes' THEN 'Column2' END like y3
, a. *-If wanted
Of abc123 one
;
-
How to get multiple records in a line and a different column
Hi all
I am using oracle database 11g
and I have a two table table_1, table_2
table_1 has columns
emp_no
first name
middle_name
last_name
E-mail
and table_2 have columns
emp_no
phone_type
Phone_Number
and having entires
emp_no phone_type phone_number
1001 MOB 9451421452
1001 WEMG 235153654
1001 652341536 EMG
1002 MOB 9987526312
1003 WEMG 5332621456
1004 59612356 EMG
Now I want the output of values with the MOB or WEMG phone type in a single line with different columns
emp_no first_name last_name middle_name officeno mobile e-mail
1001 score null k 9451421452 235153654 [email protected]
1002 chagneau gary [email protected] 9987526312 null
1003 dany craig [email protected] 5332621456 null null
1004 donald finn sian [email protected] null null
Can I have any input to achieve this?
Concerning
$sidHi Sid,
Under query will be help for you...
SELECT tab1.emp_no
*, first name *.
*, middle_name *.
*, last_name *.
*, email *.
*, mobile t2.phone_number *.
*, t3.phone_number officeno *.
OF tab1
*, (SELECT Emp_no *)
*, phone_number *.
Of THE tab2
WHERE phone_type = "MOB") t2
*, (SELECT Emp_no *)
*, phone_number *.
Of THE tab2
WHERE phone_type = "WEMG") t3
WHERE tab1.emp_no = t3.emp_no
AND tab1.emp_no = t2.emp_no;Thnks,
cveluri -
String column with some formats from date to date
Hello!
IM new in Oracle :)
I need to convert a string column {VARCHAR2 (70 bytes)} to this day. But this column have some type os dates... I found three types:
17/02/12 06:00:04, 403398 - 02:00
19 MARCH 12 06.00.07.936287 AM - 03:00
06:00:03:000 30/03/2012
How can I convert this column to date? I have hours, just need the date...
IM using Oracle 10 g.
Thank you very much!EdStevens wrote:
Someone better than me can probably provide some ideas on exactly how to analyze the current value of VARCHAR_DATEThe fact is that any analysis fails for a date like 10/11/12.
You have only one chance if you know for sure that the order of the months of the year and the day is always the same. otherwise you can only guess.If guess is good enough depends on the importance of the process of using it for the success of your business...
Good bye
DPT -
Dear Sir
Not sure if possible, I found 1 result of valid research.
He spoke of the concatting columns.
What I want is to select 2 columns in the select list 1.
He said that it would be possible, by the following code
but I have an error: wrong number of columns selected in the SQL LOV query. See the examples of valid conclusionsselect column1||' '||column2, from table1
is this impossible, or am I wrong?LOV must have 2 columns. A screen and back.
select product_name d, product_id r from product
Your of returns only one. If your display and back are the same then try this:
select column1||' '||column2 d, column1||' '||column2 r from table1
-
From the expensive
At the Summit, I have a report based on a table, by default all columns are plurarite. The user can select the columns to be dispalyed the Actions-> Select columns. Here I want to customize the columns default to be copied, and at the same time that the user should be able to select all the columns of shares-> Select columns.
DennisSelect them columns (and other features of IR) how you want to display them by default, and then click Actions-> Save the report.
The pop of the Save list, choose "as default report parameters"
-
Select the columns not in the group by clause
Hello
My version of DB is 10.0.2
I have query, where in I need to select two columns more but that should not be part of the group by Clause.
Does perform a work around?
SELECT F.custnum, V.Import_date, -- F.ErledigtMM,F.ErledigtGrundMM, (Columns to be selected additionally) nvl(sum(nvl(round(V.VerAuf16/1000,2), 0) +nvl(round(V.VerAuf17/1000,2), 0) + nvl(round(V.VerAuf18/1000,2), 0) + nvl(round(V.VerAuf19/1000,2), 0) + nvl(round(V.VerAuf20/1000,2), 0) + nvl(round(V.VerAufKAPUn/1000,2), 0) + nvl(round(V.VerAufKAPVz/1000,2), 0) ), 0) Mandantenforderung, nvl(sum(nvl(round(V.VerAuf4/1000,2), 0) ), 0) Inkassokosten, nvl(sum(nvl(round(V.VerAuf5/1000,2), 0) ), 0) KontoFuehrungsgebuehren, nvl(sum(nvl(round(V.VerAuf1/1000,2), 0) + nvl(round(V.VerAuf2/1000,2), 0) ), 0) Verwertungskosten, nvl(sum(nvl(round(V.VerAuf10/1000,2), 0) + nvl(round(V.VerAuf8/1000,2), 0) + nvl(round(V.VerAuf9/1000,2), 0) ), 0) Barauslagen, nvl(sum(nvl(round(V.VerAuf13/1000,2), 0) + nvl(round(V.VerAuf14/1000,2), 0) + nvl(round(V.VerAuf15/1000,2), 0) + nvl(round(V.VerAuf6/1000,2), 0) ),0) Gerichtskosten, nvl(sum(nvl(round(V.VerAuf11/1000,2), 0) + nvl(round(V.VerAuf12/1000,2), 0) + nvl(round(V.VerAuf7/1000,2), 0) ), 0) RAKosten, TO_CHAR(F.Created_Date,'MM.YYYY') Created_Date_MM , TO_CHAR(F.Created_Date,'YYYY') Created_Date_MMRRRR FROM FACM F, VA V WHERE F.custnum = DECODE(0,0,F.custnum,0) AND F.accnum = V.accnum GROUP BY F.custnum, V.Import_date,TO_CHAR(F.Created_Date,'MM.YYYY') ,TO_CHAR(F.Created_Date,'YYYY'))
Hello
Here's what I suggest:
select a.custnum, a.import_date, b.ErledigtMM, b.ErledigtGrundMM, a.Mandantenforderung, a.Inkassokosten, a.KontoFuehrungsgebuehren, a.Verwertungskosten, a.Barauslagen, a.Gerichtskosten, a.RAKosten, a.Created_Date_MM , a.Created_Date_MMRRRR from ( SELECT F.custnum, V.Import_date, nvl(sum(nvl(round(V.VerAuf16/1000,2), 0) +nvl(round(V.VerAuf17/1000,2), 0) + nvl(round(V.VerAuf18/1000,2), 0) + nvl(round(V.VerAuf19/1000,2), 0) + nvl(round(V.VerAuf20/1000,2), 0) + nvl(round(V.VerAufKAPUn/1000,2), 0) + nvl(round(V.VerAufKAPVz/1000,2), 0) ), 0) Mandantenforderung, nvl(sum(nvl(round(V.VerAuf4/1000,2), 0) ), 0) Inkassokosten, nvl(sum(nvl(round(V.VerAuf5/1000,2), 0) ), 0) KontoFuehrungsgebuehren, nvl(sum(nvl(round(V.VerAuf1/1000,2), 0) + nvl(round(V.VerAuf2/1000,2), 0) ), 0) Verwertungskosten, nvl(sum(nvl(round(V.VerAuf10/1000,2), 0) + nvl(round(V.VerAuf8/1000,2), 0) + nvl(round(V.VerAuf9/1000,2), 0) ), 0) Barauslagen, nvl(sum(nvl(round(V.VerAuf13/1000,2), 0) + nvl(round(V.VerAuf14/1000,2), 0) + nvl(round(V.VerAuf15/1000,2), 0) + nvl(round(V.VerAuf6/1000,2), 0) ),0) Gerichtskosten, nvl(sum(nvl(round(V.VerAuf11/1000,2), 0) + nvl(round(V.VerAuf12/1000,2), 0) + nvl(round(V.VerAuf7/1000,2), 0) ), 0) RAKosten, TO_CHAR(F.Created_Date,'MM.YYYY') Created_Date_MM , TO_CHAR(F.Created_Date,'YYYY') Created_Date_MMRRRR FROM FACM F, VA V WHERE F.custnum = DECODE(0,0,F.custnum,0) AND F.accnum = V.accnum GROUP BY F.custnum, V.Import_date,TO_CHAR(F.Created_Date,'MM.YYYY') ,TO_CHAR(F.Created_Date,'YYYY')) ) a, FACM b where b.custnum = a.custnum
By the way
WHERE F.custnum = DECODE(0,0,F.custnum,0) AND F.accnum = V.accnum
can be translated into
WHERE F.accnum = V.accnum
because
F.custnum = DECODE(0,0,F.custnum,0)
is always true
becauseDECODE(0,0,F.custnum,0)
means
if 0=0 then F.custnum else 0
-
Select different columns using union all
I'm trying to select all the records of two table
Select A, B, C from table1
Union of all the
Select A, B, D, E, F from table2
I get results A, B, C columns but not D, E, F.
What should I do to get all the columns in the result. as A, B, C, D, E, F
Thank you
SKHello
That's what you asked for:
select Total_Customer_Qty, NULL AS Total_Supplier_Qty, Item_number, Org,item_id from table1; union all select NULL AS Total_Customer_Qty, Total_Supplier_Qty, Item_number, Org,item_id from table2;
I hope that's what you want, too.
If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
Explain, using specific examples, how you get these results from these data.
Always tell what version of Oracle you are using. -
Select the column by using Session variables
I set a session variable to contain the name of a bound column that is the user. Is it possible to use a session variable to select a column in a database table? If so, how? Does need a statement where clause?
Something like that? :
< cfquery name = "rsSelectColumn" datasource = 'Test' >
SELECT column 1, column 2, column 3 is Variable from Session
OF tbl_data
< / cfquery >
Thank you
DaveI think you want to do this, if the value in the session variable is the actual column name:
SELECT column 1, column 2, #Session Variable # AS Col3
OF tbl_data
in this way, you can call any column stored in the session variable, and it will still be usable from the QUERY as COL3 regardless of which column you used.
If that's what you want to do - it OF as simple as that.
:-)
Sometimes we have to think of things too.
Maybe you are looking for
-
How to participate in the trial of impregnation, motorcycle g 2nd generation
I recorded of the updates and also saved my phone on Motorola products (and the reactions of Motorola and network), by also I dint get access to test early impregnation for 5.0 Android please help me... What I missed
-
I can video chat with 3 people or more
I want to video chat with several people at the same time I can do and how I put in place
-
HP 2549: HP 2549 and Mac OS x: double-sided printing does not work
Hello! I just installed this printer on my Macbook Air and I cannot print double-sided. I tried by USB / wireless (in the case where there is a difference between the two) but no luck. I followed the advice in this post: http://h30434.www3.hp.com/t5/
-
Vista service pack 2 installation failed
Vista SP2 could not change the recovery; now, my laptop will not load windows, it becomes just far away and restarts again for this mistake. What can be done to fix this?
-
Secondary phone of blackBerry Smartphones
Hello. I want to ask you how can I save my BB curve. It was given to me by my cousin, and it is always saved for her. She took her SIM card with it. Help!