How do I downgrade a SQL 2008 MDF file for use in SQL 2005?
Someone sent me a MDF file that was created in SQL 2008. I have SQL 2005, and the "Attach" function is rejecting the MDF file. How can I import this file? ...
Someone sent me a MDF file that was created in SQL 2008. I have SQL 2005, and the "Attach" function is rejecting the MDF file. How can I import this file? ...
I am getting an error trying to attach a database whose files were previously encrypted via EFS. The actuall error message is Msg 5120, Level 16, State 101, Line 9 Unable to open the physical file "C:\test.mdf". Operating system error 5: "5(Access is denied.)". If I decrypt the files, then I successfully can attach the database. I am ...
hi in report 1 i have three filter From date to date Number (multiple value) when i entered from date --25 august,to date 26 august number say 1,2 its shows record Number Feiled2 Image 10 213 image 20 214 image. And ...
In SQL Server 2008 I need to update just the date part of a datetime field. In my stored procedure I receive the new date in datetime format. From this parameter I have to extract the date (not interested in time) and update the existing values date part. How can I do this? ...
Hi, Please have a look at the below SQL code. DECLARE @RET TABLE(OID BIGINT NOT NULL,rowid bigint identity); DECLARE @ResultTbl TABLE(OID BIGINT,sOID BIGINT,partkey bigint); DECLARE @PATOID as VARCHAR(4000) SET @PATIENTOID= '95,96,192,253,110,201,201,83,87,88,208,208,208,208' INSERT INTO @RET SELECT OID FROM dbo.FGETBIGINTLIST(@PATOI...
I have below error when i execute the following script; Could you specify what it is and how it can be resolved? Insert table(OperationID,OpDescription,FilterID) values (20,'Hierachy Update',1) Server: Msg 544, Level 16, State 1, Line 1 Cannot insert explicit value for identity column in table 'table' when IDENTITY_INSERT is set to ...
How use output parameter from procedure? ...
I have the following configuration: Visual Studio Team System 2008 SQL Server Developer Edition 2008 GDR2 on a Win XP SP3 workstation. I have no add-ins. All patches have already been applied for Visual Studio, Sql Server and Windows. The event log does not show anything either. My IDEs for Management Studio (ssms.exe) and VS ...
Hi, I currently have the following stored procedure; CREATE PROCEDURE web.insertNewCampaign ( @tmp_Id BIGINT, @tmp_Title VARCHAR(100), @tmp_Content VARCHAR(8000), @tmp_Pledge DECIMAL(7,2), --@tmp_Recipients BIGINT, @tmp_Date DATETIME, @tmp_Private BIT, @tmp_Template BIGINT, @tmp_AddyBook BIGINT ) AS ...
I want to create a large database of GPS coordinates that can be queried by saying "Return all coordinates that are within 'n' metres of [this coordinate]". I would like to know how to implement Quadtree Indexing in Sqlserver2008? I want to write a .net module that calls the query which uses quad tree so that i can retrieve the objects...
It is my day for weird errors. I use a database project and as a part of Post Deployment, we use SQL Scripts to populate data in our tables. alter authorization on database::atlas to sa; go ALTER DATABASE ATLAS SET MULTI_USER WITH ROLLBACK IMMEDIATE; GO :r C:\Scripts\Script.DisableTriggers.sql :r C:\Scripts\dbo\Script.dbo.PaymentMeth...
In sql server 2005, i in the query builder, i select "Add group by" to automatically add the group by clause to all of the fields i selected. If one or more of those fields are a bit type, i get an error. Why is this? Is casting the column to TINYINT a good fix? ...
I'm not responsible for this design, but I've have to extract data from this schema that looks something like this (SQL Server 2000): CREATE TABLE contract ( contract_id int, account_id int, /* account table */ responsible_id int, /* account table */ holding_id int, /* account table */ billingaddress_id int, /* address tab...
I have a query containing three inner join statements in the Where clause. The query takes roughly 2 minutes to execute. If I simply change the order of two of the inner joins, performance drops to 40 seconds. How can doing nothing but changing the order of the inner joins have such a drastic impact of query performance? I would have th...
I'm trying to find duplicate "keys" so that they can be addressed and made into proper, unique keys. I recently learned that a HAVING clause can filter the results of an aggregate query by targeting the results of a GROUP BY. You GROUP BY the alleged "key" and HAVING where the count is > 1, and there are your problem rows. My question ...
What are good sizes for data types in SQL Server? When defining columns, i see data types with sizes of 50 as one of the default sizes(eg: nvarchar(50), binary(50)). What is the significance of 50? I'm tempted to use sizes of powers of 2, is that better or just useless? Update 1 Alright thanks for your input guys. I just wanted to know ...
I am in the process of retiring legacy Microsoft SQL Servers and I have an opportunity to retire one of my existing SQL servers, SQL Server X, if I migrate the remaining databases on it to another server, SQL Server Y. Unfortunately, there are still numerous undocumented processes that reference SQL Server X that I cannot afford to brea...
Can you create a unique identifier in Excel 2007. I'm looking for the same value generate by the SQL Server function newid(). Thanks ...
I need to create a table variable with an identity seed that starts with the max value of a field in another table? I've tried this: DECLARE @IdentitySeed int SET @IdentitySeed = (SELECT MAX(HHRecId) +1 FROM xxx ) DECLARE @HH TABLE ( HHId INT IDENTITY(@IdentitySeed,1) ,AddressType CHAR(1) ,Address1 VARCHAR(100) ,City ...
I'm adding a field to a member table for twitter names for members on a site. From what I can work out the maximum twitter name length is 20 so it seems obvious that I should set the field size to varchar(20) (SQL Server). Is this a good idea? What if Twitter starts allowing multi-byte characters in the user names? Should I make this f...