Viewing 15 posts - 3,136 through 3,150 (of 5,588 total)
Add an Execute SQL Task to get the value from the database.
Put this value into a variable.
Add a For-Each Loop container.
Double-click the For-Each Loop container.
Click on the Collection tab.
In the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 17, 2010 at 7:07 am
Steve Jones - Editor (9/14/2010)
- he was abused
- I contributed to the abuser by pointing...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 17, 2010 at 6:59 am
Yes, like that.
AND PM1.PM70.Projects.Project_Manager = (case when @PM is null then PM1.PM70.Projects.Project_Manager
else CHARINDEX( '~' + PM1.PM70.Projects.Project_Manager + '~', @PM) > 0)) end)
Okay, this looks like a where clause?
Lining it up...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 4:20 pm
If you're trying to find @PM in PM1.PM70.Projects.Project_Manager, then @PM needs to be the first parameter in CHARINDEX, not the second.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 3:51 pm
there are also:
dbo.sysmail_faileditems
dbo.sysmail_sentitems
dbo.sysmail_unsentitems
Umm... can you guess what they might be showing?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 3:48 pm
CREATE PROCEDURE DBO.GPM_SAFETY_INSPECTION_LOAD_INSPECTION(
@LOCATION VARCHAR(50),
@EMPLOYEE VARCHAR(50),
@DATE VARCHAR(10))
AS
DECLARE
@COUNT INT,
@QUARTER INT,
@MONTH INT
SELECT @MONTH = MONTH(GETDATE())
SET @QUARTER = DatePart(quarter, GetDate())
SELECT
@COUNT = COUNT(*)
FROM
GPM_SAFETY_INSPECTION
WHERE
SLOCATION...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 3:42 pm
GilaMonster (9/16/2010)
Craig Farrell (9/16/2010)
@Gail: Trial by fire much?
Actually no. In last 5 years I've had:
- One database with corrupt log that required a restore
- One very long restart/recovery (12 hours)...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 3:23 pm
Craig Farrell (9/16/2010)
WayneS (9/16/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 3:22 pm
if you want to do this at run-time, you'll need to add a parameter (@Proc_ID int), and when calling the procedure pass in @@PROCID.
You can then
select object_name(@Proc_ID)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 3:17 pm
You know, the people that help out here are all un-paid volunteers, so please HELP US HELP YOU. Providing the DDL scripts (CREATE TABLE, CREATE INDEX, etc.) for the tables...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 3:08 pm
Here's one way to accomplish this:
-- See how this starts off with a table and data in it?
-- If you had provided us the data in this format,
-- it...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 2:59 pm
GilaMonster (9/16/2010)
p.s. As for insider knowledge, does mail contact with the SQL dev team count?
Yes, it sure would! (just not as convenient as personally knowing it...)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 2:34 pm
What are the sizes of your user database files (mdf, ldf)?
Depending on the size, some of the earlier suggestions may not help much. And, depending on the size, they may...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 2:28 pm
You know, I feel for both Gail and the OP here. I think the OP is under a lot of pressure and getting desperate to fix it. And Gail, of...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 2:20 pm
Ninja's_RGR'us (9/16/2010)
But I'd still listen to Gail on this one...
If I had any database problem, I'd be following every single word that Gail says concerning it to the "T".
@hallhome -...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2010 at 2:15 pm
Viewing 15 posts - 3,136 through 3,150 (of 5,588 total)