Sql Search Command Word By Word?

Mar 30, 2005

hi!

I'm just wondering does anyone know how to create an sql command that can search word by word?

what i mean is like I have a product with name 'harry potter broom'.

I want an sql command where if i type only 'harry broom' this 'harry potter broom' product will show up.

Does anyone have any idea?

Here's my sql comand: (I'm using asp.net vb script do develop this system)

-------------------------------------------------------------------------

query = "select distinct * from product where " & _

"(pname like '%" & keyword & "%' or " & _

"pdesc like '%" & keyword & "%' ) and " & _

"(price >= " & price1 & " and price <= " & price2 & _

") and status <> 'out of stock' order by price asc"

-------------------------------------------------------------------------

Thank you.

View 4 Replies


ADVERTISEMENT

Can I Change Null Word In Report To Another Word

Feb 24, 2008

i have report with parameter and he can have a null in parameter ther is null word can i change it to another word like all or any thing else

View 4 Replies View Related

How Can I Search Throught DOCX (MS Word 2007) Documents By SQL Server 2005 Full Text Search Engine?

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

How To Do A Word Search?

Dec 29, 2006

I need to be able to search article in several tables in a MSSQL DB. What is the best way to do a word search? Are there and freebies out there or code examples?
 
Dave

View 3 Replies View Related

How To Search A Database For A Key Word Based Search?

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

Search Within Word Document

Mar 2, 2007

Hi ,I would like to whether its possible or not.I have stored word document(Resume) in SQL server. Now i want to search for particular key word.for example . I want to list down all details of candidate which have ASP.Net mentioned in their resume. So please provide me any link / or article .     

View 1 Replies View Related

Search A Word In Database

Nov 24, 2006

Hi I was wondering if anyone can help me out here. I want to search a word in the database which has more than 80 tables is it possible to search all the tables at once for that word.

I am using SQL2005.

Thanks in advance.

View 2 Replies View Related

Search A Word In A Table

Mar 15, 2007

hi guys....how do i search a word in a table using MS Access query? it should search all the columns in the table. thanks.

Regards,
Rohit

View 4 Replies View Related

Multi Word Search

Oct 1, 2007

Hi,

I am trying to search a multi words with “like� function using the following statement in a S.P.:
@ITEM_desc nvarchar(10),
@QUOTFIL nvarchar (200),
@mfil nvarchar (500) = ''

SET @mfil = QUOTENAME('%' + @ITEM_desc + '%','''')
exec ('select * from ims.item where adesc like' + @mfil + @QUOTFIL)
Nrormaly one word can be send to SP for searching, is there any way to send multi word for the like function to search Like follows:

'%LOCAL%,%LIGHTS%'

Best regards

View 3 Replies View Related

Word Search In String

Feb 25, 2008



Hi All,

Please help, it is urgent

I am having a colume as image datatype, in which candidates resume is stored in binary format.
I have to search for particular words for eg. "ASP.Net, 2 Years" into that column
I have converted that column as varchar and then searching above two words(after spliting them by comma) into that string using CHARINDEX


DECLARE @i int, @j int
SET @i = select MIN(ResumeId) from table_name
SET @j = select MAX(ResumeId) from table_name

WHILE (@i <= @j)
BEGIN
DECLARE @Resume varchar(max)
SET @Resume = CAST((select Resume from table_name where ResumeId=100) as varbinary(max))

--code to search the particular word from @Resume

END

It is working fine, but it is very slow, taking 2+ minutes to scan 15000 records
How can I make it faster or is there any other way to search?

Thanks in advance


View 7 Replies View Related

How To Search Text In A Word Document ?

Nov 24, 2005

I'm designing a Job Recruitment Website, in which the admin person searches for the right candidate for the job using certain keywords . Each jobseeker will be uploading  his CV (ms word doc) during registration .How can i search for keywords in  the word documents. I just want the candidate reference once i found keyword match in the word docs.I heard about the indexing and blobs in sql server? But dont know much about it Are these the only solutions ?Is there any better approach for this ?Any help will be greatly appreciated

View 4 Replies View Related

Criteria; Search Any Word In Field

May 26, 2004

I am trying to set up a query that will allow the user to input a string, and the search will match ANY word in that string. Currently, I have it configured so that the search will only match the exact string that the user inputs. I have google searched for the answer, but no luck yet. Any ideas?

View 9 Replies View Related

Can I Search A Word Only In My All Stored Procedure

May 5, 2008

hi
can i search a word in my all stored procedure
not in system stored procedure
only in my stored procedure

like i need to search ' Getdate() ' in my all stored procedure

TNX

View 8 Replies View Related

Find Exact Word In Full-Text Search

Oct 3, 2007

Hi,
I have the fields like this.

Session1               Session2                  Session3   Session4----------------------------------------------------------------------------------------- SQL Server-Part1    SQL Server-Part2      ASP.Net    CSS
C#                         SQL Server-Part3    ASP.Net    Javascript 
I have set the Full-Text to all the columns. For searching i wrote the below query
SELECT * FROM <TABLE NAME> WHERE CONTAINS(*,'"SQL Server-Part1"') 
My Result expectation is: The  First Record should come. But the result of the query bring the two records. It see the "SQL Server" string also. I need to find the exact word. How to do it? Please answer me as soon as possible. Ganesh. 
 

View 6 Replies View Related

T-SQL (SS2K8) :: OR Query - Search For Items And Separate Each Word

Oct 17, 2014

I have this query currently:

select updatedb.callref, updatedb.updatetxt, updatedb.udsource, opencall.suppgroup
from updatedb
left join opencall
on updatedb.callref=opencall.callref

where udindex = '0'
and suppgroup = 'SUPPORT'
and (updatetxt like '%' + @Word + '%')

And opencall.status <> '17'This means that when they search for items and they separate each word it is "and" between each one.

They would like it to be more fuzzy with "and" and "or". How can I adapt this?

View 8 Replies View Related

How To Compare Two Word Documents Using Full Text Search?

Mar 19, 2006

can we use full text search and mining algorithms to comapre two word or text documents to find out if they are similar
please help.
thaks for reading

View 3 Replies View Related

How Do You Create A Multiple Word Search Box To Return Rows From A Sql Database In Asp.net 2.0

Jun 12, 2007

I am using VS2005 to construct a website. I have a sql database with 3 datasets. One of the table adapters is called Proudcts and has the following fields. ProductItem,    Description,   Price,    ProductID,    PackSizeI want to be able to see a summary of the products (there are thousands of them) using one or more words (or partial words) in one text box to search in only 3 fields (ProductItem,    Description,   ProductID, ). This needs to show only records which contain the search criteria in a gridview?This is such a basic requirement for a website, and can be found on many sites, but I haven't found how to do it.Thanks, Bri 

View 7 Replies View Related

How To Search Specific Word Present Multiple Times From A Paragraph Using Asp.net 2.0

Apr 16, 2008

Anyone please suggest me that
How to search specific word present multiple times from a paragraph stored in sqlserver database  using asp.net 2.0
 With Regards
Tapan

View 4 Replies View Related

SQL 2012 :: Create A Script To Search For Missing Word Or Phrase

Jan 16, 2015

We compulsorily use NOLOCK in our scripts on reporting DB and development generally forget putting NOLOCKS or schema names with tables.

Creating a script to search for a missing word or a phrase in SQL Server script.

Our format is
<schema>.<table> <alias here> WITH NOLOCK <or alias here>
or
<schema>.<table> <alias here> NOLOCK <or alias here>
or
<schema>.<table> <alias here> (NOLOCK) <or alias here>

but generally developers write only <table> <alias>

View 4 Replies View Related

SQL 2012 :: How To Write Query To Search Only For Any Entry That Has Word LVAD

May 11, 2015

What I really need is to find the entries that have the word LVAD but on either side there should be a space chartacters.In other words I don't want to see the following coming from the query "SILVADENE ([PHI] SULFADIAZINE)"How can we write this query to search only for any entry that has the word " LVAD " ?

Select top 100 * FROM tbl_abc
where
AIMS_Value like '%LVAD%'

View 2 Replies View Related

Is The Word Name A Reserved Word?

Sep 24, 2007

 
Is the word "Name" a reserved word in SQL? look at line 10 of my stored procedure. When I use the word "Name"it is highlited in blue by SQL Server?
Note I only list part of the stored proc
1  CREATE PROCEDURE [dbo].[GetXMLPeopleNames] 23 (4 @Status nvarchar(3)5)6 AS7 SELECT8  PersonId,9  PersonDescription,10  Name,11  UpdateDate,12  UpdateAppUser13 FROM14  Customer WHERE Customer.PersonDescription=@Status15 ORDER BY

View 2 Replies View Related

Convert Microsoft Word XML To PDF Without Using Microsoft Word

Jan 19, 2007

Hi all,

I work for a financial company where we send out lots of correspondence to clients on a daily and monthly basis. This would typically be something like a financial report, account statements, etc. We've decided to use PDF as the format which these documents must be in when our clients receive them.

Our marketing and sales departments designs the templates of these documents using Microsoft Word. They can save these MS Word documents in the Word XML format (either 2003 or 2007). We want it in XML format, because it is text based, and we can therefore string replace the content to update the template with a client€™s information. In the same token RTF would also do, but the file size when converted to RTF is a problem.

What I am looking for is a way to convert this XML into PDF using something like XSL-FO - i.e. we do not want to use the Word Interopt on our Production Server, firstly it is a little slow and secondly the production server is unmanned and we cannot allow a WinWord.EXE process to not close successfully for some or other reason.

I've tried a number of companies' evaluation software to try and achieve this (converting the WordML to PDF via XSL-FO), but so far no luck.

Does anybody know of a stylesheet out there with which I will be able to achieve this? Or an alternative method of converting MS Word files into PDF without using Word to do it?

Thank you in advance.

Regards

View 4 Replies View Related

Word And SQL 7.0

Feb 22, 2000

Ever store a word document in a sql table...? Just wondering how you did it...

Thanks!

Dean

View 1 Replies View Related

How To Get Last Word Of URL

Aug 5, 2013

DECLARE @url VARCHAR(1000)

SET @url ='http://www.microsoft.com/technet/security/bulletin/ms11-022.mspx';

How to get the result like 'ms11-022.mspx'

View 1 Replies View Related

Word Xp

Sep 30, 2005

I have Sql Server 2000 and Word from Office Xp. Since a few weeks, I cannotimport Data from my database towards a Word document. I follow theprocedure, but at the end, it tells me Word cannot find the data source. IfI use Excel, well it works perfectly. What is the gig?thanks

View 5 Replies View Related

Rdl To Word Doc ??

Jun 18, 2007

Hi,



Can anyone assist me to convert .rdl files into an word file ?

Shall i need to write a program ??





Regards

Harsh

View 1 Replies View Related

Key Word Like

Sep 5, 2007

Can anyone find what is wrong with this? I think I am using the keyword "Like" correctly. I am trying to enforce some rules by doing this this way. No obvious typos or syntax errors are jumping out at me.



CREATE DATABASE VetClinic

ON

(NAME='VetClinic',

FILENAME = 'c:Program FilesMicrosoft SQL ServerMSSQL.1mssqldataVetClinic.mdf',

SIZE = 100MB,

MAXSIZE = 500MB,

FILEGROWTH = 10MB)

LOG ON

(NAME = 'VetClinicLog',

FILENAME = 'c:Program FilesMicrosoft SQL ServerMSSQL.1mssqldataVetClinic.ldf',

SIZE = 5MB,

MAXSIZE = 25MB,

FILEGROWTH = 5MB)

GO

CREATE TABLE Customers

(

CustID int IDENTITY NOT NULL PRIMARY KEY,

FirstName varchar(15) NOT NULL,

LastName varchar(15) NOT NULL,

StreetAddress varchar(25) NOT NULL,

City varchar(20) NOT NULL,

CustState char(2) NOT NULL,

Zip varchar(10) NOT NULL,

Phone1 char(13) NOT NULL

LIKE "([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]",

Phone2 char(13) NULL

LIKE "([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]",

Email varchar(30) NULL,

DateInSystem smalldatetime NOT NULL

DEFAULT GETDATE()

)

GO

CREATE TABLE PetDetails

(

PetID int IDENTITY NOT NULL PRIMARY KEY,

CustID int NOT NULL

FOREIGN KEY REFERENCES Customers(CustID),

PetName varchar(20) NOT NULL,

BreedID int NOT NULL,

Gender char(1) NOT NULL

LIKE "m" OR "f",

Weight decimal NOT NULL,

DOB smalldatetime NULL,

DateFixed smalldatetime NULL,

DateLastSeen smalldatetime NULL,

VetLastSeen int NULL

)

GO

CREATE TABLE Employees

(

EmpID int IDENTITY NOT NULL PRIMARY KEY,

PositionID int NOT NULL

FOREIGN KEY REFERENCES Positions(PositionID),

FirstName varchar(15) NOT NULL,

LastName varchar(15) NOT NULL,

SSN char(11) NOT NULL

LIKE "[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]",

StreetAddress varchar(25) NOT NULL,

City varchar(20) NOT NULL,

CustState char(2) NOT NULL,

Zip varchar(10) NOT NULL,

Phone1 char(13) NOT NULL

LIKE "([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]",

Phone2 char(13) NULL

LIKE "([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]",

Email varchar(30) NULL,

DateInSystem smalldatetime NOT NULL

DEFAULT GETDATE(),

HireDate smalldatetime NOT NULL,

TerminationDate smalldatetime NOT NULL,

PaySatus char(6) NOT NULL

LIKE "hourly" OR "salary",

PayAmount money NOT NULL

)

GO

CREATE TABLE Appointment

(

ApptID int IDENTITY NOT NULL PRIMARY KEY,

EmpID int NOT NULL,

ApptDate smalldatetime NOT NULL,

ApptTime smalldatetime NOT NULL,

PetID int NOT NULL,

CustID int NOT NULL,



)

GO

CREATE TABLE PetProcedures

(



ProcedureID int IDENTITY NOT NULL PRIMARY KEY,

ProcedureDescrip varchar(20) NOT NULL,

Cost money NOT NULL



)





GO

CREATE TABLE Breed

(

BreedID int IDENTITY NOT NULL PRIMARY KEY,

BreedName varchar(20) NOT NULL

)

GO

CREATE TABLE Prescriptions

(

PrescriptionID int IDENTITY NOT NULL PRIMARY KEY,

PetID int NOT NULL,

MedID int NOT NULL,

EmpID int NOT NULL,

DatePrescribed smalldatetime NOT NULL

)

GO

CREATE TABLE Medications

(

MedID int IDENTITY NOT NULL PRIMARY KEY,

MedName varchar(30) NOT NULL,

MedType varchar(20) NOT NULL,

Dosage varchar(20) NULL,

Frequency varchar(10) NOT NULL

LIKE "daily", "weekly", "monthly" OR "annually"

)

GO

CREATE TABLE Positions

(

PositionID int IDENTITY NOT NULL PRIMARY KEY,

PositionName varchar(20) NOT NULL

LIKE "vet", "tech", "front desk" OR "office manager"

)

- -----------------------------------------------------------------------------------------------------------------

Here are the errors that I got


Msg 156, Level 15, State 1, Line 12

Incorrect syntax near the keyword 'LIKE'.

Msg 156, Level 15, State 1, Line 10

Incorrect syntax near the keyword 'LIKE'.

Msg 156, Level 15, State 1, Line 10

Incorrect syntax near the keyword 'LIKE'.

Msg 156, Level 15, State 1, Line 9

Incorrect syntax near the keyword 'LIKE'.

Msg 156, Level 15, State 1, Line 6

Incorrect syntax near the keyword 'LIKE'.

View 1 Replies View Related

Cutting To A Certain Word

Nov 29, 2006

Hi there, i need to know how to cut a string to the nearest word. For example, i've got an article and i need to extract just a part of the beginning, i could use LEFT([content], 250) but there is little chance this will cut on a word. Therefore i need to know if there is a function that will cut to the nearest word in T-SQL or i will simply put a summary field in the database. (I prefer to generate the summary on the fly if possible)

View 3 Replies View Related

Length Word In Sql

May 5, 2008

Is there a function how I can see how many caracters a word from my sql is?
 
for example:
if I want the lenght of the word "sql" => 3
 if I want the lenght of the word "forum" => 5

View 1 Replies View Related

Word Count

Aug 3, 2007

Hi,

I was hoping somone could help. I need to count the number of words in a specfic column in a table if i didn't know what the words said.

I can count the number of words using

DECLARE @String VARCHAR(4000)
SET @String = ' words to be counted'

SELECT LEN(@String) - LEN(REPLACE(@String, ' ', '')) + 1

AS Results

but this requires me to know what the words are and not count them from the column.

View 2 Replies View Related

Export To Word

Mar 19, 2007

Not sure if i am in the right forum or not.
I have been given the task to create a mail merge application.

For time sakes while this is being built i need to just export the name and address in to a pre written letter in word. how can i do this?

View 1 Replies View Related

Getting The Word Out...opinions?

Nov 9, 2004

Hi all,

I took a search through the archives for related topics (and got Des in trouble along the way :( ) but couldn't find a directly related thread. If I missed one, feel free to tell me where to go (hey...watch that...only if I MISSED one!)

I wrote what is, essentially, a data verification stored proc that goes out to each of FOUR servers we have - each one running a mirror database. In a nutshell, there is one table that contains a row with a column in it that, if everything has gone well in the daily processing in all 4 databases, will match identically between all 4 DBs.

So, that said, here is the output: Job 'Index - Verify PortfolioIndex Across Servers' : Step 1, 'PortfolioIndex Check across all servers and portfolios' : Began Executing 2004-11-09 15:30:00

------------------- BEGINNING PortfolioIndex VERIFICATION -------------------- [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 2 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 3 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 11 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 67 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 72 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 84 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 90 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 92 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 100 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 105 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 110 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 115 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 120 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 125 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 130 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 135 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 140 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 145 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 150 on 11/09/2004! [SQLSTATE 01000]
WHOO-HOO!!! EVERYTHING MATCHES for porfolio number 155 on 11/09/2004! [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 160 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 110.582 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 110.582 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1000 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 189.623 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 189.623 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1001 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 164.058 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 164.058 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1002 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 255.978 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 255.978 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1003 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 159.009 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 159.009 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1004 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 318.981 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 318.981 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1005 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 145.921 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 145.921 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1006 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 141.035 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 141.035 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1007 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of NULL [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
UH-OH - TROUBLE!!! CloseIndex mismatch for porfolio number 1008 on 11/09/2004! [SQLSTATE 01000]
--> Server TA1 shows an index of 123.179 [SQLSTATE 01000]
--> Server TRADEANALYSIS shows an index of 123.179 [SQLSTATE 01000]
--> Server RECEIVE1 shows an index of NULL [SQLSTATE 01000]
--> Server RECEIVE2 shows an index of NULL [SQLSTATE 01000]
------------------- COMPLETE -------------------- [SQLSTATE 01000]


This was cut-n-pasted here from a log file created by the actual SQL SERVER 2000 job created to run the afore-mentioned stored procedure.

After all that...my quandry is this:

What is the best way to send this info out in an email format to interested parties? Currently I have the job send out an email notification on completion, but that still requires my lazy buttocks to go look at the log file in the job (or, more accurately, on the server in the logfile directory).

I want to get the actual DATA as shown above into the email.

As I see it, my options are:
(1) write the data out to a flat file during the run (or, as is done now, into a log file by the SQL Server scheduled job) and then attach that FILE to the email - this still requires my lazy buttocks to OPEN the attachment that comes with the email.
ro (2) write the message out a line at a time to a table with an IDENTITY column (used to order them on the select) and a VARCHAR(128) column that each line in the log would be written to. This option allows me to just do a SELECT in the call to xp_sendmail to get the data into the actual email...but I just really hate the idea of creating a permanent table for this cheesy solution.

I tried it with a temp table within my stored proc, but of course, when I made the call to xp_Sendmail, it can't see my temp table in order to select from (mind you, it's not that I mind USING a cheesy table, just that I don't want it to have a lifespan longer than the time I need to use it and toss it aside)

I know the common denominator here is "My Lazy Buttocks", but I really can't understate the laziness of my buttocks, so this is a valid concern ;)

Any thoughts? How do people get status messages like this into an email without using an attachment or a cheesy middleman table?

Sorry, as always, about the miniseries...just trying to set the mood before popping the question ;)

View 1 Replies View Related

Specify Word Breaker

Mar 7, 2005

Hi

Does anyone know if you can specify certain characters to tokenise the search text(other than space and punctuation).

for example, id like to use `:` as a delimiter, word1:word2:word3 etc

Thanks in advance

View 4 Replies View Related







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