Extend Search Function

Mar 6, 2007

Hello
In my website I have a textbox to search some products, but it would like to extend my search-function so that it could find special characters.

For example:
When I search Mexico, I would like to find México.
Is there an easy way to do this?

Thanks in Advance
Wesley

View 1 Replies


ADVERTISEMENT

Is It Possible To Extend SQL-TRANSACT With User-defined Function

Jun 20, 2000

View 3 Replies View Related

Extend GetUserID Function Or Create Additional Custom Information Funcitons

Jan 25, 2008

Hi there

I'm relatively new to Reporting Services and .Net development so bear with me if I've missed something obvious.
I've set up Reporting Services to run under forms authentication successfully.
I want to filter the data (both within Report Builder Models and .rdl files) to the company the user belongs to.

To avoid joining the users table to all other tables on the companyID I'm wondering if it's possible to create a custom funciton which could use the UserID to lookup the companyID and then pass this through as a parameter, and have this "GetCompanyID" function available when building Models and/or reports...???

When building a model the Information Functions available are GETUSERID and GETUSERCULTURE. Is it possible to modify how these work and/or create additional functions here???


Thanks in advance for your help.

Cheers,
Todd.

View 3 Replies View Related

Search Function

Apr 4, 2007

I am trying to write a used car search function I want the user to be able to select a MAKE from the 1st drop down list and a MODEL from the second drop down list and click a button and for the data to be shown in a gridview, the code below is what I have so far and works i.e when user selects a make it shows all cars for that make, but now how do I take it further and add the model on there so that when the user selects i.e BMW as make and Z3 for model it only shows all BMW Z3'S
 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>">
</asp:SqlDataSource>
<br />
<asp:DropDownList ID="ddmake" runat="server" DataSourceID="SqlDataSource2" DataTextField="make"
DataValueField="make" AutoPostBack="True">
</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [make] FROM [used]"></asp:SqlDataSource>
&nbsp;&nbsp;</div>
<asp:button id="button1" runat="server" text="search"/>
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">
</asp:GridView>
&nbsp;
</form>
</body>
</html>
 
Here is the code behind the page
Protected Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
SqlDataSource1.SelectCommand = "select * from [used] where make like '%" & ddmake.Text & "%'"
SqlDataSource1.DataBind()
End Sub

View 26 Replies View Related

Search Function

Nov 28, 2007

We are in the process of developing an onlinestore like www.componentsource.com.We need to search for a product within our website.We already created pages using html.I have to take the 1st para of the product description and display. I don't want to save the description in the table how to do it? 

View 1 Replies View Related

Search Function

Nov 6, 2007

Hi all I have a search function in one of my database's that when you click on the command button it window comes up that ask you for the last name. What I would like to do is alter it so that users can type in SM and get all the names that start with SM or Ma?? Like a Starts with. How can I do that
= N'[@Enter_LastName].[dbo.Revocatiions] ALike [ta%]'


CREATE FUNCTION dbo.Revocations
(@Enter_LastName nvarchar(50))
RETURNS TABLE
AS
RETURN ( SELECT [SSN], [TM#], FirstName, LastName, ReasonofRevocation, Notes, [I/R #], Date
FROM dbo.Revocations_Tbl
WHERE (LastName = @Enter_LastName))

View 14 Replies View Related

Search Function

Nov 7, 2006

Hi All,

Here's my problem:

I create titles and submit them for approval. Once approved I can edit them again and either save them or submit them for approval again.

My problem is:
When I am creating a title and saving it in the drafts and searching for the title, I am able to find it in the result page. This is before approval.
When I submit the same title for approval and it's approved and then I change the title and save it as draft and then search the new title I cant find it. But when I search with the old title it shows me the result but with the new title name.

When I check the db and search for the new title no records found.
When I check the db and search for the old title the system returns me the record with the same old name.

So when I search the old title in the db it returns the old title.
So when I search the application for the new title it returns the old title.

Help Appreciated!

Using SQL Server 2005

View 11 Replies View Related

How To Implement Search Function

Feb 1, 2007

I have a table search the record. The user can search by name, id, status, address and other information.I want to make the search function more robust. For example, when the database has a record with name = "Michael Jackson", either typing any subset of the name will show this record.I would like to know if there is any easy way to implement this with VS2005 and SQL2005 Express.Thank you 

View 3 Replies View Related

Help Me Write A Search Function Please

Jun 8, 2007

Hi all,I'm very new to ASP.NET stuffs, I'm trying to write a Search function for my website... I have two text boxes, one if called "SongTitle" and the other is "Artist"... Now I need to populate the GridView to display the result, based on the input of the textbox... So if only the "SongTitle" have input, it will search for the Song Titles on the database... if the Artist is searched, then it will return the artist... If both text boxes have value in them, then it need to check for both fields in the database and return the correct item... For the "Artist", I have 2 columns in the Database (originalArtist and performer), so for the Artist select statement, it need to check both columns on the table, if any of them match then it will return the item. Any help would be greatly appreciated,Thank you all,Kenny. 

View 15 Replies View Related

Search Function Problem

Sep 10, 2007

Hi, I am using the following sql for search function:
Select * From TableABC Where condition LIKE '%xyz%'
However, it does not provide good results, some results is not accurate, I would like to ask, is it any better mechanism for searching?
Please advise. Thanks~
James

View 2 Replies View Related

How To Search Using PATINDEX Function...Plz Help

Feb 11, 2007

Hi,

How to search the last occurance of one String in to another string..Using function PATINDEX() in a column of data type Text..

plz Give some solution i really need it ...



Thanks Yogesh

View 7 Replies View Related

SQL Search String Function

Jun 2, 2008

The 'LIKE' function looks for words that start with whatever is in the like condition. Is there an sql function similar but will look and compare at any part of the search string.

For example I am using a webservice in dot net to populate a dropdown list using this sql

SELECT compound_name FROM dbo.compound_name WHERE compound_name like @prefixText

In this table there is a compound called SILCAP310 and I would like the search function to pick up 310 if I put this into the @prefix parameter. (but I would still like the search to perform like the 'LIKE' does also.

SELECT compound_name FROM dbo.compound_name WHERE compound_name like @prefixText or compound_name SearchPartString @prefixText

Thanks in advance

View 4 Replies View Related

Function To Search For Characters

May 5, 2008

Hi All

Is there a function to search for characters in the string simlilar to the IndexOf function is C#.net?

I need answers urgently.

View 3 Replies View Related

How Can I Search All My Sprocs To See If Any Use A Function?

May 6, 2008

Anyone have the code that would allow me to see if any of my sprocs contain references to a function? I imagine it would someting like select name from sysobjecst where charindex(whatevertextis, 'ufnName') > 0

Thanks

View 5 Replies View Related

URGENT!!! Search Function Database Problem!

Jan 23, 2008

Hi all,
I have a search function in my website, which is fully functionable.
But currently, this is the issue that I am having problem with.
For example:
I have only the name 'John' in my database.
When the user search for 'John Tan', no results is shown as there was no such name in the database
But if this happens, I want 'John' to be always returned and shown, no matter what 'John' the user search - E.g "john tan", John Loh", john wee"
So, how do I go about doing this? I have done some research on how to go about doing it, what I found useful was the .Replace() function. However, I can never predict in advance what user is going to key in.
Any help is welcome as this is a rather pressing problem of mine. Thanks for all the help in advance!!!

View 21 Replies View Related

URGENT!!! Search Tool Function: Splitting A String

Jan 14, 2008

Hi All!!!
I was tasked to come up with a search function and the content of the database given to me is in Chinese Characters. This would be my first time dealing with Chinese characters in the database and I need help with the following problem:
The company wants to conduct the search in such a way that, instead of having the system read the entire sentence/phrase which the user keyed in as a SINGLE string, they want the Chinese Characters to be accessed individually, so that as long as any information in the database contains any one of the characters which the user have entered, they will be retrieved and returned.
So how do I go about doing this? Does it have anything to do with Unicode? By the way, everything abt the search tool is working fine, I am just left with this dilemma of having the system recognise the entire sentence as ONE STRING, instead of conducting a search word by word or character by character.
Anyway, the following is the SQL statement of my SQL Data Source which is bound to a Gridview displaying the returned results after a search is done...1 SELECT Name, Trans, Address1, Address1T, Address2, Address2T, City, CityT, CRPLID
2 FROM CRPL
3 WHERE (Trans LIKE '%' + @Trans + '%') OR
4 (Name LIKE '%' + @Name + '%') OR
5 (Address1 LIKE '%' + @Address1 + '%') OR
6 (Address1T LIKE '%' + @Address1T + '%') OR
7 (Address2 LIKE '%' + @Address2 + '%') OR
8 (Address2T LIKE '%' + @Address2T + '%') OR
9 (City LIKE '%' + @City + '%') OR
10 (CityT LIKE '%' + @CityT + '%')

 
Thanks for all your help in advance!!!

View 6 Replies View Related

Built In Function To Search The Occurence Of Char In String

Jan 10, 2008



Hi Everyone-
i woder if someone know Built in function to search the occurence of char in string in T-SQL

and iam not talking about the Index of the first occurence (e.g CHARINDEX )
but it is more generic

i want to send to the function to ask about the index the second or the third or N occurence of the char.
and i wonder if it is built in for performance reasons

example
getseachIndex("M|d|d","|",2)==> the result is 4

View 3 Replies View Related

Simple Function For Returning A Character Based On Search Criteria..

Feb 20, 2007

Hi,how do I do a simple formula, which will search a field for specialcharacters and return a value.If it finds "%" - it returns 1elseIf it finds "?" it returns 2endIf this is the incorrect newsgroups, please direct me to the correct oneregards Jorgen

View 2 Replies View Related

How Do I Extend The Size Of A Database?

Oct 4, 2007

I have a database that is in production. It is almost full. How would I go about extending the size of it? Would it involve an outage?

View 4 Replies View Related

Transaction Log Failed To Auto Extend

Sep 6, 2001

Hi

Had a weird error yesterday, can anybody shed any light on it.

I got the following error in a SQL 7(sp2) database.
'The log file for database 'IT2PROD' is full. Back up the transaction log for the database to free up some log space..
Error: 9002, Severity: 17, State: 2'

The Transaction Log has unrestricted file growth and auto grow file set and the disk has over 20gb of free space.

The only explanation I can think of is that the Log tried to extend during the hourly backup. Would this cause the above error ??? The backup file is usually about 80mb but was over 300mb when this happened.

Any ideas ????

Thanks in advance

Gary

View 4 Replies View Related

Is It Possible To &#34;extend&#34; Role/user Rights Using SP...

Jun 8, 2001

Hi All,

I'm rather new to the MS SQL Server development in general and especially to its data security architecture and features - I'd like to know if it is possible for end-user to retrieve/update(!?) the data using a SP which executes on a table for which she/he doesn't have any privileges.

TIA,
Shamil

View 4 Replies View Related

T-SQL (SS2K8) :: Extend Script For Dependencies?

Jul 8, 2015

I found this script for dependencies and want to extend it:

I want to add the obj_typ (U, FN, P, V, TR...) for the dependency

How can I do this?

Here is the script:

WITH DepTree (referenced_id, referenced_name, referencing_id, referencing_name, NestLevel, obj_type )
AS
(
SELECT
o.[object_id] AS referenced_id ,
o.name AS referenced_name,

[Code] ...

View 3 Replies View Related

Extend Alter Procedure Command

Jun 27, 2007

Is there any way to extend the Alter Procedure command or fire somekind of event when it is executed in SQL Server 2005?

Thanks,

David

View 9 Replies View Related

Extend Existing Report Items

Jun 6, 2007

Hi,

I'm totally new to SSRS2005 and I was wondering if I could extend the existing report items. For instance, I'd like to add a few extra properties to the textbox report item. I tried wrting a custom Textbox control that inherits from System.Windows.Forms.Textbox. When I imported the dll in VS, the new textbox showed up in the toolbox, but it was grayed out.

Any idea what I'm missing here?

Thanks,
Phil

View 3 Replies View Related

Conditionally Extend Query With Clauses

Jan 14, 2008

Howdy folks, first time poster.

In a UDF, how is the best way to extend a query with additional clauses based on expressions? The user input here is used to refine the basic query by introducing additional clauses. Is there something like the following?


-- The basic query
SELECT column
FROM table
WHERE clause

-- Additional clause, only appended to query
-- if expression evaluates to true
IF @parameter <> default_value
BEGIN
AND additional_clause
END


Right now I'm using CASE like the following, but it necessarily makes the query longer. Is there a more efficient way?


-- The basic query

SELECT column
FROM table
WHERE clause

-- Additional clause, should only effect result
-- set when the parameter is not default_value
AND table.column =
CASE @parameter
WHEN default_value THEN
-- identity, table.column=table.column,
-- should have no effect other than just a long query
table.column
ELSE
@parameter
END

View 8 Replies View Related

How Do You Extend The Expression Langauage With New Functions?

Jun 2, 2006

Hi,

I have a number of functions which I'd like to be able to add to the expression language to avoid having to use numerous script components, but I can't find any information on how this is possible. Can anyone provide any advice, please?

Thanks in advance,
Lawrie

View 1 Replies View Related

Could Not Find Enough Space On Disks To Extend Database

Mar 2, 2005

Hello,

I am managing a sqlserver 6.5 database in my company. I get the message that the datafiles should be expanded but whenever I try to expand it the following message appears:

Could not find enough space on disks to extend the database. Meanwhile, I have about 6 gigabytes free space on my disks. Please help me out.
Thanks,

Albert

View 2 Replies View Related

DB Design :: Steps To Extend Table Partitions

Jun 1, 2015

SQL 2014 I've inherited a db that has several partitioned tables.  They are partitioned by month.  We're approaching the last partition, 11-30-2015, so we need to extend the tables.  My question is how do I do this?  There are Partition Schemes and Partition Functions setup at the db level.  I've figured out how to ALTER those.  Next I go to a table that I know is partitioned, right-click Storage and select Manage Partitions. 

My only option is to "create a staging table for partition switching".  Not knowing what switching is, I'm not sure if this is what I want to do.  All I want to do is add new partitions to the table - and remove some of the old ones since they are empty due to archiving of data.

So, what is the proper steps to adding new partitions to a table that is already partitioned?

View 4 Replies View Related

How To Setup Table Boarder Extend To The End Of Page?

Nov 7, 2007

Hi all,


Does anyone know how to setup the "table details" to take up all the space in a page (extend the boarder to the end of the page) even there is only one record in the table details?

Normally, for example, if you got a table in a report, if the table has only one record, the boarder of table will only take up maybe 1/4 of the page space (header, 1 line details, footer). if the table has 5 records, it may take up half of the page, but the boarder of table neven extend to the end of the report and i wwant it happen!!!!!!! Thank you.

Cheers,
Bryan

View 8 Replies View Related

How Can I Extend The Number Of Characters In MS SQL For Text Entry?

Oct 27, 2006

Using MS Access as a front end and SQL as a back end how can i get past the 4000 character limmit per table?

View 9 Replies View Related

SQL 2000 MS Search: Boolean Search Doesn't Work When Search By Phrase

Aug 9, 2006

I'm just wonder if this is a bug in MS Search or am I doing something wrong.

I have a query below

declare @search_clause varchar(255)

set @Search_Clause = ' "hepatitis b" and "hepatocellular carcinoma"'

select * from results

where contains(finding,@search_clause)

I don't get the correct result at all.

If I change my search_clause to "hepatitis" and "hepatocellular carcinoma -- without the "b"

then i get the correct result.

It seems MS Search doesn't like the phrase contain one letter or some sort or is it a know bug?

Anyone know?

Thanks

View 3 Replies View Related

Transact SQL :: Updating Table Rows With Overlapping Dates (extend)

Dec 2, 2015

This question is extension from the topic Updating table Rows with overlapping dates: [URL] .....

I am actually having a table as following:

Table Name: PromotionList

Note that the NULL in endDate means no end date or infinite end date.

ID PromotionID StartDate EndDate Flag
1 1 2015-04-05 2015-05-28 0
2 1 2015-04-23 NULL 0
3 2 2015-03-03 2015-05-04 0
4 1 2015-04-23 2015-05-29 0
5 1 2015-01-01 2015-02-02 0

And I would like to produce the following outcome to the same table (using update statement): As what you all observe, it merge all overlapping dates based on same promotion ID by taking the minimum start date and maximum end date. Only the first row of overlapping date is updated to the desired value and the flag value change to 1. For other overlapping value, it will be set to NULL and the flag becomes 2.

Flag = 1, success merge row. Flag = 2, fail row

ID PromotionID StartDate EndDate Flag
1 1 2015-04-05 NULL 1
2 1 NULL NULL 2
3 2 2015-03-03 2015-05-04 1
4 1 NULL NULL 2
5 1 2015-01-01 2015-02-02 1

The second part that I would like to acheive is based on the first table as well. However, this time I would like to merge the date which results in the minimum start date and End Date of the last overlapping rows. Since the End date of the last overlapping rows of promotion ID 1 is row with ID 4 with End Date 2015-05-29, the table will result as follow after update.

ID PromotionID StartDate EndDate Flag
1 1 2015-04-05 2015-05-29 1
2 1 NULL NULL 2
3 2 2015-03-03 2015-05-04 1
4 1 NULL NULL 2
5 1 2015-01-01 2015-02-02 1

Note that above is just sample Data. Actual data might contain thousands of records and hopefully it can be done in single update statement.

Extending from the above question, now two extra columns has been added to the table, which is ShouldDelete and PromotionCategoryID respectively.

Original table:

ID PromotionID StartDate EndDate Flag ShouldDelete PromotionCategoryID
1 1 2015-04-05 2015-05-28 0 Y 1
2 1 2015-04-23 2015-05-29 0 NULL NULL
3 2 2015-03-03 2015-05-04 0 N NULL
4 1 2015-04-23 NULL 0 Y 1
5 1 2015-01-01 2015-02-02 0 NULL NULL

Should Delete can take Y, N and NULL
PromotionCategoryID can take any integer and NULL

Now it should be partition according with promotionid, shoulddelete and promotioncategoryID (these 3 should be same).

By taking the min date and max date of the same group, the following table should be achieve after the table is updated.

Final outcome:

ID PromotionID StartDate EndDate Flag ShouldDelete PromotionCategoryID
1 1 2015-04-05 NULL 1 Y 1
2 1 2015-04-23 2015-05-29 1 NULL NULL
3 2 2015-03-03 2015-05-04 1 N NULL
4 1 NULL NULL 2 Y 1
5 1 2015-01-01 2015-02-02 1 NULL NULL

View 2 Replies View Related

Unable To Extend Temp Segment By 64 In Tablespace TEMP (SSIS Error While Copying Data From Oracle)

Oct 22, 2007

I am transferring data from oracle and getting below error message.

I using 4 data flow tasks with in a single control flow and all the 4 tasks quueries same table but populates data in to different sql tables based on the where contidion

[OLE DB Source 1 [853]] Error: An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "ORA-01652: unable to extend temp segment by 64 in tablespace TEMP ".

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved