That error occurs in a SELECT … INTO statement, when your query returns more than one row. Check your where clause, and make the necessary changes in order to ensure just 1 row is returned. There is a predefined exception for that error. It is: too_many_rows. If you know your query could return more than [...]
View Answer | April 19, 2013 8:58 PM
INSERT statement, ORA-01422, Oracle development, Oracle error messages, PL/SQL error messages, SELECT statement
You will probably want to migrate the process that was used on the SQL 2000 server to encrypt and decrypt the data as well until you can get the navive SQL 2008 encryption/decryption working correctly. You may need to decrypt your data and reencrypt your data if the SQL 2008 native encryption doesn’t support the [...]
View Answer | January 7, 2009 8:53 PM
SQL Server 2000, SQL Server 2000 encryption, SQL Server 2000 migration, SQL Server 2008, SQL Server 2008 encryption, SQL Server migration
The basic rule of thumb is to never use a cursor. Its not because of a memory leak, as there isn’t one; there is a performance issue with using cursors. SQL Server handles its data in recordsets. It is designed to more efficiently process data in recordsets than row by row. In the case of [...]
View Answer | January 7, 2009 8:49 PM
SQL, SQL Cursors, SQL scripts, T-SQL
There are several methods you are use. The easiest and most common would be to open the SQL Server Management Studio on the server or your workstation and open the file in that. This is the native editor for editing SQL Server scripts. Then click on the Execute button at the top, or press the [...]
View Answer | January 7, 2009 8:28 PM
SQL Server 2005, SQL Server Scripts
Instead of giving them restore rights you should restore the database for them. This way the database schema will be exactly the way it is in production.
View Answer | January 7, 2009 5:30 AM
SQL Server 2005, SQL Server databases, SQL Server Table Migration, SQL Server tables
What do you mean by datatypes from stored procedures?
View Answer | January 7, 2009 5:28 AM
SQL 2000, SQL stored procedures, SQL tables, Stored Procedures
Check out the Microsoft site on <a href=”http://www.microsoft.com/sqlserver/2008/en/us/default.aspx”>SQL 2008</a>. I think you can find all the information you need there.
View Answer | January 6, 2009 2:27 PM
SQL, SQL Anywhere Studio, SQL Anywhere Studio/M-Business Anywhere/Avantgo, SQL Server 2005, SQL Server 2008, SQL Server security
Create a second destination. Click on the source, and grab the red arrow and connect it to the second destination. When the window opens change the columns that you want to trigger a redirection to redirect row.
View Answer | January 5, 2009 2:28 AM
SQL Server 2008, SQL Server 2008 Integration Services, SQL Server Integration Services, SSIS
What sort of transaction load are you expecting on this system? This is a very large hardware setup. Instant File initialization will increase the load on your disks while data is being written to new data pages as the pages have to be initialized before the data is actually written to the disk. Read Committed [...]
View Answer | January 3, 2009 11:45 PM
OLAP/OLTP, SQL 2005 Database design, SQL queries, SQL Server 2005 Enterprise Edition
Deleting the post from someone else since the solution was to add more disk space, and we resolved this in early December.
View Answer | January 1, 2009 9:32 PM
Backup to Disk, SQL Server 2005, SQL Server 2005 backup, SQL Server 2005 maintenance, SQL Server administration, SQL Server backup, SQL Server maintenance
Have you tried detaching the database from the 7 version, copying them to the 2005 version location and then attaching?
View Answer | December 31, 2008 12:26 PM
SQL Server 2005, SQL Server 7.x, SQL Server migration
I doubt that you need to do any conversion. Phil
View Answer | December 30, 2008 5:40 PM
AS/400, SQL Server
This sample code explains you how you can store images in SQL Server database. It uses ADO.Net System.Data.SqlClient namespace. Images can be stored in sql server using Sql parameters. How to Store Image in SQL Server table To store an image in to sql server, you need to read image file into a byte array. [...]
View Answer | December 30, 2008 1:26 PM
SQL Server 2005, VB.NET
There is no easy way to go back from SQL 2005 to SQL 2000. You will need to restore your most recent SQL 2000 backup, then manually move the data from the SQL 2005 server to the SQL 2000 server.
View Answer | December 30, 2008 3:08 AM
SQL Server 2000, SQL Server 2005, SQL Server migration
The Northwind database is the sample database for SQL Server 2000 and older. In SQL Server 2005 Microsoft removed the Northwind database and created the AdventureWorks database. Both can be found on <a href=”http://www.codeplex.com”>www.codeplex.com</a>.
View Answer | December 30, 2008 2:10 AM
Northwind sample database, SQL Server 2005
An index is an object in the database which contains one or more columns from a single table. The data within the index is sorted which makes it much faster to search than searching the table it self. There are a couple of blog posts which I’ve made about indexes. <a href=”http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-whats-the-difference-between-a-scan-and-a-seek/”>What’s the difference between [...]
View Answer | December 30, 2008 2:08 AM
Abstracts, Indexes, SQL Server
This is rather clever. I think you were missing a ‘b’ select * from emp a where 5= (select count(distinct sal) from emp b <– this was missing? where a.sal>=b.sal) Here is how it works .. taking some simple numbers 15 , 12 , 10 ,9 ,7 ,4 ,2 This matches the table with itself [...]
View Answer | December 29, 2008 10:21 PM
SQL Server, SQL Server Query
declare @bcp as varchar(200) set @bcp = ‘bcp DBname.dbo.tablename in \serverfilepathtmpTestFile.txt -c -t : -r # -Sserver -Ulogin -Ppassword exec master..xp_cmdshell @bcp bcp needs full path to table and doesn’t like ##temptables switches Field terminator -t Row terminator -r
View Answer | December 29, 2008 3:05 PM
BCP Utility, SQL, SQL 2005
You could setup a job to email the ERRORLOG file to yourself yes. Use the sp_send_dbmail procedure to send yourself an email. Not sure why you would want to, error logs are usually easier to read in SSMS, and most companies will block emails over a Meg or two and the errorlog can get very [...]
View Answer | December 23, 2008 10:49 PM
SQL Server Management Studio, SQL Server Management Studio Logs
If you are passing the procedure a table name it should give you back a single row for each user and each right granted to the table. Can you post the code that you are running? We are having the same problem, and the reason is that we’ve removed select permission on one column in [...]
View Answer | December 23, 2008 6:27 AM