Tracking Searches.

May 10, 2008

Hey everybody,

First thank you for all your help thus far. Now I'm stuck again. I've been doing a lot of reading on triggers and logging information into tables but I've been trying to capture how many times someone enters an item into the search box.

So every time somebody types Gumballs into the search box I want to capture it and the name of the person who is currently logged in. Is there away to do this? Maybe this is something that I should be checking in ASP.NET forums?

Thanks in advanced guys!

View 2 Replies


ADVERTISEMENT

Searches On Dates...?

May 17, 2007

Dear all
 
I was doing research oh how to do some searches on dates that allow a bit of a freedom to the person searching. They should be able to specify the parameters.
For example how would you make a search for all events that happened on a specific day in any year,any month? example : every 18
Or how would you searh for values that happened in a specific month in any year and any day? eg. May
Or how would you search for values that happen in a specific year and any day and month? eg. 2007
Or how would you search for values that happen every 18 May?
 
I tried few things and can only work out the search for the year bit. The values are saved in the database as DateTime.
 
Any advice is apreciated.
 
Sincerely

View 2 Replies View Related

Wildcard Searches

May 13, 2006

I have a number of functions that require the input of parameters in order to ultimatly create a report under Reporting Services by making use of a Stored Procedure.

All the functions etc work as does the stored procedure, but it only works if I specify data that I know exists e.g.

DECLARE @return_value int

EXEC @return_value = [dbo].[spWTRalldatareportsummary]

@dt_src_date = N'04/28/2006',

@chr_div = N'NE',

@vch_portfolio_no = 3,

@vch_prop_cat = N'core'

SELECT 'Return Value' = @return_value

GO

How can I set this so that it will wild card the value. For example rather than having to specify

@chr_div = N'NE', I could specify something like

@chr_div = N *, so it would show both NE and SW values in the result set.

Anybody point me in a direction here. I have tried % but that does not seem to work, I get a

Msg 102, Level 15, State 1, Line 7

Incorrect syntax near '%'.

Thank in Advance

View 4 Replies View Related

Multiple Searches For FilterExpression

May 31, 2007

 This is what I have:
 
<asp:TextBox ID="TextBoxProjectCode" runat="server"></asp:TextBox>
<asp:Button ID="ButtonSearch" runat="server" Text="Search" /> <br>
<asp:TextBox ID="TextBoxProjectDate" runat="server" ></asp:TextBox>
<asp:Button ID="ButtonSearch" runat="server" Text="Search" />
 
SelectCommand="SELECT CLIENT_NAME, CLIENT_CODE, PROJECT_CODE, PROJECT_NAME, PROJECT_DESCRIPTION, EMPLOYEE_ID, ENTRY_DATE, ENTRY_TIME, ENTRY_DESCRIPTION, COMBINED_CODE, TIME_ENTRY_ID, BILLABLE FROM VIEW_TIME WHERE (EMPLOYEE_ID = @SELECT_EMPLOYEE_ID) ORDER BY ENTRY_DATE DESC" FilterExpression="PROJECT_CODE = '{0}' or ENTRY_DATE = '#{0}#' "
 
<FilterParameters>
<asp:ControlParameter ControlID="TextBoxProjectCode" Name="PROJECT_CODE" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="TextBoxProjectDate" Name="ENTRY_DATE" PropertyName="Text" Type="DateTime" /></FilterParameters>
 
 
Why do I keep getting errors. What am I missing?

View 3 Replies View Related

Full-text Searches

Feb 21, 2004

BASIC QUESTION here:

Can you do JOINS with tables in a catalog?

View 4 Replies View Related

Different Searches For Web Matrix And Sql Server

Mar 7, 2005

Hi Everyone. I have created a procedure on sql to obtain information about two tables ( bookinfo and author). The procedure is :

CREATE PROCEDURE FindBookByAuthor
@Aname char
AS

select b.libcode, b.title, b.subject, a.authorname, b.instock
from bookinfo b join authorinfo a
on b.authorid = a.authorid
where a.authorname like '%' + @aname + '%'
GO

I have tested this procedure changing the variable @aname for the surname of the author. This works fine. The problem comes when I execute this procedure from web matrix. I use a textbox to obtain the data for the variable @aname. I send the data. What happens is that when I run the web page and look for a book through the author the select statement behaves differently and gives me a different output.

I would be glad to know why this happens

Thanks

View 7 Replies View Related

Dynamic Boolean Searches AND, OR,

Jul 5, 2002

Hi, I am looking for an easy and efficiant way to add a boolean search function to an already existing search i have using ASP pages and MSSQL 2000 SPROCS.

Currently I have some code such as:

CREATE PROCEDURE sp_name

@var1 int = NULL,
@var2 varchar(50) = NULL

AS

SELECT blah, blah, blah
FROM sometable INNER JOIN anothertable ON anID = anID
WHERE (table1.column2 = COALESCE(@var1,table1.column2) AND table2.column4 = COALESCE(@var2,table2.column4))


and this works like a charm, if i pass a value into @var1 or @var 2 it gives back results where those crietera match, or if I pass no values in it returns all records.... anyways, you get the idea...

Now I would like to add the ability to introduce a 3rd variable, and have it run a boolean search on a varchar(2500) column. This column is a description field for an image so I would like to be able to search the descriptions by passing in something like 'car OR bike AND travel' and return all the records that have the words 'car' or 'bike' and 'travel' somewhere in the description field.

How can i do this? I am using SQL Server Standard Edition so I don't believe I have full text search functions available, (not sure if that would even help).

Thanks all for your support and guidance!

P.S. i would also like to maintain the functinality so that if all the @var# are blank it still returns all records.

View 1 Replies View Related

3 Tables Wildcard Searches

Apr 27, 2006

Hi,

I am writing a stored procedure to pull records from a table of personal data related to jobs applied for.

There are 3 tables involved, the jobs, the applicants and the applications.

I need to search on job title, job ref from the jobs table and on forename, surname and applicant ID from the applicants table.

There are some quirks here, if the user enters an applicant ID then we can simply scan the jobs table for that id where it also matches the job title wildcards, so that is quite easy to manage.

My own idea for the more complicated searches was to gather the unique ID's from the jobs table into a var, then do similar with the applicants and then search the applications table where both these ID's matched? I think that wouldn't work so well if using the 'WHERE IN()' clause for the main query?

So what approach would be best here to perform the second part of the SP if the client hasn't passed an ApplicantID?

Obviously the applications table has both JobID and ClientID's to relate back to the applicants table.

So can anyone help here, it seems a fairly complicated statement or set of statements would be required here.

Thanks in advance.

View 2 Replies View Related

Need For A Script That Searches Through Sql Instan

Dec 22, 2006

Here is my requirement:
The script needs to enumerate the the databases in a givin instance of sql server. Then it needs to output the account with permissions on that server. Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

What I don t understand:
What do they mean by: account with permissions on that server, which account re they talking about

and what do they mean by the SP references a specific file and account name? how can an SP reference a file or account name. i have never seen that?
Thanks for help.

View 13 Replies View Related

Approximate String Searches

Nov 3, 2005

For anybody that implemented fuzzy searches in SQL Server or any otherdatabase for that matter. I have implemented edit distance algorithm,specifically q-grams, in SQL Server and wanted to get some opinionsfrom anyone who used a similar algorithm in a DBMS.We are looking to implement fuzzy address search and are employingnumber of different techniques including synonyms for strings like"drive", "dr", "drv", etc... Number expansion, so 6 ave = Six Ave =6th Ave = 6... Now, we also have an implementation of edit distancealgorithm, which would cover misspellings and similar sounding words.One of the challenges is putting various techniques together. Synonymsand number expansion techniques go well together but no edit distance.Also, I am trying to figure out how to leverage edit distanceimplementation for 'contains' searches. So if a string like'Mississippi Municipal Building' would be returned if the Search is for'Misisipi Municipal'.Any thoughts?

View 1 Replies View Related

Partial Searches Over A Lot Of Fields

Jul 20, 2005

Hi All,I have the following scenario. I have a table called Invoice. Thishas around 30 columns of which i have to do a retrieval based onfilter conditions on 10 columns. These filters need to be partialsearches i.e. for e.g the Customer name could be 'Arun', 'Parthiv','Aaron', now i should be able to search the customer as 'ar' and itshould return 'Arun' and 'Parthiv'. My concern is there are 10 columnson which this like '%x%' search has to be done and there willpractically be hudreds of thousands of rows. can anybody suggest me toimprove the performance of such a query. Currently what i am thinkinof isselect Id, Memo, .. FROM Invoice where CustomerName like '%' + @Name +'%' and etc.P.S. am using ASP.Net as the front end.

View 1 Replies View Related

Code Suggestions For Database Searches

Apr 11, 2007

I have a database containing several tables with many different fields.  I need to create an admin section that lets me search on one field or the combination of several.  Does anyone have links to pages that offer a general overview for inhouse database search strategy and admin edits. 
Thank you

View 4 Replies View Related

Full Text Searches And/or CONTAINS In MS SQL 2005

Jul 4, 2006

Hiya,

I have recently become responsible for a small database for a volunteer soccer league. I am reasonably savvy when it comes to development, but I have not had a lot of experience with administration before.

I need to do what I think must be pretty simple: set up full text indexing so I can use a CONTAINS search on a table. The table contains all of the fields the kids use, and each field has a number of divisions that typically play on that field; we use these 'favored divisions' to make scheduling a little easier. Now, one day when I have time, I will set up a proper, normalized, one-to-many relationship between the favored divisions and the playing fields, but right now it's basically like this:

fieldID (int, primary key, identity seed)
fieldName (varchar), e.g. High School Field
favored_divisions (varchar) - comma-delimited list of divisions, e.g. G10,B14,G12

I imagine it's probably database sacrilege to have a comma-delimited list like that, but we don't have the resources now to re-write that piece of the web application. My question is, in SQL Server 2005, what do I need to do to be able to do a full-text search on this field with the following query:

SELECT fieldID, fieldName
FROM playing_fields
WHERE CONTAINS(favored_divisions,'G10')

Right now the query runs and does not return an error, but does not return any results, either. IIRC, full-text indexing is enabled by default in SQL Server 2005, but I am not familiar with the procedure -- something about having to populate a catalog. Do I need to edit or set up a new index on the actual playing_fields table? What has to happen to make this work?

Thanks very much,
Sam

View 5 Replies View Related

Dataset Query With Alias Column And Allow Searches

Jul 13, 2005

I have a form that loads a dataset.  This dataset is composed from SQL statements using alias and unions.  Basically it takes uses data from 3 tables.  This dataset also has a alias column called ClientName that consists of either people's name or business name.In addition, the form also consist of a search field that allows user to enter the 'ClientName' to be searched (i.e. to search the alias column).  So, my question is how can the alias column be searched (user can also enter % in the search field)Function QueryByService(ByVal searchClientNameText As String) As System.Data.DataSet
If InStr(Trim(searchClientNameText), "%")>0 Then            searchStatement = "WHERE ClientName LIKE '" & searchClientNameText & "'"Else             searchStatement = "WHERE ClientName = @searchClientNameText"End If
Dim queryString As String = "SELECT RTrim([People].[Given_Name])"& _"+ '  ' + RTrim([People].[Family_Name]) AS ClientName, [Event].[NumEvents],"& _"[Event].[Event_Ref]"& _"FROM [Event] INNER JOIN [People] ON [Event].[APP_Person_ID] = [People].[APP_Person_ID]"& _searchStatement + " "& _"UNION SELECT [Bus].[Organisation_Name],"& _"[Event].[NumEvents], [Event].[Event_Ref]"& _"FROM [Bus] INNER JOIN [Event] ON [Bus].[APP_Organisation_ID] = [Event].[APP_Organisation_ID] "& _searchStatement
..........End Function

View 2 Replies View Related

How To Populate Catalog For Full Text Searches?

Feb 9, 2005

i want to be able to do full text searches on a table that i have that already has data in it.. i created a new catalog, then started incremenetal population.. but nothing happened? will it only catalog the new data thats been entered into the table after i start incremental update? so since i have data in teh table already, would i need to do a full population first before i start incremenetal population?

thanks!

View 4 Replies View Related

LOADING TEMP TABLES AND MULTIPLE SEARCHES

May 6, 2008

Hi Guys,

I have to work with a poorly designed table :(, that has columns

IDINT,
thisIDvarchar(50) null,
parentIDvarchar(50) null,
Titlevarchar(255) null,
Description varchar(8000) null,
ProductTypevarchar(255) null,

The reason it is poorly designed is the table is used to hold questions and answers, all with a 1:1 relationship. Instead of having ID, ProductType, Question, Answer they have unfortunately adopted the approach of the above i.e:

id 1
thisID 3
parentid nuLL
DESCRIPTION: this is a question

id 20
thisID 3_1
parentID 3
DESCRIPTION: this is the answer to the question above

So I am writing a sproc that does this using a temp table. I got this far:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:Spencer
-- =============================================
ALTER PROCEDURE [dbo].[GetFAQs]
-- Add the parameters for the stored procedure here
@ProductType varchar(255)
AS
BEGIN
SET NOCOUNT ON;
-- Insert statements for procedure here
CREATE TABLE TEMP
(
IDINT,
thisIDvarchar(50) null,
parentIDvarchar(50) null,
Titlevarchar(255) null,
DescriptionQvarchar(8000) null,
DescriptionAvarchar(8000) null,
ProductTypevarchar(255) null,
)

SELECT
ID,
thisID,
parentID,
Title,
DescriptionQ,
DescriptionA,
ProductType
FROM
A2Z
WHERE
ProductType = @ProductType AND parentID IS NULL
END
GO

This gets all my questions for that product type.

What I need to do is load the questions into my temp table and then run through the a2z table again gaining the answers to the questions (the parentid holds the question ID). The answers then will also get loaded into the temp table.

Any bright sparks out there that can help me?

Cheers

View 9 Replies View Related

Encrypted Columns And Searches (partial And Full)

Dec 22, 2005

Hi,

For those implementing encrypted columns, what is the recommended approach when allowing users to also do partial searches on encrypted data? (ie email or creditcard info where the tables contain millions of rows). I understand one cannot have the encryption without performance impact, but the searches can be 10 to 20 times as long as when the info is stored in normal char(20) columns. Just looking as a way to try and lessen the impact.

Thanks

View 1 Replies View Related

Tracking Changes

Sep 26, 2003

Please Help.

How do you track changes to objects in SQL Server.
For example changes in stored procedure,views and indexes. What system table or column track or indicate changes in text of sp or views.
Help appreciated.


Regards

View 6 Replies View Related

Tracking Who Is Doing What?

Aug 9, 2006

We are building an inventory management system complete with BOM. It is important to track what employee is updating what tables. Currently all such tables have a Date field that is updated when a change is made, and an EmployeeID field which records the employee making the change. I am wondering if someone knows of a better way to track this information. Any suggestions?

View 2 Replies View Related

Tracking

Aug 26, 2004

Hi,

I am trying to create a tracking spreadsheet for my SQL Servers in order to keep track of every thing.

Here is a example of what I have:

DateTracking IDServerIssuesSolution

8/26/20046760FORMSCAPEDOCSBackup failSwitch Transaction logs to the D: and left the database backup on the E:

Should I be more detailed and add some more fields and if yes can you recommend some.

Thanks

View 2 Replies View Related

SQL Tracking

Mar 6, 2006

I have an application that uses SQL server. Is there a way to find out what SQL statements the application is passing to the SQL server?

I would like to know all kinds of activities going on in the background of the application. I am sure there is a way.

Thanks in advance.

View 11 Replies View Related

Tracking

Jul 20, 2005

OK. For DDL, please refer to the classical Northwind ORDERS table,problem/challenge, find the longest duration (start_date andend_date), during which, no orders were placed.FYI, column names by the order of colid per syscolumns:OrderIDCustomerIDEmployeeIDOrderDateRequiredDateShippedDateShipViaFreightShipNameShipAddressShipCityShipRegionShipPostalCodeShipCountryAny idea/approach? TIA.

View 1 Replies View Related

CDC Not Tracking Changes

Sep 5, 2007

Hi
I'm trying to get CDC going, it works however when i query the LSN using the functions i get no changes. The min and max LSN returns null. SQL agent is running, db is on full recovery model etc.

any ideas ?

thanks

View 4 Replies View Related

Sp Tracking.

Dec 19, 2007

Yesterday I had problem with that a sp that contained join that the developer had forgotten the where part. The sp join very large tables and sp took more 95% dual itanium processor. How do fastest track this down when it accrues. Find the sp or sql that running and consume this much processor resources. I tried with a lot. Sp_who, sp_who2, activity monitor.

View 5 Replies View Related

I/O Tracking For A Sql Table?

Jun 16, 2004

I'm looking for a way to monitor I/O(select, delete, & updates) to a particular SQL Table for a period of time. Any suggestions?

View 3 Replies View Related

Tracking Old New Values

Mar 7, 2006

im trying to create a procedure that will insert/update a small table
that has an ID, AmtBefore & AmtAfter.

this is just a table that i'd be using to monitor other activity on the database.

i'm really pulling a price + ID every hour and i need to track that somehow and know when the procedure runs if a price is lower than it was the last hour, plus of course keep the ID's straight.
does anyone have a good approach to something like this?

thanks for any help on this
rik

View 2 Replies View Related

Tracking Who Is Changing What?

Aug 9, 2006

We are building an inventory management system complete with BOM. It is important to track what employee is updating what tables. Currently all such tables have a Date field that is updated when a change is made, and an EmployeeID field which records the employee making the change. I am wondering if someone knows of a better way to track this information. Any suggestions?

View 4 Replies View Related

Tracking The History Of Changes.

Sep 11, 2006

Hi all,

I have several transaction tables on which I need to track the changes. That is I need to maitain
the history of changes. Only few column values are changed often.

Which is the best way for tracking the changes.

1.Store the whole record after the change ?

Or

2.Store the ColumnName & its respective old & new value ?

Or any other better.

Note : UI part & SP's will take care of the tracking & no plans for triggers.

Thanks in advance,

HHA

View 2 Replies View Related

Tracking Users

Apr 4, 2007

Hi all how do I track when a users opens, enters data in a database. How can I track them??

View 1 Replies View Related

User Tracking..

Feb 6, 2004

I have a table in my database and it holds some important information,I want to track the users
who are executing DML commands(select,update,delete) on the data in that table.
Is there any way do that?If so how could i implement that.can any one help me in this regard?
Thanks in advance...

View 7 Replies View Related

User Ip Tracking

Jun 20, 2007

Hello everyone, I have a fairly unique need :) I am trying todetermine the use/clients for databases in my corporation that I ammaintaining, but that noone seems to know what they are for. Many ofthese databases never seem to have anybody connected to them in thecurrent activity.What I'd like to do is find a way to audit the logins, so everytimesomeone connects to a database it simply logs the clients IP address,what login they used, and maybe what time. I've been searching googlefor this and have found tons of information on auditing the logins,but not the clients, such as by ip. Any help in this regard would beGREATLY appriciated!Joshua

View 2 Replies View Related

Turning RDA Tracking Off

Nov 28, 2006

I have a device application that simply needs to upload data to a server. The preferred DB server is Oracle but I've made it work using RDA and SQL Server. The problem I'm having is that it just needs to upload data, whichh I send using the RDA.Push() method. The data arrives just fine, the first time. With every subsequent upload all of the previous data is deleted fromt he server. Apparently RDA is tracking the deletion of the previously uploaded data locally and on the next .Push deleting that data from the server.

My question is: Is it possible to prevent RDA from deleting data on SQL Server? I attempted to delete the rows from the __sysDeletedRows/__sysRowTrack tables but got a "Data is read only" error.







View 1 Replies View Related

RDA Tracking Options

Oct 4, 2007

I hoipe someone can point me in the right direction here.

I have an application with the following requirements (using SQL CE 2 alas)


A set of tables on the server that need to be imported to the handheld. Using rda, I need to get the modifications to these tables from the server (add/edit/delete) but the handheld will never update these tables.

A set of tables on the server that need to be imported to the handheld. The handheld needs to add/edit existing records, and it needs to get any changes from the server.

A set of tables on the server where the handheld needs to import a subset of the records. It needs to add (but not edit) new records, upload the new records to the server, and download any changed (add/edit/delete) records to the handheld.
What tracking options should I use in these 3 cases?

The problem comes in that I need to have some foreign key relationships in the database on the handheld. Since rda munges the names of primary keys (and indexes), I do not know of a good way to add these foreign key constraints. Any suggestions?

Thanks

View 2 Replies View Related







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