Does anyone know how to set the timeout on a stored procedure? Found some examples on the NET, e.g sp_configure 'remote Query Timeout', 5, but this did not work. Also found some commands "DBPROP_COMMANDTIMEOUT" and "DBPROP_GENERALTIMEOUT" but i don't know if they are the right ones to use and if they are, how to use them in my transact-S...
This should be so simple, but I'm drawing a blank. I have two tables.
Table:article_tag_pvt
colum: article_id
column: tag_id
Table: tag
column: tag_id
column: name
The article_tag_pvt table is a many-to-many pivot table.
The problem is, I need a query which given a list of tag names, will retrieves article Ids which ONLY match tho...
I´m using Delphi 7 with devart dbExpress to connect to SQLServer.
The problem is that when I add a bigInt field to a ClientQuery it comes as TFMTBCDField.
And the TFMTBCDField don´t have a method to get the 64 bit value.
I can use the Field.AsVariant or the StrToInt64(Field.AsString) to pick this 64 bits value.
Is there a better way t...
Hi,
If you look the edition comparison...
http://www.microsoft.com/sqlserver/2008/en/us/editions-compare.aspx
It says for Express Edition that this option is not enabled for SQL Server Express..
Enhanced Gauges and Charting
Anyone know what the limitations are on this item? I can't seem to find any more information..
Many thanks,
...
i have a primary key set up to auto increment.
i am doing multiple queries and i need to retrieve that primary key to use as a foreign key in another table (is identity = true)
is there any elegant way to get back the primary key when i do an insert query. right now i am requerying and getting the highest value in that column which se...
Table: PhotoAlbum
Columns:
AlbumID
AlbumName
AlbumDate
AlbumDescription
Table: Pictures
Columns:
PictureID
AlbumID
The issue is that i am using picture ID as a reference to a pic within an album so the data is duplicated for each album for that field.
...
I have a SQL2005 Express database that I would like to create a copy of on the same instance. How do you go about doing this with a script?
I already have a script for generating the backup, but the restore is failing...
THE ERROR:
Msg 3234, Level 16, State 2, Line 2
Logical file 'MyDB_data' is not part
of database 'MyDB_Test'...
I have a table [Product] with a column [CreateTime] datetime null, and is has some data already.
How can I set the column [CreateTime] 's default value to getdate(), and make the new added data to have a default value getdate() for column [CreateTime].
...
i have already created a schema in sql server. is there any quick way to upload the data from table to table from msaccess to sql server. what if the col names have changed slightly?
...
I have everyday schedule to backup my database in sqlserver 2005. Now it's looks like this:
BACKUP DATABASE [db1] TO DISK = N'D:\SqlServer\Backup\db1.bak' WITH NOINIT , NOUNLOAD , NAME = N'db1backup', NOSKIP , STATS = 10, NOFORMAT
But in this case, it's will grow infinitely and I want to store only last 7 backups in file. How c...
G'day,
I'm a total n00b when it comes to SQL Server reports and my Vb.Net knowledge is ageing now.
I have a detailed report of rows in a database, with one of the columns that is nullable. What I want to do is show a simple pie chart over the data in the result which shows how many rows have a value and how many do not.
I can't work ...
I have an SSIS project where one of the steps involves populating a SQL Server table from an Oracle Table.
The Oracle table has a column ssis_control_flag. I want to pull across all records that have this field set to 'T'.
Now, I was wondering which would be the best way of doing this, and the two options as I have detailed in the qu...
Hi ,
I want a to create a new user on a db with only the select permissions (read only access)
how can i do this ?
i'm working with sql 2008
...
I have the following query
SELECT ct.Id,rankdegree FROM (SELECT c.[KEY] as ID ,c.[RANK] as rankdegree
FROM
CONTAINSTABLE( dbo.SearchItems,*,N'FORMSOF(INFLECTIONAL,хорошую)',1000) as c)
as ct where rankdegree>0
Table SearchItems contains some Russian text.
"хорошую" is a russian adjective which means good.
So the problem is t...
I'm trying to access a Sql filestream from a CLR stored procedure. I've set up a very simple database with a single table which includes a filestream column. I can successfully read from the filestream using a simple console app. Here's some example code for the proc that fails:
[SqlProcedure]
public static void GetDataFromFileStream(st...
Hi,
I am executing a stored procedure and i got an error saying 'Error SQL Server Database Error: Error converting data type varchar to int." in sqlserver 2000. But when I execute the same stored proc in Sql server 2005,i am not getting any error and result is getting displayed.
Any one is having idea regarding this??Please do help me....
My problem is similar to this one:
I'm having trouble using paramaters in a full-text search with FormsOf(INFLECTIONAL:
This query does not return anything.
DECLARE @SearchWord nvarchar(4000)
SET @SearchWord = 'tax'
SELECT listing_id, RANK, name, address, city, zip, heading, phone
FROM listings a,
FREETEXTTABLE(listings, *, 'FormsOf(I...
hello, every one
i'm using ms sql server 2005 and i need to store date values partially
for example, the day part of a date may stay unknown in fact but mssql constrains to specify the full date like the follow:
INSERT foo(dt) VALUES('2001-10-31');
though i would like to use something like this:
INSERT foo(dt) VALUES ('2001-10-??');...
I have a DTS (not SSIS) package that hasn't been touched in years that I had to update a query with. When I run the package by manually executing each step in the editor, everything works out fine and generates a file of a couple thousand records as expected. When I hit the "Execute" button at the top of the editor to run the whole pac...
I am attempting to create a Stored Procedure for a newly created database. However the SSMS intellisense does not recognize more than half of the tables which have been created.
For example whilst in the left hand column under tables I have a table dbo.Room, when I type "dbo." in the new query window, that table is not listed, in fact ...