work on SQL Server 2000. want to Automated Email Notifications using SQL Server Job Schedular.If i run the bellow cursor syntax in query analyzer than i get no error .But when i set this syntax on SqlServer agent->Jobs then it's create error.
-- Script generated on 29-Oct-09 11:57 AM
-- By: sa
-- Server: (LOCAL)
BEGIN TRANSACTION ...
Using SQL Server 2005
I want to filter the column where column value not equal to numeric
Table1
Status
010203
Absent
231415
Ramesh
Suresh
...,
I want to get only Names from the status column like
Tried Query
Select Status from table1 where status <> 'absent' and status <> numecivalue
How to mentioned status <> numericvalue
E...
In short, where can I find C#/VB client side sample code that calls CLR stored procedure with some argumnet [like a sqlxml data] and receives a datareader or other form of result ?
Also how do I periodically receive information from the running CLR stored proc sent through SQlContext.Pipe.Send() method ?
...
Possible Duplicate:
Oracle: is there a tool to trace queries, like Profiler for sql server?
hi all,
i want to know whether there is a similar tool like sql server profiler in oracle. it is really useful. great thanks.
...
Does SQL Server handle unmanaged resources?please anser this
...
Hello there,
I have been using SQL for years, but have mostly been using the query designer within SQL Studio (etc.) to put together my queries. I've recently found some time to actually "learn" what everything is doing and have set myself the following fairly simple tasks. Before I begin, I'd like to ask the SOF community their thoug...
Hey,
How can i specify a user name for a specific database and get the Login for that user in a query?
Thanks.
...
I am designing database for fleet management system.
I will be getting n number of records every 3 seconds. Obviously, there will be millions of record in my table where I am going to store current Information of vehicle in the current_location table. Here performance is an BIG issue.
To solve this, I received the following suggestions...
Hi,
How can I easily insert a blob into a varbinary(MAX) field?
for argument sake:
assume the thing I want to insert is: c:\picture.png
the table is mytable
the column is mypictureblob
and the place is recid=1
I've been googling for some time and I can't find a simple solution
thanks!
...
We are experiencing performance problems using a table variable in a Stored Procedure.
Here is what actually happens :
DECLARE @tblTemp TABLE(iId_company INT)
INSERT INTO @tblTemp(iId_company)
SELECT id FROM .....
The SELECT returns 138 results, but inserting in the TABLE variable takes 1min15 but when I use a temp table with the ...
Take a standard broad search query...:
DECLARE @sq Varchar(50) = 'Desperate'
SELECT *
FROM [UnbelievablyHotWomenOrAtLeastAcceptable] u
WHERE
u.Address LIKE '%' + @sq + '%' OR
u.City LIKE '%' + @sq + '%' OR
u.firstname LIKE '%' + @sq + '%' OR
u.Lastname LIKE '%' + @sq + '%' OR
u.Email LIKE '%' + @sq + '%' OR
u.Notes LIKE '%' + @sq + '...
Is there a published list of expected values by SQL Server version that match to the DatabaseVersion column returned by a RESTORE HEADERLISTONLY command? For example, DatabaseVersion 611 = SQL 2005 SP_ ?
Plenty of references for SQL Server build numbers to product versions (ex. SQL Server 2005 SP3 = 9.0.4035), my Google and Bing searche...
This struck me as really weird behaviour and I spent a while checking for bugs in my code before I found this
"out copies from the database table or view to a file. If you specify an existing file, the file is overwritten. When extracting data, note that the bcp utility represents an empty string as a null and a null string as an empty ...
The Table:
declare @Table table (
id int,
ticketid int,
sponsor int,
dev int,
qa int,
savedate datetime
)
insert into @Table values (1,100,22,0, 0, '2008-10-29 11:17:59.527')
insert into @Table values (2,100,5,0, 0, '2008-10-29 11:00:37.030')
insert into @Table values (3,101,22,0, 0, '2009-10-29 11:10:27.687')
ins...
I'm writing an NHibernate criteria that selects data supporting paging. I'm using the COUNT(*) OVER() expression from SQL Server 2005(+) to get hold of the total number of available rows, as suggested by Ayende Rahien. I need that number to be able to calculate how many pages there are in total. The beauty of this solution is that I don'...
I've been handed a MS SQL 2000 database which has been injected with malware.
The malware script is as follows:
<script src=http://www.someAddress.ru/aScript.js></script>
Now I want to remove this piece of code from the table rows.
As a test, I inputed < h1> Test < /h1> on a row, and successfully ran the following query:
UP...
Is there a standard method to retrieve the 'CREATE TABLE..' definition of a table in SQL Server?
I can ask INFORMATION_SCHEMA for definitions of views and functions/procedures, so I thought it would be natural to get the same for tables, but I didn't find anything.
...
When it comes to creating stored procedures, views, functions, etc., is it better to do a DROP...CREATE or an ALTER on the object?
I've seen numerous "standards" documents stating to do a DROP...CREATE, but I've seen numerous comments and arguments advocating for the ALTER method.
The ALTER method preserves security, while I've heard...
I have a SQL Server table in production that has millions of rows, and it turns out that I need to add a column to it. Or, to be more accurate, I need to add a field to the entity that the table represents.
Syntactically this isn't a problem, and if the table didn't have so many rows and wasn't in production, this would be easy.
Reall...
First, from BOL:
Queries that modify table variables do not generate parallel query execution plans. Performance can be affected when very large table variables, or table variables in complex queries, are modified. In these situations, consider using temporary tables instead. For more information, see CREATE TABLE (Transact-SQL). Que...