Workarounds for searching a text field in SQL Server 2000

Hi,
I have a need to search within a text field in SQL Server 2000. In the
limitations section it notes that this is not possible. Is there a
recommended workaround for this in terms of performance? I have no way
of knowing the length of the text field in advance, and this could be
fairly large. Also, the number of objects that could contain the text
can be fairly large as well.
Thanks in advance,
Khamsouk

Note that some databases (or Oracle, at least) provide alternatives to
LIKE '%foo%' that are more efficient for large text blocks, given that
you have the appropriate indexing plugins etc. etc.
To use one of those types of search operators, you'd have to put
together a custom extension.
-Fred
Fred Lucas <[email protected]> wrote:
I'm assuming that when you say 'a text field', you're referring to a
SQLServer TEXT field, as opposed to just any old field that contains
text.
Like I said, I'm by no means a SQLServer pro, but I just ran:
SELECT CLOBSTRINGX
FROM LOCATORTESTOBJECTX
WHERE CLOBSTRINGX LIKE '%o%';
and got back my test row with 'foo' in the CLOBSTRINGX column.
CLOBSTRINGX is a TEXT column.
So, it is possible that our stringContains() extension will just work.
But then again, maybe not. I'm guessing it will.
Give it a try and, if you get an error, post the generated SQL (turn on
SQL output by setting the com.solarmetric.kodo.Logger property to
'stdout') and the error that you get. Also, try executing the generated
SQL directly against your data store to see if it works there.
-Fred
Khamsouk Souvanlasy <[email protected]> wrote:
Basically I just want to use kodo's extended stringContains syntax on a
text field. Is this possible?
Khamsouk
Fred Lucas wrote:
I'm not intimitely familiar with SQLServer's text searching
capabilities, but I'm confident that you could create a query extension
that would do what you need it to do.
What is the SQL that you are trying to generate?
-Fred
Khamsouk Souvanlasy <[email protected]> wrote:
Hi,
I have a need to search within a text field in SQL Server 2000. In the
limitations section it notes that this is not possible. Is there a
recommended workaround for this in terms of performance? I have no way
of knowing the length of the text field in advance, and this could be
fairly large. Also, the number of objects that could contain the text
can be fairly large as well.
Thanks in advance,
Khamsouk
Fred Lucas
SolarMetric Inc.
202-595-2064 x1122
http://www.solarmetric.com

Similar Messages

  • How to populate image and text field in SQL Server

    I want to populate a table, i.e insert images in a table in SQL Server. I am using Java(JSP/Servlet). Can any one suggest me how to populate the image and text fields in SQL Server...of course, using Java. If possible, could you please give me a piece of code?
    Regards -
    Samit

    Hi,
    Please check the following link for information on inserting images in to sql server database.
    http://www.databasejournal.com/features/mssql/article.php/1475641
    Cheers,
    vidyut

  • Update kernel steps for IDES 4.7 - Windows - MS SQL SERVER 2000

    Hello,
    Concerning updating the kernel - for IDES 4.7, Windows, SQL SERVER 2000 - is there a way to locate exactly the.SAR files - for the database dependent & database independent parts - which are compatible with the used SAP version.
    Also, does updating the kernel involve only the following:
    - Downloading the .SAR file.
    - Taking a backup copy of the exe/run folder's content.
    - Stopping the SAP system and all related services.
    - Unpacking the .SAR files using the SAPCAR utitilty,
    i.e. are there any specific steps to be done after the unpacking ?
    Thanks in advance.
    Reda Khalifa
    IT Department - Almansour Automotive Group - Egypt

    Hi Reda,
    I guess You want to upgrade kernel from 6.20 to 6.40.
    Go to service.sap.com -> downloads -> SAP Support Packages -> Search for SP and Upgrades -> enter "kernel 6.40" and follow the link "kernel 6.40 32-BIT".
    On next window choose from location :SAP KERNEL 6.40 \ Windows Server \ Database independent following SARs (title):
    -       enq
    -       disp+work package
    -       dsrlib
    -      enserver
    -       librfc
    -       MMC (optional)
    -       Kernel Part I (for Basis 640/620/610) Q1/2007 (very important)
    -       saposcol
    From location:SAP KERNEL 6.40 \ Windows Server \ MS SQL Server choose following SARs:
    -      Database Library
    -       R3LOAD
    -       R3load Control
    -       Kernel Part II (for Basis 640/620/610) Q1/2007 (very important)
    Unpack it to newKernel directory and copy it to \exe\run directory.
    Next step  Frank Deijkers  already wrote.
    On the end of upgrade go to \exe\run catalog and run sapstartsrv.exe program for registering new service and COM library.
    Regards,
    Marcin

  • How to retrieve Min(startDate) and Max(endDate) for different groups of data? (sql server 2000)

    My sample dataset (below) contains 3 groups -- 'a', 'b', 'c'.  I need to retrieve the Min(startDate) and Max(EndDate) for each group so that the output looks something like this (date format not an issue):
    fk   minStart       maxEnd
    a    1/13/1985    12/31/2003
    b    2/14/1986    12/31/2003
    c    4/26/1987    12/31/2002
    What is the Tsql to perform this type of operation?  Note:  the actual data resides in a sql server 2000 DB.  If the Tsql is different between version 2000 and the later versions -- I would be grateful for both versions of the Tsql
    --I noticed that multiple lines of Insert values doesn't work in Sql Server 2000 -- this sample is in Sql Server 2008
    create table #tmp2(rowID int Identity(1,1), fk varchar(1), startDate datetime, endDate datetime)
    insert into #tmp2
    values
    ('a', '1/13/1985', '12/31/1999'),
    ('a', '3/17/1992', '12/31/1997'),
    ('a', '4/21/1987', '12/31/2003'),
    ('b', '2/14/1986', '12/31/2003'),
    ('b', '5/30/1993', '12/31/2001'),
    ('b', '6/15/1994', '12/31/2003'),
    ('b', '7/7/2001', '12/31/2003'),
    ('c', '4/26/1987', '12/31/1991'),
    ('c', '8/14/1992', '12/31/1998'),
    ('c', '9/10/1995', '12/31/2002'),
    ('c', '10/9/1996', '12/31/2000')
    Thanks
    Rich P

    Rich
    It is unclear what you are trying to achieve, you said that it is SQL Server 2000 but provide a sample data with SQL Server 2008 syntax
    Is it possible to use UNION ALL for your queries to make its one 
    select * from
    select * from #tmp2 t1 where exists
    (select * from (select top 1 * from #tmp2 t2 where t2.fk = t1.fk order by t2.startdate) x where x.rowID = t1.rowID)
    UNION ALL
    select * from #tmp2 t1 where exists
    (select * from (select top 1 * from #tmp2 t2 where t2.fk = t1.fk order by t2.Enddate desc) x where x.rowID = t1.rowID)
     as  der order by fk
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Can not read Chinese data when DB Connect to SQL server 2000

    Hi,
       Our BW server( BW3.5 not unicode ) is installed on MS SQL server 2000. We try to connect the BW SQL server with db connect function. We create some test views in the Northwind DB. We are be able to access data from source system in rsa1 by db connect. The problem is that all the Chinese characters are displayed as ?????. Is there any special setting for accessing multibyte characters in MS SQL server 2000? Please advise.
    Thank you,
    Jeff

    The field of VIEW in the sqlserver which code is chinese must be the nvarchar.
    You can try it.

  • MS SQL Server 2000

    Is there a an example of a auth / sync web service for tying into a remote MS SQL Server 2000 with PT 5.0.2? Thanks.

    Yeah, I should have made that more clear. I need to import and or authenticate users and groups from an external user repository (an MS SQL Server 2000 database). Is there an example on how to write an authentication provider, and then create a Remote Authentication Source for MS SQL Server 2000? I am running PT 5.0.2. An example in either VB.NET, Java, or C# is acceptible. C# is preferred. Looking at the Auth-HelloWorld-Java.zip example, at what point to I actually write the code to query the database? Within...
    public void authenticate(String username, String password, AuthInfo authinfo) throws ServiceException {  if (username.startsWith(Constants.USERNAME_BASE) && password.startsWith(Constants.USERNAME_BASE))  {   //do nothing- authenticated  } else {   throw new AccessDeniedException();  }
    ...or prior to this? Thanks.
    Thanks.

  • MS SQL server 2000 to 2005 migration

    Hi Experts,
    My application is developed in jdk1.4 and JRUN using MS SQL server 2000.Now I want to upgrade with MS SQL server 2005
    Few questions here:
    1) How can I achieve this ?
    2) Is jdk 1.4 compatible with MS SQL Server 2005 ?
    3) How can I change the driver?
    Thanks
    Harshmeet

    Hi Harshmeet,
    As your application is not SAP, please follow the steps in the link below for upgrade
    how can I upgrade SQL server 2000 to SQL server 2005 sp2 - SQL Server - www.windows-noob.com
    For JDK support refer link below
    using Microsoft SQL Server 2005 JDBC Driver with JDK 1.3 (or JRE 1.3)
    Hope this helps.
    Regards,
    Deepak Kori

  • SQL SERVER 2000 RESTORE STATUS

    Hi
    Is there any query to find the restore percentage on the Database?
    thanks in advance.
    Regards, Pradyothana DP http://www.dbainhouse.blogspot.in/

    If you are still using SQL Server 2000, then you need to quickly check on migrating to later version. Microsoft will no longer be supporting SQL Server 2000.
    Hello,
    I agree with Latheesh's opinion. I strongly recommend you consider upgrading SQL Server 2000 to higher version. Here are some articles for your reference, please see:
    Migration SQL Server 2000 to SQL Server 2012:
    http://blogs.technet.com/b/mdegre/archive/2012/06/15/migration-sql-server-2000-to-sql-server-2012.aspx
    SQL Server Upgrade Advisor: Considerations when upgrading from SQL 2000 to SQL 2012:
    http://blogs.msdn.com/b/mspfe/archive/2012/12/06/sql-server-upgrade-advisor-considerations-when-upgrading-from-sql-2000-to-sql-2012.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • Is the component uiscrollbar for use with text fields only

    Is the component uiscrollbar for use with text fields only?

    Yeah, it isn't in the library, you need to call it up using code.  It is documented in the help files though, so that should help you get it into use.

  • SQL Server 2000 database GETDATE() default for field

    I have a SQL Server 2000 database where the createDate field
    has a default value of GETDATE() and the data type is datetime. It
    is inserting the date just fine, but I do not want to capture the
    time along with the date. I only want the date to be entered. How
    can I accomplish this? Thanks!

    IF you only wanted to store the date, then yes you would use
    that as the column default value.
    createDate datetime default convert(datetime,
    convert(varchar, getDate(), 102), 102)
    However, as paross1 cautioned be sure you understand you will
    only be capturing the date from now on. If you change your mind
    later, and decide you need both the created date and time, you will
    be seriously out of luck. A safer choice might be to keep the date
    and time, and use convert in your queries instead.

  • Problem with Office document structure when exporting in Windows vs full-text indexing in SQL Server

    Post Author: Atarel
    CA Forum: Exporting
    Product: Crystal Report for .Net 2005Version: distributed with VS 2005Patches Applied: hot fix crnet20win32x86_en_chf.zipOperating System(s): Win2000 Pro SP4, WinXP SP2, Win 2003 Server SP1, Win 2003 Server SP2Database(s): SQL Server 2000, SQL Server 2005Error Messages: None
    We are creating reports with Crystal Report for .Net. We both have a Windows and a Web application connecting to our database. The problem occurs only with the Windows application. We create a report and in the dialog that appears, we choose to export the report in MS Word format. Everythinglooks fine because after we save the document, MS Word is able to open and display the document. However, when we decide to add this Word document in the database in a table that has a image column bound to a full-text indexing schema, that document is never indexed. After fiddling around for a few hours, we realized that the Word document produced during the export is not a true Word document but rather a RTF document that was given a ".doc" extension. Is there a way to have a real Word document when exporting in Windows. The problem does not arise in Web because when we export, the report is displayed in Internet Explorer through the Office plugin. The Office plugin knows how to same a real Word document.
    There is also a problem when exporting to Excel in Windows. It does not yield the same structure as in Web. The format of the export in Windows is not compatible with the Office IFilter of SQL Server 2000/2005, therefore the content is not available for search queries.
    Any patches to fix this problem?
    Regards,
    Ian Perreault

    Post Author: Atarel
    CA Forum: Exporting
    Product: Crystal Report for .Net 2005Version: distributed with VS 2005Patches Applied: hot fix crnet20win32x86_en_chf.zipOperating System(s): Win2000 Pro SP4, WinXP SP2, Win 2003 Server SP1, Win 2003 Server SP2Database(s): SQL Server 2000, SQL Server 2005Error Messages: None
    We are creating reports with Crystal Report for .Net. We both have a Windows and a Web application connecting to our database. The problem occurs only with the Windows application. We create a report and in the dialog that appears, we choose to export the report in MS Word format. Everythinglooks fine because after we save the document, MS Word is able to open and display the document. However, when we decide to add this Word document in the database in a table that has a image column bound to a full-text indexing schema, that document is never indexed. After fiddling around for a few hours, we realized that the Word document produced during the export is not a true Word document but rather a RTF document that was given a ".doc" extension. Is there a way to have a real Word document when exporting in Windows. The problem does not arise in Web because when we export, the report is displayed in Internet Explorer through the Office plugin. The Office plugin knows how to same a real Word document.
    There is also a problem when exporting to Excel in Windows. It does not yield the same structure as in Web. The format of the export in Windows is not compatible with the Office IFilter of SQL Server 2000/2005, therefore the content is not available for search queries.
    Any patches to fix this problem?
    Regards,
    Ian Perreault

  • SS2K_SYSLOGINS ORA-01401 using WB for SQL server 2000

    Hi there,
    I've read some threads on this issue on this forum but no solution to be found.
    I noticed that the NAME field on the table SS2K_SYSLOGINS has been declared as varchar2(30) and is reading the SYSLOGINS views column NAME ( as declared sysname 128 ) on SQL server 2000.
    This view (based on tabel sysxtypes) is not only containing SQL-logins but also domain users and domain groups ( like "domainxxx.com\SL-DAFEHV-DB-TorqueSupervisor-Admin"
    These domain name sometimes are far over 30 characters in length !!!
    I download the Migration Workbench ( 10.1.0.4.0 ) and some pluging today ( from http://www.oracle.com/technology/software/tech/migration/workbench/index.html )and I'm running WB 10 and Ora 9.2 both on the same server.
    How to solve this problem.
    Please help me out.
    Guus

    Guus,
    [It was a new bug, I searched the bug database but could not find something relevant]
    We will migrate what we can automate, so if there is more we can automate in future send in the details. Can you send in the database as a testcase?
    I had to alter the SS2K_SYSINDEXES as well and had to set the columns FIRST, ROOT, and FIRTSIAM to allow 'null' !!!That is not logged either, which surprises me.
    There was an assessment tool to give you an idea of the complexity of the migration that was used internally.
    >
    Further more I encoutered some warning ( i will not list them all )
    A) Within SQL server there are other pre-reserved words as within Oracle.I am not clear what you mean, is the parser failing on not handled reserved words like for example XML features?
    B) It cannot handle hops to other databases within/on the same server ( almost the same as using other schema's within Oracle )Consolidation is one of the proposed features of the next release.
    C) It cannot deal with the different authentication setup within SQL server 2000 ( databaselink.database.owner.objectname )Will note for future reference.
    C2 ) Is it possible to capture related objects from different databases ( ora schema's ) when encoutering them during capture ( the master database has been queried during the capturing as well. . . ) ?You just choose which databases you want to capture the workbench does not work out what parts of database b are called by database a. It was hoped there would be better tools for reorganising schemas when you got to oracle i.e. it was hoped it was out of our scope.
    D) It cannot handle;
    temptablesTemptables in stored procedures are mapped to oracle temporary tables, whos structure is permanent but the data can be temporary: for example tied to the session. Unhandled temptables in particular situations are a bug.
    system procedures like sp_executesql / xp_cmdshell / xp_smtp_send_mail / sp_oacreateWhile the functionality exists in oracle emulating xp_ and sp_ functions has not been done.
    function such as NEWID()
    user difined functionsI will note this for further reference.
    calls to the filesystem ( checking / writing to / reading from / deleting files )While the functionality exists in oracle emulating these functions has not been done.
    commandline call ( using xp_cmdshell )
    owner prefixes ( schema call as used by Oracle )I think this is done, if it is not done in some places it is a bug.
    N' parameter prefixes
    and so on , and so on
    Think I better skip trying "Migration Workbench" and look for an other way to handle a migration from SQL server 2000 to Oracle 92.We did provide a service to do this for a fee I am not sure if it is still going. Other tools did not seem substancially better than the workbench.
    >
    My next chalange is to migrate from Informix 7x to Oarcle 9.2 ( Hmmmmm )The workbench also does this, but it is not a single click automatic operation.
    Please tell me [at turloch.otierney at oracle.com] if you find other products that are better. What they do better, oracle can do better next time.
    It is probably not a good idea to post this information publically on this Oracle forum.
    I apologise that your expectations were not met at this time.
    Turloch
    Message was edited by:
    totierne

  • Creation of DB Adaptert for calling stored procedure in MS SQL server

    Hi,
    I need to create a DB adapter to call a stored procedure in MS SQL Server.
    I have gone thru the thread MS SQL Server database connection
    It mentions that we need to use a command line utility for generating the wsdl and xsd for calling stored procedures in MS SQL server. Please provide information where to find this utility and how to use it.
    Any links to tutorials are welcome.
    Thanks !!.
    Silas.

    Command line is required for stored procedures, if you are using the basic options you don't need to worry.
    (1) Download MS SQL Server 2005 JDBC Driver from Microsoft Site. http://msdn.microsoft.com/en-us/data/aa937724.aspx
    (2) The download is self extracting exe file. Extract this into Program Files on your machine. It should create folder as "Microsoft SQL Server 2005 JDBC Driver"
    (3) In above mentioned folder search for sqljdbc.jar copy this file into JDeveloper\JDBC\lib folder.
    (4) Open JDeveloper/jdev/bin/jdev.conf file add following entry.
    AddJavaLibPath C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib
    While executing this step make sure that your JDeveloper is closed.
    (5) On command prompt go to J Developer folder and execute following command
    jdev -verbose
    This will open JDeveloper.
    (6) Now go to JDeveloper > Connections > Database Connections > New Database Connection
    (7) Select Third Party JDBC
    (8) Specify MS Sql Server User Name, password and Role.
    (9) In connection page specify following
    - Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    - For class path browse to C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib folder, select sqljdbc.jar add it as library.
    - Specify URL as following.
    jdbc:sqlserver://SERVERNAME:1433;databaseName=MSSQLDBNAME;
    (10) Go to Test page and test it.
    cheers
    James

  • Which Driver for MS SQL-Server 2000

    Hello,
    i need to access a MS SQL-Server 2000 and want to ask which driver you think is the best one for this problem.
    I am not a big fan of using beta-Software, and i do not need the newest state-of-the-art features. Right now i also do not need Connection-Pooling.
    Only a few SQL SELECT/UPDATE-Statements nothing more.
    But maybe in not far away future, Conn-Pooling and Procedure-Calls could be interesting. And i think Type 3 or 4 would be the best decision.
    The Software will run on NT, but i do not want to use the JDBC/ODBC-Bridge, because it is so unbelievable slow.
    I am interested in WHICH DRIVER you USE, AND especially which drivers you DO NOT USE ANYMORE, and why.
    It would be great, if anyone could help me, finding the best solution.
    P.S.: The price of the driver: It would be good, when it is for free. But if you know a good commercial driver i am also interested in.
    P.P.S: Yes, i have searched for drivers under http://servlet.java.sun.com/products/jdbc/drivers. But there are 37 different Type 3/4 drivers.

    You can try the jtds project .Search for it in www.sourceforge.net. It is derived from FreeTDS JDBC driver. Both of them are Type 4 JDBC drivers. So far I have tried both of them a few years ago. And jtds is more updated (during those time, not sure what the status is right now)
    Or, you can get Microsofts own JDBC driver

  • DTS Import of MDB in SQL Server 2000 Drops Memo Field Data

    I have used DTS in SQL Server 2000 to import an MDB filed (MS ACCESS) of a table.  When the table is imported the primary key is lost and the memo field data is completely gone. 
    I use the tranformation option in the DTS wizard to add the primary key and make sure the data type for the memo field is varchar and has a size of 8000.  I need that large size since I am storing lots of html code. 
    When I preview the data I see the html code that is supposed to get imported.  However, when I return all rows from the table in Enterprise Manager the field is empty.
    So I tried to manually copy the data from the MS Access Database into SQL Server.  Could not figure out if SQL Server has an interface like MS Access to simply copy data into a table.  So I linked to the tables from MS Access to the SQL Server table. 
    When I opened the linked table I see the data in the description field.  However, if I return the rows from within SQL Server no data is present.
    I have some ASP code trying to read the data in the SQL Server table.  However, nothing is returned and when I run the SQL Statement, nothing gets returned.  The SQL statement returns all rows.  All the other data is present but nothing in the description field. 
    What am I doing wrong?  Any suggestions anyone, please!
    TIA 

    It is important to know the version of MS Access. I will recomend you to use nvarchar datatype instead of varchar. May be the description field contain unicode characters.
    Refer this link to understand more on datatype mapping between access source and sql server destionation.
    http://blogs.msdn.com/b/ssma/archive/2011/03/06/access-to-sql-server-migration-understanding-data-type-conversions.aspx?Redirected=true
    Regards, RSingh

Maybe you are looking for

  • PI 7.0: recursive structure can not be mapping to a flat structure

    I use PI 7.0 ,the source structure is like this: <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">              <wsdl:types>           <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">                     <xsd:complexType xmlns

  • Problem with an extended business object

    Dear experts,               I am extending a standard business object for sales BUS2032, with the name ZBUS2032.  To the new bus ( ZBUS2032 ) I have added a new method by assigning a custom function module developed by me for a requirement. I have re

  • File error - FORMAT TOO NEW

    I am very stuck at the moment. I am helping a uni student with a project in edits and this " "File's format is too new for this version of the application" message comes up but I have made sure the FCP versions were the same and they are. I have FCP

  • Paravirtualized Guest Machine from an OEL 6 GA Install Media iso?

    Is it possible to create a paravirtualized guest from an Oracle Linux 6 GA iso?l I would prefer a jeos image but I have not been able to find one. I have tried this using the vm server as the nfs server with no success. vm server 2.20 cp oel6.iso /OV

  • ESR: Message mapping tab is missing for my user id.

    Friends, I am not able to see Message mapping tab in ESR under namespace. This issue is only with my user id. Can you suggest if some roles required , or I can contact Basis guys for this. Thanks, Divyesh