Full text query across multiple columns
In the SQL Server, when you do the full text query, you can specify multiple columns, e.g.
FREETEXT ( { column_name | [b](column_list) | * } , 'freetext_string' [ , LANGUAGE language_term ] )
CONTAINS ( { column_name | [b](column_list) | * } , '< contains_search_condition>' [ , LANGUAGE language_term ])
Where,
column_list Indicates that several columns, separated by a comma, can be specified...
* Specifies that all columns in the table registered for full-text searching should be used to search for the given contains search condition. The columns in the CONTAINS clause must come from a single table...
That makes full text query cross multiple columns very convenient. Are there any mechnisms in Oracle to do the same thing?
Thanks in advance.
Thanks for your reply.
I knew that you could build full text index for the multiple columns using Oracle Text. But that does not solve my problem, which is how to build the query to search multiple columns at once. Say, I have columns firstname, lastname, address, and email in the table customers. I want to get the results that ANY column contains 'bob'. In SQL Server, I can do
select * from customers where contains(*, 'bob')
that is. But for Oracle, I have to do
select * from customers where contains('firstname', 'bob') or contains('lastname', 'bob') or contains('address', 'bob') or contains('email', 'bob')
Can you imagine if I have many columns in many tables and I have to do the query against all columns in all tables? I have to dynamically get all the columns and then build the query string.
So, any better solutions?
Similar Messages
-
Content Query display multiple columns
Hello,
I am using a content query web part (in sharepoint 2013) to display a list from another site. The problem is that I don't see enough info from that list because I can display maximum 2 columns.
Is it possible to display more columns from this list with the Content query web part? I would like to display all the columns from this list. Do i need to make a display template or something?
Thanks.You have to customize the CQWP.
Please check the below link
http://pholpar.wordpress.com/2010/01/21/displaying-results-in-multiple-columns-using-the-content-query-web-part/
Other option is you ca use Dataview webpart to show the list details from one site to other site
http://www.learningsharepoint.com/2012/08/12/sharepoint-2013-add-dataview-webpart-with-sharepoint-designer-2013/
http://sharepointgeorge.com/2009/display-sharepoint-list-site-data-view-web-part/
MCTS,MCPD Sharepoint 2010. My Blog-
http://www.sharepoint-journey.com
If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful -
Hi all,
my db version is 9.2.0.4.0.
In alert log i found somehing like:
ORA-01555 caused by SQL statement below (Query Duration=3429 sec, SCN: 0x0657.4e6b7e0c):
Wed Jan 16 17:33:43 2008
SELECT
T1.CONFLICT_ID,
T1.LAST_UPD,
T1.CREATED,How can I get the full query?
thanks a lot
aldoIf you can get the sql_id then use below query to find full text.
SELECT
SUBSTR(SQL_TEXT, 1 + (i - 1) * 80, 80) SQL_TEXT
FROM
DBA_HIST_SQLTEXT HST,
(SELECT ROWNUM I FROM DBA_HIST_SQLTEXT WHERE ROWNUM <=
60)
WHERE
HST.SQL_ID = '&SQL_ID'
Rergards
Jafar -
Full text search across books in iBooks for Mavericks
Is there a way to do full text search of all documents under iBooks for Mavericks?
I have quite a few books in categories and collections that are not mutually exclusive. It is becoming quite tedious to find the book I need when I need it. I have tried search in iBooks but it only seems to hit titles, maybe some keywords, and perhaps other fields, but not the full text of the documents.
I cannot find any way in Spotlight preferences or in iBook preferences to specify that the body of documents under iBooks should be indexed/searched.
Best regards,
TomJust to register that I have fixed the problem.
I tried reinstalling RH, but that didn't work. I was about to
give up when I noticed that an error was coming up when I compiled
the project: the infamous "HHC6003: The file itircl.dll has not
been registered correctly". I found out that you only fix that
problem by registering another dll: itcc.dll
Once you fix this, the compilation is perfect and the
full-text Search works properly again.
Thanks anyway for the interest.
Paulo. -
I have a page with two columns. The regions can be allocated in two columns. For example:
Region1 Region2
Region3 Region4
Region5 Region6
I want the first region to be across two columns, like this:
Region 1
Region2 Region3
Region4 Region5
Region6 Region6
How could I do it? Because in APEX you have to specfy which column the region is going to be.
Tried use colspan="2" in HTML attribute, but it does'nt work.Do one thing,
In the User Interface property of the region 1 select the Display Point as "Page template Body(1.....)"
and after that from Region 2 select Display Point as "Page template Body(2.....)"
and select the column(1 or 2) accordingly.
Thanks
Tauceef -
Running sql query across multiple (remote) databases
I'd like to run a query that pulls information from multiple databases which are not on the same machine. Is this possible using SQL Developer?
If you are still interested, there is a tool that can query multiple databases and save results in a single text file that you can then modify as necessary - see www.bsutils.com/MuSQL.html
-
Calculations across multiple columns
I am a virgin to iOS Numbers on the iPad and need to prove it’s worth in work. I have a spreadsheet where I have to calculate the number of entries matching 3 criteria in a row:
by Date (Month),type of job (e.g. bathroom or kitchen) and against a score range of <=6
I have the data in aworksheet called Data! and the calculations are made in a separate worksheet,Calculations!
The formula I havebeen using in Excel is:
=SUMPRODUCT((Data!$A:$A=B220)*(Data!$E:$E<=6)*(Data!$L:$L=B219))
B220 is a cell containing the date I am looking for in Data! A:A (e.g. Jan, Feb)
Column E contains the value; I am looking for scores of 6 and less
B219 is a cell containing the type of work in text format to be looked for in Data! Column L
And this is spot on giving me a numeric value for example for all kitchen works in June with ascore of 6 or less.
In Numbers I have tried to transpose this:
=SUMPRODUCT((Data::Table1::A: =B220)*( Data::Table 1::E<=6)*( Data::Table 1::L=B219))
But it doesn’t work I have scoured the net and the on line help for iOS numbers is as useful as a chocolate fireguard. I even tried my local Apple store to no avail
Can anyone throw some light on the right direction I need to head in before I throw in the towel and get everyone on Roambi which works with the excel outputCAUTION, I'm not sure that COUNTIFS behave flawlessly in Numbers for iOS.
If I remember well it's one of the functions which failed in the document which I tried to make usable soon after the delivery of Numbers for iPad.
Yvan KOENIG (VALLAURIS, France) lundi 18 juillet 2011 23:21:22
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
Spry validation text field across two columns in a table?
I have a table with two columns. I can easily insert a spry validated text field into the left cell but when I drag the box over so that box is in the right column and the label is still in the left column then that breaks the widget.
Is this even possible for me to do or do I have to put the widget in just one column?Think I figured it out.
http://www.adobe.com/devnet/dreamweaver/articles/spry_form_validations.html -
Full text search in BLOB columns NOT Working
Hi, I am using Oracle 9i.
Presently I use following code to create index.
begin
Ctx_Ddl.Drop_Preference ('text_only');
end;
begin
Ctx_Ddl.Create_Preference ( 'text_only', 'basic_lexer');
Ctx_Ddl.Set_Attribute ( 'text_only', 'index_text', 'true' );
Ctx_Ddl.Set_Attribute ( 'text_only', 'index_themes', 'false' );
end;
CREATE TABLE MY_XML_DOCS(
XML_RES_ID NUMBER (16) NOT NULL,
XML_RES BLOB NOT NULL,
XML_RES_PATH VARCHAR2 (128),
XML_DOCS_CREATED_BY VARCHAR2 (16) NOT NULL,
XML_DOCS_CREATED_DT DATE NOT NULL,
XML_DOCS_MODIFIED_BY VARCHAR2 (16),
XML_DOCS_MODIFIED_DT DATE ) ;
drop index FULL_TEXT_INDEX ;
create INDEX FULL_TEXT_INDEX ON MY_XML_DOCS(XML_RES)
INDEXTYPE IS ctxsys.CONTEXT
parameters ('lexer text_only stoplist ctxsys.empty_stoplist');
BEGIN
CTX_DDL.sync_index('FULL_TEXT_INDEX ','10M');
END;
And I've some XML documents stored in blob columns in the above table. But my query with 'contains' param does not return expected results.(it presently returns no results). Do I miss anything? Do I need to specify any thing else while I create the Index? Kindly advice.I would agree the CLOB storage would be preferable for XML. If you are using BLOB storage, by default the documents are going to be FILTERed by the INSO_FILTERS. A BLOB column will give you reduced storage in a unicode environment though.
If you wish to store your data in a BLOB though, you should specify the NULL_FILTER in your create index statement to avoid having the INSO_FILTERS invoked.
Further, you may also require a CHARSET column in your table specifying the character set of your data for each row if it can vary. The Column should then also be specified in the 'PARAMETERS' clause of the create index statement, this way Oracle knows the correct character set to use when converting the binary data to character data.
My guess that you are not getting any query results because none of the documents are actually being indexed. Be sure to query the ctx_user_index_errors view to determine if you are getting errors at indexing time. -
Select Query where multiple column in multiple values (cant use in clause)
I can use (in clause) with on column like this:
Select code from table where code in(1,2,3)
-------------------------------My case:-------------------------------------------------
I’ve 4 columns PK of table as below
I need to :
select
where (code, month, year) in ((1,1,2013) and (2,1,2014) and (2,2,2015))
i can't write it this way :
select where code in (1,2) and month in (1,2) and year in (2013,2014,2015)
case i'll get my rows but others included like (1,1,2015) , (1,1,2014),(2,1,2013) .. etc
I’m terribly want to solve this problem
Please help me
Code (pk)
Month (pk)
Year (pk)
emp_code(pk)
1
1
2013
101
1
1
2013
102
2
1
2013
101
2
1
2013
102
1
2
2013
101
1
2
2013
102
2
2
2013
101
2
2
2013
102
1
1
2014
101
1
1
2014
102
2
1
2014
101
2
1
2014
102
1
2
2014
101
1
2
2014
102
2
2
2014
101
2
2
2014
102
1
1
2015
101
1
1
2015
102
2
1
2015
101
2
1
2015
102
1
2
2015
101
1
2
2015
102
2
2
2015
101
2
2
2015
102
thank youIn T-SQL you have to use OR-ed predicates.
In full ANSI Standard SQL youcan write row comparisons (a,b,c) = (1,2,3) etc! but not in T-SQL dialect. Ignoring that problem, what you have is a design flaw called attribute splitting; you have put one unit of measurement
in two columns.
I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the
ISO-8601 data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Sql query across multiple tables ina database
I have 3 MS Access tables in database that are linked by keyed fields in the table. Is there a way to fetch only certain records that match a criteria across all three of these tables using the database connectivity toolset VIs?
Thanks. I am trying to mechanize/run an SQL query like this
SELECT Code_Type.Code_NUM, Code_Type.Code_Word, Word_Type.Parm_Label, Word_Type.Word_Sequence, Word_Type.Num_Words, Parameter_Label.Parm_Label, Parameter_Label.Parm_Name, Parameter_Label.Num_Bits, Parameter_Label.Num_Bits
FROM (Code_Type INNER JOIN Word_Type ON Code_Type.Code_Word = Word_Type.Code_Word) INNER JOIN Parameter_Label ON Word_Type.Parm_Label = Parameter_Label.Parm_Label;
while using the VIs in the database connectivity toolset. How do I code this using these VIs? I dont see an example of a straight SQL string like this being able to be put into the VIs. -
How do I search for common values across multiple columns?
I am coordinating a schedule with 5 people across hundreds of dates, and have columns A-E filled with many rows of dates. How can I make a new column that displays all the dates (values) that each person (column) has in common with all the others?
Is there a simple formula for this?
thanks!Scarampella,
A second table can be used to find your matching dates.
Here's an example:
The formula in Matching Dates is:
=IF(ISERROR(MATCH(A,Table 1 :: A, 0)+MATCH(A,Table 1 :: B, 0)+MATCH(A,Table 1 :: C, 0)+MATCH(A,Table 1 :: D, 0)+MATCH(A,Table 1 :: E, 0)), "", A)
Basically, I look for matches in each person's list of dates, and if any fail to produce a match with the date being examined, the result is a miss, and if all match, it's a hit. You can sort the result to get a short list of matches without spaces.
Regards,
Jerry -
How to use ServerApplicationContext to do a remote query across multiple entities
Hello everybody,
My data model is like this:
"Case" -> one-to-many -> "Document"
Document has the fields:
- "IsFinalised" (boolean)
- File (large binary)
My business rule is: 'a Case is closed if all its documents are finalised'.
I am trying to do a query which returns whether a case is closed using ServerApplicationContext, but I don't want the query to load the large binaries for each Document into memory for given case.
Does this do the job?
int IsCaseClosed(int caseId)
using (var sac = ServerApplicationContext.CreateContext())
var relevantCase = sac.DataWorkspaces.ApplicationData.Cases.FirstOrDefault(c => c.Id = caseId);
return relevantCase.Documents.All(d => d.IsFinalised);I think what you have is pretty close. I would probably write it like this:
bool IsCaseClosed(int caseId)
bool isClosed = false;
if caseId > 0
using (var sac = ServerApplicationContext.Current ?? ServerApplicationContext.CreateContext())
isClosed = sac.DataWorkspace.ApplicationData.Cases_Single(caseId).Documents.All(d => d.IsFinalised);
return isClosed; -
Ability to update a custom text field across multiple projects in a grid type view
We have a project level custom field for the Project Owner to enter an Executive Level project status. A project owner will have many projects. Right now the owner has to open each project individually, update the text field and save which can
take a considerable amount of time. We would like to have the ability to have the project list with the text field in a grid (looks like an excel sheet) with the ability to update the text field directly from the grid. Is there some way
to do this?Hi,
Which project version are you using?
Anyway there is no "excel-like" way to bulk edit proejct field, such as you can do for the resources. The project center is unfortunately a read-only view.
For PS2010, the
bulk edit tool allows you bulk editing pronot be "excel-like" meaning updating the value in rows. You'll have to select the project with the same value for the custom field and enter the value once and validate and redo this process for each proejct field
value.
Otherwise third-party tools are available on the market for this purpose:
http://www.senseiprojectsolutions.com/sensei-bulk-update/
http://www.fluentpro.com/productsfluentbooks2013.html
Finally you could develop a side-application to achieve this objective.
Hope this helps,
Guillaume Rouyre, MBA, MCP, MCTS | -
Best workaround for querying across multiple Data Sets?!
Hi folks
Today I was migrating my older OEID 3.0 applications to 3.1, and I noticed some of my older version views are not working anymore in new version.
We used to have multiple Bulk Add/Replace (without specifying Collection Keys) and we could use any attributes from any of these, in a certain View for example.
My views were like SELECT SUM("an attribute/metric from Bulk Add_1") / SUM("an attribute/metric from Bulk Add_2")
Now that you have to specify a FROM clause in your views, and it has to be from a certain Data Set, whats the best way to achieve above line goal?
Bests,Patrick
What I meant by Cross Join is Cartesian Product in situation that you have many-to-many relations between 2 Data Sets
Lets say, I have to different data, coming from 2 totally different source, one from Sales Dept and the other one from Purchase Dept:
Sales Table:
Part Number
Sales QTY
Sales Date
Part Type
Manufacturer
Country
0001
70
10/5/2012
TYPE1
Manuf1
US
0001
120
10/6/2012
TYPE1
Manuf1
US
0001
350
10/7/2012
TYPE1
Manuf1
US
0002
100
10/8/2012
TYPE2
Manuf2
US
0002
80
10/9/2012
TYPE2
Manuf2
CA
0003
2500
10/10/2012
TYPE3
Manuf3
CA
0004
180
10/11/2012
TYPE4
Manuf4
US
Purchase Table:
Part Number
Purchase QTY
Purchase Date
Part Type
Manufacturer
Country
0001
50
10/5/2012
TYPE1
Manuf1
US
0001
60
10/6/2012
TYPE1
Manuf1
US
0001
100
10/7/2012
TYPE1
Manuf1
US
0001
200
10/8/2012
TYPE1
Manuf1
US
0002
1100
10/9/2012
TYPE2
Manuf2
US
0003
20
10/10/2012
TYPE3
Manuf3
US
What is the preferred approach to ingest this data?
Maybe you are looking for
-
Ipod recognized by windows, but not recognized on itunes
Just got a new nano today and tried it on itunes. The nano is recognized on My Computer, but not on itunes. Tried switching USB drives, running restarts, updates to the newest itunes version, restores on the ipod, even switching connecting cables, bu
-
Why does my iMessage no longer send on my iPad?
Recently, I started having trouble with iMessage not delivering messages. I get the error code 'try again'. I did a restart and a complete restore and still no luck. Help!
-
Will not boot to 10.5.5 on restart
After removing my Boot Camp partition with Boot Camp Assistant, my 2.0 GHz iMac will not boot directly to 10.5.5, I receive the message "no bootable device found". I must hold down the option key and select and choose Mac OS X, 10.5.5 on Macintosh HD
-
Login window only shows "Other..." account listed
For some reason when my wife reboot her iBook running 10.3.9 the login window came up and only showed the "Other..." account listed. Her account and mine are both not visible. Nothing was changed before rebooting and we cannot login using Other even
-
Managed Folder linked to Entire Mailbox
Hello I have an Exchange 2010 SP1 with Managed Folder Mailbox Policy configured to some users. It's configured to link with Inbox, Sent items,... and Entire Mailbox.I believe that due to the "Entire Mailbox" link it is deleting old contacts too. Cons