Can someone tell me why I get error:
Msg 207, Level 16, State 1, Procedure ExtractPDP4FromPDP, Line 21
Invalid column name 'ContainsEX'.
when executing the following stored procedure.
CREATE PROCEDURE ExtractPDP4FromPDP
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result se...
Hi all,
I've been trying to import a table from oracle 10g into SQL Server 2005 using the task import wizard and i keep getting this error:
- Copying to [PersonDB].[PEOPLE] (Error)
Messages
Error 0xc0202009: Data Flow Task: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is avai...
Here's the scenario: I'm an SSIS virgin, but I found an excuse to start playing with it. I have a single Excel source dataset in the following format, with each row representing one month (the last day of the month):
[Date] [Value]
4/30/2008 3.38
5/31/2008 3.65
6/30/2008 3.97
...
My destination is a table that has a ro...
Hi,
Is it possible to install sql server 2005 express and sql server 2008 developer edition in one machine ?
Any gotchas ?
Michael
...
I'm running a query that is timing out for first two times and returning results on the third time.
How do I tell SQL Server to wait until the query is completed instead of timing out?
...
I've got a situation like this:
Table: FunTable
ItemKey.....ItemName.....ItemPriceEffectiveDate....ItemPrice
11.....ItemA.....6/6/2009.....$500
12.....ItemA.....6/15/2009.....$550
13.....ItemA.....9/9/2009.....$450
14.....ItemB.....3/9/2009.....$150
15.....ItemB.....9/9/2009.....$350
I need to do the following:
Select
ItemName as It...
We have an application built on top of SQL server 2005 that we have no control over. We've recently discovered that this application is sending some very inefficient SELECT queries to SQL that is causing serious capacity issues on the database. I know the right solution is to crack open the code for the application and change the queries...
I'd like if its possible to work out from inside sql server how long sql server has been running.
Would like to use this in conjunction with one of the DMV's for unused indexes, but the couters are re-set every time sql server loads, so I'd like to know how useful they're going to be.
...
i installed sql server in my home pc for personal use. When i planned to configure sql server through Surface Area configuration, i got one error like this : "Could not load file or assembly 'microsoft.sqlserver.customcontrols, version= 9.0.242..0, culture = neutral, Publickeytocken = 89845dcd8080cc91' or one of its dependancies. The Sys...
I'm trying to switch the current database with a SQL statement.
I have tried the following, but all attempts failed:
USE @DatabaseName
EXEC sp_sqlexec @Sql -- where @Sql = 'USE [' + @DatabaseName + ']'
To add a little more detail.
EDIT: I would like to perform several things on two separate database, where both are configured with a...
SQL Server 2005 - How can I save the results of a query to a text file programatically? (i.e without choosing the Results to file option in Analyzer and not through sql command)?
For example
select * from northwind.dbo.suppliers
And I save my results to CSV file?
...
I tried this:
INSERT INTO tbl_vaucher
(
vaucher_name,
created_date
)
VALUES (
( SELECT TOP 1
con_full_name
FROM tbl_contact
),
GETDATE()
)
, getting: Subqueries are not allowed in this context. Only scalar expressions are all...
How do you find current database's transaction level on SQL Server?
...
I have a table in which I have among other things, two columns, one for start date and another for end date. I need to write a query which will return a column for each month of the year and the value of that column is 1 if the month is between 0 otherwise. The PIVOT statement seems to be what I am looking for here, but from the best I...
I have an expensive query using the row_number over() functionality in SQL Server 2005. I return only a sub list of those records as the query is paginated. However, I would like to also return the total number of records, not just the paginated subset. Running the query effectively twice to get the count is out of the question.
Sele...
Given a table:
create table #orders (
orderid int,
orderdatetime datetime
)
What is the best way to write sql to output a report containing the count of orders from the current and previous 24 hours, total orders for the current day and previous 7 days, total orders for the current week and previous 4 weeks, and total orders f...
I have a string '2009-06-24 09:52:43.000', which I need to insert to a DateTime column of a table.
But I don't care about the time, just want to insert it as 2009-06-24 00:00:00.000
How can I do that in T-SQL?
...
Hi.
I have a site with a SELECT statement like this:
SELECT * FROM MyTable WHERE MyDate >= GETDATE()
I have a record with the value 6/24/2009 9:00:00 AM to MyDate field.
When the user visit this page in 6/24/2009 before 9:00:00 AM, this record is shown. But when the user visit this page in 6/24/2009, but after 9:00:00 AM, the SELECT...
I have modified a stored procedure today but after that I realised that it is wrong. So I want revert it back. Is there any way to get the previously modified stored procedure or else last date's stored procedure.I dont have any back up also. pls reply soooooon.
Thanks n regards.
Imthiyaz
...
In an Access Project (ADP), with a SQL backend, what are the minimum permissions required for Access to be able to update records returned from a view bound to a form, yet prevent a direct SELECT on the underlying table? For instance:
Table: Table1
Columns: ID, Column1, Column2, Column3, Column4
View: View1
SELECT ID, Column1, Column2...