Viewing 15 posts - 7,786 through 7,800 (of 9,644 total)
This is how I'd do it:
[font="Courier New"]CREATE PROCEDURE [dbo].[sp_CheckAndUpdateWinner]
@Time smalldatetime,
@Date smalldatetime,
@ContestantKey INT,
@randomWinningmomentKey INT output
AS
DECLARE @TheKey INT
SELECT TOP 1
@TheKey = RandomWinningMomentKey
FROM
RandomWinningMoments WITH(updlock)
WHERE
HasBeenWon = 0 AND
Drawingdate = @Date...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 5:10 pm
I really want to help but I can't unless you answer these questions:
agencies(agencyname, sponsorname)
sponsors(sponsorname)
What are the relationships between...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 1:47 pm
If you find anything interesting please post back here.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 1:38 pm
You can also change the VB code to pass in nulls for those parameters, but what you are doing works.
You don't mention if you corrected the issue(s) in the WHERE...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 12:52 pm
GSquared (8/21/2008)
I always thought of the procedure's beginning as the keyword "as" after the create statement and any parameters. Following "as" with "begin" always seemed redundant to me.
This is...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 12:10 pm
I wouldn't say that there is anything wrong with it. I'd do it something like this:
[font="Courier New"]YEAR(GETDATE()) - YEAR(birthdate) - CASE
WHEN MONTH(GETDATE()) < MONTH(birthdate) THEN 1
WHEN...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 10:30 am
Can you post the backup command you are running? Obviously you can change names if necessary.
Also, what is the error you are getting?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:59 am
I have solved many problems by walking to a co-workers desk and asking them what they think and by the time I'm done explaining I have found a solution. ...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:31 am
That would make sense since Database Mail is smtp and SQL Mail used MAPI and was connected to your Exchange Server using Outlook.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:27 am
Assuming that you are scheduling these backups does the SQL Agent Service account have rights to the share?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:26 am
That's an interesting question because it depends on what you expect row 10 to be. SQL does not guarantee order unless you specify an ORDER BY. In most...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:20 am
Here is the best way I have found to use smtp in SQL Server 7, 2000. Download, install, and use xp_smtp_sendmail. Here's the link:
http://sqldev.net/xp/xpsmtp.htm
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:06 am
To backup to the network you should use UNC paths (\\server\share) not mapped drives. Drives aren't mapped unless you are logged in to the console so SQL Server never...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:04 am
Why can't you run a server-side trace? The impact is minimal if you limit events and columns returned and put a filter on.
You could also put a RaisError() with...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 6:54 am
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D Description:
"Login failed for user 'Sev1\STERM2$'
I think that is the key line in the error...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 6:45 am
Viewing 15 posts - 7,786 through 7,800 (of 9,644 total)