First  |  Prev |  Next  |  Last
Pages: 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
Sorting
Hi, is it possible to use variable for sorting? Something like: declare @sort varchar(10) SET @sort='column1 DESC' SELECT ROW_NUMBER() OVER (ORDER BY @sort)AS rowId, * FROM table Is dynamic SQL only option? Thank you, Simon ... 15 Apr 2010 09:11
Problem with transactionnal replication
Hi I have a problem with replication on SQLServer 2000 SP4. This server is publisher and distributor. I have 2 publications: One merge One transactionnal They both are anonymous susbscriptions I have left the default SQLServer parameters : - For distributor : 72 hours for keeping the transations - For publ... 15 Apr 2010 04:51
Attach a SQL 2005 Express Database to SQL Server 2005
I am trying to attach a database from SQL Express 2005 to SQL Server 2005 and I am getting the error: Attach database failed for Server 'xxxxxx'. An exception occurred while executing a Transact-SQL Statement or batch. Could not find row in sysindexes for database ID 6, object ID 1. Run DBCC CHECKTABLE on ... 15 Apr 2010 03:46
GUID In Table
I have a GUID in a table that I fill programmatically. Often the table will be searched on the GUID. It is just a GUID generated from dotnet in a varchar field. The majority of the time the table will be searched on this GUID... only sometimes will be it be searched on an the primary key ID (just an identity). ... 15 Apr 2010 03:46
Truncate temp table
I need to delete all the rows from my temp table and use it again in my stored procedure. I don't want to delete all the records (slower with logging and locking issues) and am thinking of either Truncating or dropping and recreating the table. I know you have to be dbo to truncate the table. I am running ... 14 Apr 2010 22:17
Single Row from Multiple Columns and Rows
Beginner, struggling with the following, any help appreciated. I have a postcode table which is setup per property e.g. Business | Number | Street | Town | Postcode Abusiness MyStreet MyTown MT20 3SN 1 MyStree... 15 Apr 2010 01:35
query help
using sql server 2005 sp3 32 bit i have a table that looks like this (pseudo coded) create table test (id int, parentid int, path varchar(200)) insert into test select 1, null, '/1/' insert into test select 2, 1, '/1/2/' insert into test select 3, 2, '/1/2/3/' insert into test select 4, null, '/4/' insert ... 14 Apr 2010 21:11
column to rows
hi all, i'd like to take my single row result and turn selected columns into rows. id, col1, col2, col3 --------------------- 1, 10,20,30 Desired result: new1, new2 ---------------- col1, 10 col2, 20 col3, 30 what's the easiest way to do this? thanks, rodchar ... 15 Apr 2010 18:07
How Can I Know last time was activity on a database
I'm doing a process that uses databases from sys.databases. I would like to know when is the last time happened some activity there. (insert, update) I've tryed to look at sys.tables but only shows me last structural change on it. Not last time data has changed. How this can be done? Carles Oriol ... 14 Apr 2010 14:28
sysobject
hi, need help, I have two databases. I have lines in SP running in Database A of which will check table existence in Database B but it did not find any table even the said table exists in Database B. Is this possible or did I miss something? The following failed:- if exists ( select * from dbo.sysobject... 14 Apr 2010 06:36
First  |  Prev |  Next  |  Last
Pages: 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65