Viewing 15 posts - 5,116 through 5,130 (of 5,590 total)
Dave, you are actually pretty close.
Instead of using EXEC(), use sp_executesql. This will allow you to pass in the appropriate parameter also - see BOL for how to do this.
In...
July 1, 2009 at 8:36 am
Dave Ballantyne (7/1/2009)
My personal option would be
DECLARE @Date1 DATETIME, @Date2 DATETIME, @Date3 DATETIME, @Date4 DATETIME
SET @Date1 = '1991/06/01'
SET @Date2 = '1991/06/29'
SET @Date3 = '1991/08/01'
SET @Date4 = '1991/09/04'
;with CteDates(Dates) as
This...
July 1, 2009 at 8:32 am
GilaMonster (7/1/2009)
WayneS (7/1/2009)
Which brings up some questions:1. What difference does it make what version a server is on for Intellisense to work?
Valid T-SQL constructs.
Good point Gail. So much of what...
July 1, 2009 at 8:26 am
raghu (7/1/2009)
Set ER.[Part] = SUM(CAST(PT.[PREM] AS money)*Cred.CreditSigned / 100)
FROM Requests ER JOIN tblBuyinPtB Pt
ON ER.[SSN] = PT.[BOSSN] JOIN dbo.tblCredit Cred
ON ...
July 1, 2009 at 8:13 am
GSquared (7/1/2009)
July 1, 2009 at 7:36 am
GilaMonster (7/1/2009)
July 1, 2009 at 7:27 am
Chris Howarth (7/1/2009)
Nice idea.An alternative is to use SSMS 2008's in-built data scripting functionality:
http://www.sqlskills.com/BLOGS/PAUL/post/Scripting-schema-AND-data-with-SSMS-in-SQL-2008.aspx
Chris
I just love it when I start the day off learning something new. With this link, and...
July 1, 2009 at 7:01 am
vinaykumar.bommareddy (6/30/2009)
Hi,i want script to notify when any opentransctions running more than 30 seconds.
I'd suggest setting up an alert.
Under Object, select :Transactions
Under Counter, select Longest Transaction Running Time
Under Alert if...
June 30, 2009 at 9:50 pm
Nardig (6/30/2009)
Yes the text file looks like this1,'John','Smith','Washington'
2,'Nick','Smith','London'
3,'blabla','blabla','blaa'
.
.
.
this text contains 1200 records
Check out Books-Online (BOL) for "BULK INSERT". If your destination table has additional columns, you may need a format...
June 30, 2009 at 9:43 pm
SimonH (6/30/2009)
IF EXISTS( SELECT [name] from tempdb..sysObjects WHERE [name] ='#Store' and xtype ='U')BEGIN
DROP TABLE #Store
END
Simon,
Just as an FYI, this is not the correct way to check for a temp table....
June 30, 2009 at 9:38 pm
arun.sas (6/30/2009)
pat (6/30/2009)
how can i get report to get row count for all tables in database
Hi,
Try Another method
USE DB
GO
SELECT
a.name, object_name (i.id) TableName, rows as RowCnt
FROM sysindexes i INNER JOIN sysobjects...
June 30, 2009 at 9:34 pm
Gianluca Sartori (6/30/2009)
... and tomorrow I'm taking my wife to the hospital for the birth of my first daughter: I think I'll be even busier from now on!!
Congratulations! I...
June 30, 2009 at 4:44 pm
Florian Reischl (6/30/2009)
WayneS (6/30/2009)
Florian Reischl (6/30/2009)If you have any questions, feel free :-). .NET development is the main part of my job.
My sympathies are extended to you...
I'm not sure if...
June 30, 2009 at 4:42 pm
Florian Reischl (6/30/2009)[hrIf you have any questions, feel free :-). .NET development is the main part of my job.
My sympathies are extended to you...
June 30, 2009 at 3:33 pm
Paul White (6/30/2009)
WayneS (6/29/2009)
Hey gang... I'm looking to take "She who must be obeyed" (in this case, both my wife and mother... )
When I first read that, it sounded like...
June 30, 2009 at 3:21 pm
Viewing 15 posts - 5,116 through 5,130 (of 5,590 total)