# used in the name column in DB
I'm working with a pre-existing database in which many of the column names contain a sign #. Someone at - it a good solution for this scenario outside of rename column?Example of name of column: Last_CTR #.
One option is to use an alias.
SELECT [Last_CTR #] AS AliasForBadColumnName
FROM SomeTable
Tags: ColdFusion
Similar Questions
-
What is the use of the associated columns?
In the model business, logical columns are associated with a dimension level. But the columns are nether primary key or used for display. What is the purpose of these related columns?To expand our example a little more.
You have one day sun, as well as a month Dim. Your month logical name column is mapped to two tables through sources different logical table. Your levels of content is defined accordingly for these LTS.
You have a grain day fact table and a grain months aggregated fact table. You have a measure ($ quantity, no matter) mapped to two physical tables through two LTS with levels of content defined (as the time Dimension).
So when you query the name of the month and in Dollars, the BI server uses the global table as it can serve both the attribute of the dimension and the measure of the global table. He knows its more effective because the ratio between the number of items that you have defined in the hierarchy told him about 30 times less data on the whole of the month, by the ratio of 365 days 12 months ago.
So far so good.
Allows to introduce more dimensions, a.n.other dimension is attached to the base of fact table but NOT in the whole month. You model everything as per normal, when you drop this dimension in your report, the BI server recognizes that there is no comprehensive source that can give the right answer in all the areas required in the report falls to the next best form requested in the report, grain in this case simple, it would default to the base's table because it is only capable of serving the month and all fact table the attributes of the other dimension. In more complex models, you may have a few tables of aggregation with two more high grain (high) or less dimensionality (fewer lines). Setting levels LTS the existence of physical layer Joins tell the BI server which can be attached to the dimensioning, it tells what tables of aggregation would be more effective.
Not to be confused with the establishment of a limit on a measure - it's something different (level total function, % of the year etc etc.)I have it?
These might help:
http://gerardnico.com/wiki/dat/OBIEE/fragmentation_level_based
http://www.rittmanmead.com/2006/11/aggregate-navigation-using-Oracle-BI-server/
http://obiee101.blogspot.com/2008/11/OBIEE-making-it-aggregate-aware.htmlLet us know if any more Q
-
Hello
I fill a DataGrid with JSON data that comes from a mysql query. I was wondering if it is possible to say a piece of JSON data to one column other than the name there?
My JSON data comes with short names...
[{'gID': 'Rock', 'vID': 'Pub Darby', 'Greek': 'Yes'}]
and I load in my dataGrid data provider...
myDG.dataProvider = new DataProvider (myJSON);
Currently, my columns must be named...
gID, vID, and Greek
for the above data is filled. Is it possible to have more meaningful column names, while keeping the abbrieviated form in the JSON data?
for example...
STYLE OF CONCERT, VENUE, CAN BE SAVED
or have I not choice but to make the full names, part of the JSON as...
[{'CONCERT STYLE': 'Rock', 'PLACE': 'Pub Darby', 'CAN BE SAVED': 'Yes'}]
Thank you
Shaun
of course, you can create a dataprovider that suits your needs:
var obj:Object = {'gID': 'GIG STYLE', 'vID': "PREGNANT", "Greek:"CAN BE SAVED "};
var dpA:Array = [];
for (var i: int = 0; i<>
for (var s:String in {myJSON [i])}
dpA.push({obj[s]:myJSON[i][s]});)
}
}
myDG.dataProvider = new DataProvider (dpA);
-
ADF and the use of the XMLType columns
After discovering the Jdeveloper 11 g was able to generate business components/data controls for complex web services (see this tutorial excellet http://www.oracle.com/technology/tech/fmw4apps/agile/pdf/adf11g-agile.pdf), I assumed that jdev 11 g should now have the same capacity on XMLtype columns with a registered scheme, and was therefore a good match for our enforcement objectives be able to edit
parts of an XML document to aid in the face of components and Assembly/store the document in a way centic document in a relational/XML database XMLType column hybrid.
I tested this point, has created a table with an XMLType column binary, saved the schema in database (11g) and jdev(11g) and generated my components.
I was very disappointed at the discovery of the structure of data controls stops at the level of the attribute in the table (ie the XMLType column), so none of the structure of the XML document is revealed or can be used in a meaningful way through data control.
Am I missing something here? should not control data generated reveal the XML structure and allow the use of components of forms/table faces on some parts of the structure of the document? I'm not a java programmer, so was really hoping to do this with data not generated controls beans not.
If it is just to treat it as a CLOB, what's the point of registered xsd schemas?Yes, it is through java. Sorry
-
RICs when MergeTable using with the names of multiple tables
Hello world!
I just saw, as v11 OWM MergeTable media with the names of multiple tables. As I couldn't find anything in the documentation, here's a question:
It also means, that RICs are automatically taken into account regarding the order of INSERTS/CHANGES/DELETES?
That would actually really great and simplify the merge of our application mechanism a lot.
Kind regards
Andreas
Hi Andreas,
This feature works the same MergeWorkspace, but with a smaller set of tables. Tables will always be merged into the order of the child table first, then the parent tables. However, foreign key constraints are not validated until all tables have been merged. This would prevent a mistake to be triggered when the child table merging before the parent merging table data in the parent workspace.
Kind regards
Ben
-
Wild search in the name column
Hello
IAM using oracle 11.2
IAM having a query that finds a particular part of the word name
for example
CREATE TABLE TEST123
(type1, varchar2 (10))
LIST1 VARCHAR2 (10),
NAME VARCHAR2 (302).
NAME2 VARCHAR2 (500),
ANAG_NAME VARCHAR2 (2000))
SELECT *.
OF test123
WHERE ='s TYPE1' AND
(LIST1 = "CL"
AND (NAME2 = "AIILN" AND)
(instr (NAME, 'IAN') > 0 AND instr (NAME, 'LI') > 0))
OR LIST1 = 'TT '.
AND (NAME2 = "AIILN" AND)
(instr (ANAG_NAME, ' un ') > 0 AND instr (ANAG_NAME, "L") > 0))
)
the table can contain 2 million records.
I want to replace it with the index ctxsys.
because research is a wildcard search
If use to create indexes ctxsys.context I have to use the CONTAINS clause to find records that I have to use %
and if I create index ctxsys.ctxcat I use CATSEARCH to search for record, I used ' *'
but both takes more time...
However, an error occurs.
Can someone give some suggestion...
Thank you
user
Published by: user9080289 on June 22, 2012 12:10In general, you can create a CONTEXT index on a column, then use CONTAINS instead of the Instr. You can also create a MULTI_COLUMN_DATASTORE on several columns and use a sort of GROUP of SECTIONS, so that you can use a CONTAINS clause and with an index affected research in several columns. You can also use FILTER BY in your index creation, so that you can include columns structured in your index, so that you can use SURLABASEDESDONNEESDUFABRICANTDUBALLAST in your CONTAINS clause, so that your entire query uses one index. You can also use SUBSTRING_INDEX to increase lookup speed when you use wildcard characters. You may also need to increase the WILDCARD_MAXTERMS. If you are looking for a string that is separated by spaces, punctuation or some other delimiter, you don't need wildcards. However, if you search for a string in a Word, then you need wildcards. If you are looking for short strings, then you must be sure to only use a list of empty words that does not include them. If your channels are too short, then you are likely to exceed the WILDCARD_MAXTERMS, unless set you it to 0, while there is no limit, but then this type of query can be very slow and consume a lot of resources. Please see the demo below. I added a column to create the index on, but you can create index on a column of text. The columns that are searched are determined by the columns in the store of data and filtering, not the column in the index in created the.
-test environment consisting of table, data and similar to the original query:
SCOTT@orcl_11gR2> -- table: SCOTT@orcl_11gR2> CREATE TABLE TEST123 2 (type1 varchar2(10), 3 LIST1 VARCHAR2(10), 4 NAME VARCHAR2(302), 5 NAME2 VARCHAR2(500), 6 ANAG_NAME VARCHAR2(2000), 7 names VARCHAR2(1)) 8 / Table created. SCOTT@orcl_11gR2> -- data: SCOTT@orcl_11gR2> INSERT ALL 2 INTO test123 VALUES ('s', 'CL', 'IAN LI', 'AIILN', NULL, NULL) 3 INTO test123 VALUES ('s', 'TT', NULL, 'AIILN', 'AN L', NULL) 4 INTO test123 VALUES ('s', 'CL', 'IANLI', 'AIILN', NULL, NULL) 5 INTO test123 VALUES ('s', 'TT', NULL, 'AIILN', 'ANL', NULL) 6 INTO test123 VALUES ('s', 'CL', 'LIIAN', 'AIILN', NULL, NULL) 7 INTO test123 VALUES ('s', 'TT', NULL, 'AIILN', 'LAN', NULL) 8 SELECT * FROM DUAL 9 / 6 rows created. SCOTT@orcl_11gR2> -- query similar to original: SCOTT@orcl_11gR2> COLUMN name FORMAT A10 SCOTT@orcl_11gR2> COLUMN name2 FORMAT A10 SCOTT@orcl_11gR2> COLUMN anag_name FORMAT A10 SCOTT@orcl_11gR2> SELECT * 2 FROM test123 3 WHERE type1 ='s' 4 AND ((list1 = 'CL' 5 AND name2 = 'AIILN' 6 AND INSTR (name, 'IAN') > 0 7 AND INSTR (name, 'LI') > 0) 8 OR 9 (list1 = 'TT' 10 AND name2 = 'AIILN' 11 AND INSTR (anag_name, 'AN') > 0 12 AND INSTR (anag_name, 'L') > 0)) 13 / TYPE1 LIST1 NAME NAME2 ANAG_NAME N ---------- ---------- ---------- ---------- ---------- - s CL IAN LI AIILN s TT AIILN AN L s CL IANLI AIILN s TT AIILN ANL s CL LIIAN AIILN s TT AIILN LAN 6 rows selected.
-index multi_column_datastore, list of words and text:
SCOTT@orcl_11gR2> -- multi_coumn_datastore and wordlist: SCOTT@orcl_11gR2> BEGIN 2 -- multi_column_datastore: 3 CTX_DDL.CREATE_PREFERENCE ('test123_mds', 'MULTI_COLUMN_DATASTORE'); 4 CTX_DDL.SET_ATTRIBUTE ('test123_mds', 'COLUMNS', 'name, name2, anag_name'); 5 -- worlist: 6 CTX_DDL.CREATE_PREFERENCE ('test123_wl', 'BASIC_WORDLIST'); 7 CTX_DDL.SET_ATTRIBUTE ('test123_wl', 'SUBSTRING_INDEX', 'TRUE'); 8 CTX_DDL.SET_ATTRIBUTE ('test123_wl', 'WILDCARD_MAXTERMS', 50000); 9 END; 10 / PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> -- text index using FILTER BY, multi_column_datastore, section group, wordlist: SCOTT@orcl_11gR2> CREATE INDEX test123_idx 2 ON test123 (names) 3 INDEXTYPE IS CTXSYS.CONTEXT 4 FILTER BY type1, list1 5 PARAMETERS 6 ('DATASTORE test123_mds 7 SECTION GROUP CTXSYS.AUTO_SECTION_GROUP 8 WORDLIST test123_wl 9 STOPLIST CTXSYS.EMPTY_STOPLIST') 10 / Index created.
-query using CONTAINS and SURLABASEDESDONNEESDUFABRICANTDUBALLAST with a single hit index:
SCOTT@orcl_11gR2> SET AUTOTRACE ON EXPLAIN SCOTT@orcl_11gR2> SELECT * 2 FROM test123 3 WHERE CONTAINS 4 (names, 5 'SDATA (type1 = ''s'') 6 AND AIILN WITHIN name2 7 AND ((SDATA (list1 = ''CL'') 8 AND (%IAN% AND %LI% WITHIN name)) 9 OR 10 (SDATA (list1 = ''TT'') 11 AND (%AN% AND %L% WITHIN anag_name)))') > 0 12 / TYPE1 LIST1 NAME NAME2 ANAG_NAME N ---------- ---------- ---------- ---------- ---------- - s CL IAN LI AIILN s TT AIILN AN L s CL IANLI AIILN s TT AIILN ANL s CL LIIAN AIILN s TT AIILN LAN 6 rows selected. Execution Plan ---------------------------------------------------------- Plan hash value: 3044757981 ------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 1435 | 4 (0)| 00:00:01 | | 1 | TABLE ACCESS BY INDEX ROWID| TEST123 | 1 | 1435 | 4 (0)| 00:00:01 | |* 2 | DOMAIN INDEX | TEST123_IDX | | | 4 (0)| 00:00:01 | ------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("CTXSYS"."CONTAINS"("NAMES",'SDATA (type1 = ''s'') AND AIILN WITHIN name2 AND ((SDATA (list1 = ''CL'') AND (%IAN% AND %LI% WITHIN name)) OR (SDATA (list1 = ''TT'') AND (%AN% AND %L% WITHIN anag_name)))')>0) Note ----- - dynamic sampling used for this statement (level=2) SCOTT@orcl_11gR2>
-
json_list to varchar/string to use in the virtual column
Hello Experts,
Environment:
Database Oracle 12 c Enterprise Edition Release 12.1.0.2.0 - 64 bit Production
PL/SQL Release 12.1.0.2.0 - Production
I have the following function that returns JSON_LIST.
{code}
CREATE OR REPLACE FUNCTION GENERATE_JSON (STRING2CONVERT IN VARCHAR2)
RETURN JSON_LIST
DETERMINISTIC
IS
RET json_list;
V_ERROR VARCHAR2 (31000);
BEGIN
RET: = json_dyn.executeList (STRING2CONVERT);
RET. Print;
RETURN RET;
EXCEPTION WHEN OTHERS THEN
V_ERROR: = SQLERRM;
RETURNS A NULL VALUE.
END;
-test the query see the output in the output of DBMS
SELECT GENERATE_JSON (' select ' |) Chr (39) | ' AJ' | Chr (39) |' like c_name,' | Chr (39) | ' BOY ' | Chr (39): ' c_type, like '
|| Chr (39) | ' HUMAN '. Chr (39): ' as c_category,' | Chr (39) | ' TEST SUBJECT ' | Chr (39) | 'as c_desc from dual')
FROM DUAL;
{code}
The SQL query above in the DBMS output output
[{
"C_NAME": "AJ."
"C_TYPE": "BOY."
"C_CATEGORY": "HUMAN."
'C_DESC': 'GUINEA PIG '.
}]
Question: How can I have it return the same structure of String (varchar).
Why would I want to convert JSON_LIST to string?
So that I can use this call to service as part of a virtual column in a table to store Json and have a constraint to enforce structureof Json.
If this is not the right way?
Kindly share how I can take a few columns in the same table, convert to json format and store in a virtual column in the same table and enforce the Json structure?
Thank you
AJ
with
data in the form of
(select q'~ select "AJ" as c_name, 'BOY' as c_type, 'HUMAN' as c_category, 'SUBJECT of TEST' as the double c_desc ~' source)
of the double
),
Converter (SRC, res, Step) as
(select regexp_replace (ltrim (upper (substr (source, 1, instr (upper (source), "FROM") - 1)), "SELECT"), '\s+AS\s+',': ') |) ',', null, 1
from the data
Union of all the
Select substr (src, instr(src,',') + 1)
'"' || substr (substr (SRC, 1, InStr (CBC, ',') - 1), instr (substr (src, 1, instr (CBC, ',') - 1),': ') + 1) | '" : ' ||
Replace (substr (substr (SRC, 1, InStr (CBC, ',') - 1), 1, instr (substr (src, 1, instr (CBC, ',') - 1),': ')-1), "','" ' "),
Step + 1
converter
where the CBC is not null
)
Select the source'[{' | listagg(res,',') Group (order by step) |}] '] "converted
data converter
SOURCE CONVERTED Select "AJ" as c_name, 'BOY' as c_type, 'HUMAN' as c_category, 'SUBJECT of TEST' as double c_desc [{'C_NAME': 'AJ', 'C_TYPE': 'BOY', 'C_CATEGORY': 'HUMAN', 'C_DESC': 'GUINEA PIG'}] Concerning
Etbin
-
This is the email I received. Is it authentic?
Dear owner,
Our records indicate that your account has not been updated as part of our regular account maintenance. Due to the anonymous registration of free account we have seen mixes account and therefore blocking part of the account. So you're Advisor to answer our customers with your account information for the update and ensure you are the real owner of this account.Do this by clicking on the button answer.
* Full Name: ............................................................* User name: ..........................................................* Password: ............................................................* Date of Birth: .......................................................* Country or territory:...* Alternative email if applicable:...* Password: ............................................................This return is required for the update and to avoid the blocking of your account. If you do not respond to this message. you will lose your account permanently.Thank you for your usual cooperation. We apologize for the inconvenience.
Sincerely,
Service team members .This is a phishing scam. A modernized version of the present.
Closing account Hotmail Phishing Scam
http://www.Hoax-Slayer.com/Windows-Live-Hotmail-phishing-scam.shtml -
I create a new project in the projects and Solutions (C++) as Console Win32 Application. I enter a name for the file as proposed game and the project
an error because there seems to be some included characters that are not allowed. WHY there is not?
I would say it is more lilkely a question for http://social.msdn.microsoft.com/Forums/en-us/vcgeneral/ programming forums
-
Querying the oracle table that has a column with the name of "FILE".
Hi all
I need to have an oracle table that has the column with the name "FILE".
I can query all columns with the query "select * from table".
But I'm not able to use the query "select the table file.
This table is converted from ms access to oracle and I need to have this column with the name "FILE".
Any suggestions?
Thank you
Abdellaoui
Hello
FILE is a keyword from Oracle, so it's not a good name,
Use FILEDATE, or DATE_FILED, or something else that is not in V$ RESERVED_WORDS. KEYWORD as the name column.
If you need to use the FILE, then you must use quotation marks.
-
After a computer crash, I had to load Thunderbird (v31.3.0) in my computer running Windows 8.1, and I managed to import my address book backup file in Thunderbird (v31.3.0).
My problem is that I don't see an option to sort the address book by name of 'Family', which was available with the version of Thunderbird, I had before the crash.
How can I get the address book to sort by the name of "family"?"Address book".
Select address book
"View' > 'Show name as' > last/first". "You can sort by name.
Click on the 'Name' column header to change the sort order,
Reversed, then click on the 'Name' column header again to reverse the order.Or
'View' > ' sort by ' > select 'Name' and 'Crescent '. -
Find the name of the column in all tables
How to find the name of the column in all tables in the database for any column to reveal the name of the person?
We have over 1000 tables looking for.and in some places, the name column FNAME LNAME, First_NAME, DNAMEFor example we have Customer table, Table EMPLOYEE and the ORDER Table
--------------------------------
Customer table
--------------------------------LNMAE
EMPLOYEE table
EMP_ID
DEPT_NAME (we don't want this column as it is not a name column)
Last_name (he must propose this column because it is named)----------------------------
CONTROL Panel
-----------------------------
ORDER_ID
ORDER_NAME (we don't want this column as it is not a name column)
Last_name (he must propose this column because it is named)-------------------------
Dept table
-------------------------
Dept_ID
DEPT_NAME (we don't want this column as it is not a name column)Please advise...
Thank you.
Hello
What exactly do you do?
If you want to display the tables containing these columns, you can query the view data dictionary USER_TAB_COLS (or ALL_TAB_COLS, or, if you have privileges, DBA_TAB_COLS).
For example:
SELECT table_name, column_name
Of user_tab_cols
WHERE nom_de_colonne IN ('DNAME', 'FNAME', 'FIRST_NAME', 'LAST_NAME', 'LNAME') - or else
ORDER BY table_name, column_name
;
-
Hi all
We use the Oracle 10 g R2 64 bits on 64-bit windows server 2008.
I have the following tables
CREATE TABLE dept ( DEPARTMENT_ID NUMBER primary key, DEPARTMENT_NAME VARCHAR2(100) NOT NULL, DEPARTMENT_TYPE CHAR(1) NOT NULL, /* S for section, D for DEPARTMENT*/ REFERENCE_DEPARTMENT NUMBER/* Self reference to department_id */ ); alter table dept add constraint fk_dept_id_reference_dept foreign key REFERENCE_DEPARTMENT references dept(department_id); insert into dept values (1,'ETC','D',Null); insert into dept values (2,'CSS','S',1); insert into dept values (3,'ESS','S',1); commit; create table emp ( empno number primary key, ename varchar2(1000), department_id number references dept(department_id) ); insert into emp values (1,'Jones',1); insert into emp values (2,'Smith',2); insert into emp values (3,'Scott',3); commit;
Now we need a query that selects all employees, in each Department and the name of the service
We use the following query
select count(e.empno) Total_Employees,d.department_name from emp e, dept d where e.department_id=d.department_id;
The result shows as well the section names, while we want to display a result as below
Total_Employees Department_Name 3 ETC
We do not want to display the names of section, of course we want to count employees in all sections of a Ministry, or we only want to display the name of the Department.
I hope I'm clear in the description of my problem.
Thank you.
Hello
Maahjoor wrote:
I have 14 departments and nearly 25 sections.
I can't just include every department as HE said in HIS application
- Select department_id 1, "ETC." DEPARTMENT_NAME 'd' DEPARTMENT_TYPE, Null...
I have many ministries and numerous sections.
If I include all services as IT were included in the above sentence, my request will become 2-3 hundreds of lines.
IT should use only the names of actual columns in your query, not the service name, for example ETC.
concerning
No, the length of the query is the same, regardless of the number of rows in the tables. As Etbin explained in response to #8, emp and dept subqueries are not part of the solution; they are just average Etbin of testing the solution without creating any actual table. Since you have real tables, you can start with the following subquery solution, i.e.:
WITH the_data as
(select d.department_id, d.department_name, d.department_type, d.reference_department, c.emp_count
by d Dept.
...
-
I have written an application in adf faces and business components, but would like to be able to add items to it simply by creating a view of data base, i.e. with standard names and a suffix, probably static number of columns (just a read only view). I can handle the front-end and logic, but can't see a way to parametise the names & columns in view of component of the business objects. I can do things like create a load of dummy views with 10 passes to say selection double 0 then their chuck in the model, which is a mess, but would work... I was wondering if there's a cleaner way I can achieve through the model or any other method, so any ideas that could point me in the right direction would be useful.
Thanks in advance...
Tim.Hello
You may want to investigate the dynamics of ViewObjects or dynamicaly adding attributes such as 9 and 29 of http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
See also
http://www.bloggingaboutjava.org/2006/04/binding-dynamic-view-object/
Frank
-
How to sort the names in order albhabetical in Windows Mail on some recipients?
Original title: Windows Mail
Re my Windows Mail, the "Select recipients" list sorts e-mail addresses in alphabetical order rather than alphabetical order the real names, how can I change this?
Hi sarahsdrive,
Try these steps and check the result.
a. in the Contacts folder: change the display «Détails»
b. right-click on the 'Name' column header, click on "First name", then click on 'Last Name'
c. click on "Last Name" to sort by this order, or click on the title "First Name" to sort by this order.
d. in a window to create a message: click on:
e. click the column 'Name' position... it cycles through 4 different kinds
f. in Contact properties, click on the arrow pointing downwards at the end of the full name boxChange Windows Mail send settings
Visit our Microsoft answers feedback Forum and let us know what you think.
Maybe you are looking for
-
Downloaded from iTunes app does not appear on the iphone or iPad
Download an app from iTunes. It appears on my Apps for iPhone and iPad, but does not appear on the device. I have devices connected to the computer via usb, but nothing works. Any ideas?
-
How can I remove the double song from my iPhone titles?
How can I remove the double song from my iPhone titles?
-
Firefox can't print wesites correctly, but Internet Explorer can
The only other sites I can print with firefox are PDFs. All other Web sites try to print the page into small pieces. For example this page (http://en.wikipedia.org/wiki/Print) in Internet Explorer prints a page. In firefox this page prints 11 pages w
-
HP Pavilion dv7-3190em problems with volume band and "base system device" in Device Manager
Hello I just installed Win 7 (64-bit) and my volume control does not work properly. It does not turn the sound up and down, but the blue band is not displayed on the screen. In addition, I seem to have a device or devices for which there is no driver
-
I need windws xp sp3. I don't have any friends with a xp disc. It just won't download anything without the installed xp3. I can't use the windows or microsoft update, although I have automatic updates on! I tried to download from other sites but - no