Tag Cloud Tag Search
Apr 14, 2008
--set ANSI_NULLS ON
--set QUOTED_IDENTIFIER ON
--go
--
--
--ALTER PROC [dbo].[spEventTagCloud]
--as
--BEGIN
DECLARE @RECORDCOUNT INT;
DECLARE @SearchString varchar(2000);
DECLARE @QRY VARCHAR(2000);
DECLARE @SE VARCHAR(2000);
SELECT @RECORDCOUNT=COUNT(*) FROM TBEVENTS
DECLARE @ST INT;
SET @ST=1;
CREATE TABLE #TEMP2
(
MYTAGS VARCHAR(2000)
)
--CREATE TABLE #TEMP3
--(
-- TAGCOUNT INT
--)
CREATE TABLE #TEMP1
(
STR1 VARCHAR(2000)
)
WHILE @ST<@RECORDCOUNT
BEGIN
SET @QRY='SELECT TOP ' +CONVERT(VARCHAR,@ST)+' EVENTTAG FROM TBEVENTS'
--PRINT @QRY
INSERT INTO #TEMP1 EXEC (@QRY)
SELECT @SEARCHSTRING=STR1 FROM #TEMP1
SET @ST=@ST+1
declare @i1 int;
declare @i2 int;
declare @MatchType int ;
set @MatchType=0;
declare @Word varchar(100);
declare @Words table (Word varchar(100) not null);
declare @WordCount as integer;
DECLARE @TEMPWORD VARCHAR(2000);
begin
set nocount on
if (@MatchType != 2)
begin
set @SearchString = ' ' + @SearchString + ',';
--print 'Search String is :::: '+ @SearchString
set @i1 = 1;
while (@i1 != 0)
begin
set @i2=charindex(',', @SearchString, @i1+1)
--print @i1
if (@i2 != 0)
begin
set @Word = rtrim(ltrim(substring(@SearchString, @i1+1, @i2-@i1)))
SET @TEMPWORD=@WORD;
SET @TEMPWORD=REPLACE(@TEMPWORD,',','')
INSERT INTO #TEMP2 SELECT @TEMPWORD
--print 'Search WORD is :::: '+ @WORD
if @Word != '' insert into @Words select replace(@Word,',','')
end
set @i1 = @i2
end
end
else
insert into @Words select ltrim(rtrim(@SearchString))
set @WordCount = (select count(*) from @Words)
Declare @wordtemp varchar(2000);
set @wordtemp=@word
set @wordtemp=replace(@word,',','')
--INSERT INTO #TEMP2 SELECT @WORDtemp
END
END
SELECT mytags'Tag' , count(mytags)'Count' FROM #TEMP2 group by mytags ORDER BY [COUNT] DESC
--SELECT * FROM #TEMP1
DROP TABLE #TEMP1
DROP TABLE #TEMP2
--DROP TABLE #TEMP3
--END
________________________________
THE ABOVE EXAMPLE FOR A TAG CLOUD
MY TAGS ARE AS FOLLOW
EVENTTAG
_________
ASP.NET, C#, VB.NET
WELCOME TO ASP.NET
ASP.NET BOOKS,C#.NET BOOKS
I WOULD LIKE TO SELECT ALL COLUMNS FROM MY TABLE SEARCH TAG IS ASP.NET
THE FOLLOWING CODE WILL GENERATE AND SPLIT IT AS
TAG
____
ASP.NET
c#
VB.NET
WELCOME TO ASP.NET
ASP.NET BOOKS
C#.NET BOOKS
HOW TO SEARCH AN EXACT MATCH AS ASP.NET THE ONLY ONE ROW
View 2 Replies
ADVERTISEMENT
Apr 14, 2008
--set ANSI_NULLS ON
--set QUOTED_IDENTIFIER ON
--go
--
--
--ALTER PROC [dbo].[spEventTagCloud]
--as
--BEGIN
DECLARE @RECORDCOUNT INT;
DECLARE @SearchString varchar(2000);
DECLARE @QRY VARCHAR(2000);
DECLARE @SE VARCHAR(2000);
SELECT @RECORDCOUNT=COUNT(*) FROM TBEVENTS
DECLARE @ST INT;
SET @ST=1;
CREATE TABLE #TEMP2
(
MYTAGS VARCHAR(2000)
)
--CREATE TABLE #TEMP3
--(
-- TAGCOUNT INT
--)
CREATE TABLE #TEMP1
(
STR1 VARCHAR(2000)
)
WHILE @ST<@RECORDCOUNT
BEGIN
SET @QRY='SELECT TOP ' +CONVERT(VARCHAR,@ST)+' EVENTTAG FROM TBEVENTS'
--PRINT @QRY
INSERT INTO #TEMP1 EXEC (@QRY)
SELECT @SEARCHSTRING=STR1 FROM #TEMP1
SET @ST=@ST+1
declare @i1 int;
declare @i2 int;
declare @MatchType int ;
set @MatchType=0;
declare @Word varchar(100);
declare @Words table (Word varchar(100) not null);
declare @WordCount as integer;
DECLARE @TEMPWORD VARCHAR(2000);
begin
set nocount on
if (@MatchType != 2)
begin
set @SearchString = ' ' + @SearchString + ',';
--print 'Search String is :::: '+ @SearchString
set @i1 = 1;
while (@i1 != 0)
begin
set @i2=charindex(',', @SearchString, @i1+1)
--print @i1
if (@i2 != 0)
begin
set @Word = rtrim(ltrim(substring(@SearchString, @i1+1, @i2-@i1)))
SET @TEMPWORD=@WORD;
SET @TEMPWORD=REPLACE(@TEMPWORD,',','')
INSERT INTO #TEMP2 SELECT @TEMPWORD
--print 'Search WORD is :::: '+ @WORD
if @Word != '' insert into @Words select replace(@Word,',','')
end
set @i1 = @i2
end
end
else
insert into @Words select ltrim(rtrim(@SearchString))
set @WordCount = (select count(*) from @Words)
Declare @wordtemp varchar(2000);
set @wordtemp=@word
set @wordtemp=replace(@word,',','')
--INSERT INTO #TEMP2 SELECT @WORDtemp
END
END
SELECT mytags'Tag' , count(mytags)'Count' FROM #TEMP2 group by mytags ORDER BY [COUNT] DESC
--SELECT * FROM #TEMP1
DROP TABLE #TEMP1
DROP TABLE #TEMP2
--DROP TABLE #TEMP3
--END
________________________________
THE ABOVE EXAMPLE FOR A TAG CLOUD
MY TAGS ARE AS FOLLOW
EVENTTAG
_________
ASP.NET, C#, VB.NET
WELCOME TO ASP.NET
ASP.NET BOOKS,C#.NET BOOKS
I WOULD LIKE TO SELECT ALL COLUMNS FROM MY TABLE SEARCH TAG IS ASP.NET
THE FOLLOWING CODE WILL GENERATE AND SPLIT IT AS
TAG
____
ASP.NET
c#
VB.NET
WELCOME TO ASP.NET
ASP.NET BOOKS
C#.NET BOOKS
HOW TO SEARCH AN EXACT MATCH AS ASP.NET THE ONLY ONE ROW
View 3 Replies
View Related
May 12, 2008
I've read some articles on generating tag clouds but so far only one actually showed a query. And the query was on a simple database with a few tags. In our database we have records that can have literally hundreds of unique tags. So, I'm wondering how to get a realistic result set of the top tags? I can't just do a group by and select the top 30 or 50 because that won't necessarily get me through the alphabet. I'd like to at least have as many letters from the alphabet in the tags as possible like (ant, cat, dog, horse, lion, seal, zebra) but if I do the top 30 it may cut off around the letter "c". Know what I mean? So, how can I generate an accurate tag cloud query that uses all available letters from the alphabet as starting letters for the tags? Thanks.
View 5 Replies
View Related
May 28, 2014
i know how centralized database works ,In a centralized system, I'll store it on one server. Then, I'll replicate that exact information to Server #2 for safekeeping.All the data's will be placed on root server,but i don't know diff between cloud and centralized database how they are working together.....
View 1 Replies
View Related
Sep 25, 2007
It is clear to me that in order to be able to use certain SSIS components (for example the Excel jet provider) I must launch my packages using the 32bit DTEXEC located at Program Files (x86)Microsoft SQL Server90DTSBinn. However, when I do this it seems that there are other components of the package that no longer work as expected.
To test this I have created a simple package with two tasks (Run64BitRuntime is set to False):
1. Data flow task importing data from Excel
2. Execute SQL Task which does a simple select (select 1) from a Native OLE DB SQL data source (same SQL Server on which packages are stored). This task contains no input or output parameter.
When I try to execute the package using the 64bit DTEXEC, task 1 fails with the following error (as expected):
Code: 0xC0202009
Source: connection1 Connection manager "SourceConnectionExcel"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154.
An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
When I execute the package with the 32bit DTEXEC, task 2 fails with the following error
Code: 0xC002F210
Source: Execute SQL Task Execute SQL Task
Description: Executing the query "" failed with the following error: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Now here is the confusing part: When I change task 2 to use the .Net provider instead of the OLE DB the package works fine. According to the MS documentation, both of these providers are supported on 32 and 64 bit so am I missing something? One more thing to note: before I was able to use the 32 bit DTEXEC I had to re-register it as described in this KB article: http://support.microsoft.com/kb/919224
View 5 Replies
View Related
Feb 28, 2015
what is the maximum size of a DB hosted on SQL 2012 cloud environment?
View 3 Replies
View Related
Jul 3, 2015
I have created a word cloud in SSRS 2008 using Jason Thomas's method but I would like to be able to add an action to click on a word to go to a another report using either the word or an ID integer. how to add an action to go to another report?
View 5 Replies
View Related
May 20, 2015
Is there a way using a stored procedure in a local database to add a record to a database executing in a cloud environment when both entities reside in different domains?
View 2 Replies
View Related
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
Mar 29, 2008
Hi - I'm short of SQL experience and hacking my way through creating a simple search feature for a personal project. I would be very grateful if anyone could help me out with writing a stored procedure. Problem: I have two tables with three columns indexed for full-text search. So far I have been able to successfully execute the following query returning matching row ids: dbo.Search_Articles @searchText varchar(150) AS SELECT ArticleID FROM articles WHERE CONTAINS(Description, @searchText) OR CONTAINS(Title, @searchText) UNION SELECT ArticleID FROM article_pages WHERE CONTAINS(Text, @searchText); RETURN This returns the ArticleID for any articles or article_pages records where there is a text match. I ultimately need the stored procedure to return all columns from the articles table for matches and not just the StoryID. Seems like maybe I should try using some kind of JOIN on the result of the UNION above and the articles table? But I have so far been unable to figure out how to do this as I can't seem to declare a name for the result table of the UNION above. Perhaps there is another more eloquent solution? Thanks! Peter
View 3 Replies
View Related
Jul 21, 2015
Our clients want to be able to do full text search with a single letter. (Is the name Newton, Nathan, Nick?, Is the ID N1, N2...). Doing a single character full text search on a table work 25 out of 26 times. The letter that doesn't work is 'n'. the WHERE clause CONTAINS(full_text_field, ' "n*" ') returns all rows, even rows that have no 'n' in them anywhere. Adding a second letter after the "n" works as expected.
Here is an example
create table TestFullTextSearch (
Id int not null,
AllText nvarchar(400)
)
create unique index test_tfts on TestFullTextSearch(Id);
create fulltext catalog ftcat_tfts;
[Code] ....
View 4 Replies
View Related
Nov 6, 2014
I have a scenario of where the standard Full-Text search identifies keywords but Semantic Search does not recognize them as keywords. I'm hoping to understand why Semantic Search might not recognize them. The context this is being used in medical terminology and the specific key words I noticed missing right off the bat were medications.
For instance, if I put the following string into a FT indexed table
'J9355 - Trastuzumab (Herceptin)'
AND
'J9355 - Trastuzumab emtansine'
The Semantic Search recognized 'Herceptin' and 'Emtansine' but not 'Trastuzumab'
Nor in
'J8999 - Everolimus (Afinitor)'
It did not recognize 'Afinitor' as a keyword.
In all cases the Base of Full-Text did find those keywords and were identifiable using the dmvsys.dm_fts_index_keywords_by_document.It does show the index as having completed.
why certain words might not be picked up while others would be? Could it be a language/dictionary issue? I am using English and accent insensitive settings?
View 0 Replies
View Related
Jul 24, 2007
would you use sql server "full text search" feature as your site index? from some reason i can't make index server my site search catalog, and i wonder if the full text is the solution. i think that i wll have to you create new table called some thing like "site text" and i will need to write every text twice- one the the table (let's say "articles table") and one to the text. other wise- there is problems finding the right urlof the text, searching different tables with different columns name and so on...
so i thought create site search table, with the columns:
id, text, url
and to write every thing to this table.
but some how ot look the wrong way, that every forum post, every article, album picture or joke will insert twice to the sqr server...
what do you think?
View 1 Replies
View Related
Mar 30, 2013
I have installed the Adobe iFilter 11 64 bit and set the path to the bin folder. I still cannot find any text from the pdf files. I suspect I am missing something trivial because I don't find much when I Bing for this so it must not be a common problem.Here is the code.
--Adobe iFilter 11 64 bit is installed
--The Path variable is set to the bin folder for the Adobe iFilter.
--SQL Developer version 64 bit on both Windows 7 and Windows 8.
USE master;
GO
DROP DATABASE FileTableStudy;
GO
CREATE DATABASE FileTableStudy
ON PRIMARY
[code]....
View 14 Replies
View Related
Dec 11, 2006
How can I search throught DOCX (MS Word 2007) documents by SQL Server 2005 Full Text Search engine?
Should I something download?
View 6 Replies
View Related
Sep 14, 2004
Please help me to create an SQL Server 2000 Stored Procedure for using prefix and suffix terms.
Example:
Say I want to find "Terminator" (1984).
I want to be able to use "Term" or "ator" as search results and still return the proper record.
Here is my Stored Procedure creation sql:
CREATE PROCEDURE sps_searchTitles(@searchTerm varchar(255)) AS
SELECT * FROM Video
WHERE FREETEXT (Video.*, '"*@searchTerm*"')
GO
--- The above does not appear to properly check both prefix ("Term---") and suffix ("---ator") terms.
I am trying to accomplish what is similarly done with LIKE '%term%'.
thanks, YM
View 1 Replies
View Related
Mar 25, 2015
I have a table that contains words that will be used to search another table where FullText index has been created on searchable columns. I'm basically trying to run something like this:
SELECT t1.col1, t2.col3
FROM tbl1 t1, tbl2 t2
WHERE CONTAINS (t1.col1, t2.col1)
I know this won't work but is there a way to join these two tables so the words (t2.col1) can be passed as search conditions? There is no common key on both tables so normal join won't work. I'm trying to find a way to pass the search words from one table to another.
View 0 Replies
View Related
Jul 6, 2007
I have Sql server 2005 SP2.
I enabled it for Full Text search. Substring search where i enter *word* doesn't return any row.
I have a table testtable where description has word Extinguisher.
If i run a query with *ting* it doesn't return any row.
select * from testtable where contains(description,'"*xting*"') ;
But it works if i do
select * from testtable where contains(description,'"Exting*"') ;
The Full text search document says it supports substring search.
Is it an issue with sql server 2005?Please help.
View 7 Replies
View Related
Nov 1, 2015
I am using Sql Server 2014 Express edition.I have a table with a varchar(max) column. I have created a full text search that use the stoplist "system". column has this struct: xxx.yyy.zzz.... where xxx, yyy, zzz... are numbers, like 123.345.123123.366456...I can have rows like that:
123.345
123.345
123.345.444
123.345.555
123.345.666
123.345.444.777
123.345.444.888
123.345.555.999
I am trying this query:
select * from Mytable where
contains(MyColumn, '123.345.')
I gues the contains would return all the rows with column contains 123.345, but this does not return all the expected rows, only one row.I have tried to replace "." with "-" but the result is the same.I have also tried with '123.345.*. In this case I have got more results, but no all the exptected rows.If I use this query:
select * from MyTable where
MyCOlumn like '123.345.%';
View 12 Replies
View Related
Mar 1, 2007
Can anyone tell me how to search an SQL database for a given key word in a textbox? I basically have a database that has a qualifications column and this column needs to be searched for the data given in the textbox. Which is the best method to search for the data? Is it a simple SQL query or an XML based search engine type? Can anyone give any suggestions regarding this? If XML is efficient then how do I use it to query my database, as I'm pretty new in XML based searching.Thanks
View 5 Replies
View Related
Nov 22, 2007
hi there,
i am doing a school project and i need to have this search engine that will search the data that i have stored inside the database and display the results out
can anyone help?
thanks
View 6 Replies
View Related
Apr 2, 2004
for example:
SELECT * from [table1] WHERE CONTAINS([msgcomment], '"fast" NEAR "performance"')
would always slower than
SELECT * from [table1] WHERE [msgcomment] = '%fast%performance%'
Why? and how can it be solved? can you help me?
:)
View 6 Replies
View Related
Dec 6, 2011
My site uses a text box to allow visitors to search products. I'm trying to design the SQL Statement to allow search's on full words, part words, and words/phrases regardless of the order the words are in.
E.g.
megger
meg
mft megger (proper order in the database is megger mft)
mft1710 (using 1710 should find the product)
This is my select statement (classic ASP)
Code:
<%
Dim RSResults__param5
RSResults__param5 = "xxx"
If (Request("searchme") <> "") Then
RSResults__param5 = Request("searchme")
End If
[Code] ....
View 1 Replies
View Related
Jun 24, 2015
I'm experiencing an anomaly with my Full text index.
Setup : SQL Server 2005
Indexed Table:
Assets
ID - int (PK, auto increment)
Ref - varchar(50)
[code]....
I have re-built the full-text index, no change.
View 2 Replies
View Related
Jan 24, 2006
Are there any big differences between the two search techniques? It seems like they are both very similar.
SELECT * FROM TABLE1 WHERE TEXTFIELD1 LIKE '%DATABASES%'
SELECT * FROM TABLE1 WHERE CONTAINS (TEXTFIELD1 ,' "DATABASES" ')
View 2 Replies
View Related
Mar 14, 2007
Hi guys
I need to create an "advanced search" which will allow the user to narrow down his results.
Ideally I'd want him/her to use the same search criteria form for each iteration, with a checkbox called "Search within results" type of thing.
Now what I was wondering if there was any existing literature on how to effectively do this. I have tried doing it just through SQL Statements but they are becoming very messy and large.
Is it possible to do this by searching the initial dataset, returning dataset #2 and then if a 3rd "search within results" is done apply the search against dataset #2 and return dataset #3 etc?
Many Thanks
John
View 2 Replies
View Related
Feb 22, 2007
//and i m getting this error
Syntax error converting the varchar value 'NPO04/136 ' to a column of data type int.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Syntax error converting the varchar value 'NPO04/136 ' to a column of data type int.
====================================
can anyone help me in this i m doing a search in a form ( for ex. u search for clientID n it'll come up in search result n once u select that it'll fill in the form) if anyone knw how to do this plz help me. thank u
Protected Sub cmdSelect2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSelect2.Click
Dim sID As String
sID = lstResults.SelectedValue
Dim iID As Integer
' iID = Int32.Parse(sID)
'' If iID > 0 Then
Dim selectSQL As String
selectSQL = "SELECT * FROM contactinfo "
selectSQL &= "WHERE ClientID=@ClientID"
Dim cmd As New SqlCommand(selectSQL, conSR)
cmd.Parameters.AddWithValue("@ClientID", iID)
Dim reader As SqlDataReader
Try
conSR.Open()
reader = cmd.ExecuteReader()
reader.Read()
' Fill the controls.
'txtCaseid.Text = reader("Caseid").ToString()
txtClientID.Text = reader("ClientID").ToString()
txtFirstname.Text = reader("Client_Fname").ToString()
txtLastname.Text = reader("Client_Lname").ToString()
txtRace.Text = reader("Race").ToString()
txtCounty.Text = reader("County_of_origin").ToString()
txtGender.Text = reader("Gender").ToString()
txtState.Text = reader("State").ToString()
txtReligion.Text = reader("Religion").ToString()
txtContactID.Text = reader("ContactID").ToString()
'reader.Close()
'' enable_fields()
lblResults.Text = ""
Catch ex As Exception
'lblResults.Text = "Error inserting record"
lblResults.Text = "Error inserting record"
lblResults.Text = ex.Message
Finally
conSR.Close()
End Try
lblID.Text = sID
phID.Visible = True
txtID.Text = sID
txtAct.Text = "edit"
cmdSubmit.Text = "Update"
lblCurrentAct.Text = "Update Existing Record"
'Else
'If iID = 0 Then
' lblResults.Text = "Client not found in Contact Information."
'Else
' lblResults.Text = "Please select a contact from the list."
''' End If
End Sub
View 1 Replies
View Related
Jul 3, 2007
here is my current search i have created which returns values that i want....but my question is there a way to make it search for all related matches??? like lets say i was searching an address and i had "1231 W. Adams" in the table...and i searched by anyone that lived on "Adams" it would pull it up...right now i have to have the exact address in there correctly...any ideas?
//create the connection objectSqlConnection myConnection = new SqlConnection();
//set the connection string myConnection.ConnectionString = ConfigurationManager.ConnectionStrings["MRDDstringConnection"].ConnectionString;
//open the connection
myConnection.Open();
//create a commandSqlCommand myCommand = new SqlCommand();
//VarianceOfUse, Owner, BZA, AND VarianceOfUse.BZAcaseNum = BZA.BZAcaseNum AND Owner.OwnerID = BZA.OwnerID AND Applicant.ApplicantID = BZA.ApplicantID
//***set the query text to the name of a stored proceduremyCommand.CommandText = "SELECT * FROM Applicant WHERE Applicant.Line1 = '" + searchTextBox.Text + "'";
//***set the command type, stored proceduremyCommand.CommandType = CommandType.Text;
//associate a connection with a command
myCommand.Connection = myConnection;SqlDataAdapter myAdapter = new SqlDataAdapter();
//inform the data adapter of the command to execute
myAdapter.SelectCommand = myCommand;
//4. holds the resultsDataSet myResults = new DataSet();
//execute the query and get results in a table
myAdapter.Fill(myResults);
//bind to LabelsSearchResults.Visible = true;
SearchResults.DataSource = myResults;
SearchResults.DataBind();
//6. give back all resources
myAdapter.Dispose();
myCommand.Dispose();
myConnection.Dispose();
View 2 Replies
View Related
Jan 24, 2008
yes iam storing total data into the database,
but actually i don't know how to read data from any type of file also......plz help me
View 1 Replies
View Related
Feb 2, 2008
Hello, I have a search form where i want users to enter a surname into a textbox i then want to retrieve everything from my table patients thats matches this is there away of selecting from a database where Patient surname = textbox1.
Thanks Mike
View 1 Replies
View Related
Feb 6, 2008
All
I have a search screen with 4 possible input boxes
name
contents
start date
end date
My user needs to be able to use any combination of these to do an sql search and may only use one criteria or all four
what is best practice for creating this kind of sql search string in my aspx page
thanks
gibbo
View 8 Replies
View Related
Mar 6, 2008
This is probably a very simple question, but I could not figure it out...
In my SQL 2005 Database I have a bit field CompanyIsActive. The field is not nullable.
I would like to offer a search feature in the app that shows Active Companies, Inactive companies or All Companies. How do I do that?
Here are some examples that did not work:
1- WHERE CompanyIsActive LIKE @CompanyIsActive (Declaring @CompanyActive as bit) : Only the True (1) are returned
2- WHERE CompanyIsActive LIKE @CompanyIsActive (Declaring @Company is the Stored Procedure as varchar)
3- WHERE CAST (CompanyIsActive AS varchar) LIKE @CompanyIsActive
4- WHERE CAST(CompanyIsActive AS int) LIKE @CompanyIsActive
5-WHERE CompanyIsActive <> @CompanyIsActive (declaring @Company as bit, varchar and nvarchar in the stored procedure)
Your help is appreciated!
View 4 Replies
View Related
Apr 9, 2008
Does anybody know how i can do a search on my website.I think the problem is that is not understanding the varible.If anyone knows how fix this or do it in a better way, tht would be great<form action="search.aspx" method="post"><input name="txtSearch" type="text" /><input name="btnSearch" type="submit" value="Search" /></form>Dim lookforSub Search_patients lookFor = Request.Form("txtUserName") sel = "SELECT * FROM People WHERE Surname LIKE ' lookfor%'" Dim rs As Object rs = Server.CreateObject("ADODB.recordset") rs.Open(sel, cs) Do Until rs.EOF() For Each x In rs.Fields Response.Write(x.value & "<br />") Next rs.MoveNext() Loop rs.close() rs = Nothing End Sub
View 1 Replies
View Related