Viewing 15 posts - 406 through 420 (of 458 total)
You've got a couple of problems here... your initial IF NOT EXISTS will successfully run the follow-up query only if there are NO records at all in AP_Job_Cost_Security22. ...
May 30, 2006 at 3:02 pm
It's not as clean but you might try instead of using DBDDBC using backticks to execute command-line sqlcmd... I've experimented with the sql...
May 26, 2006 at 12:40 pm
It depends really... if I don't have very complex needs for maintenance on the server, I'll use a maintenance plan. If I want something a little more fine-tuned...
May 25, 2006 at 7:30 pm
As far as mailing goes, I've had some success using XP_SMTP (http://sqldev.net/xp/xpsmtp.htm) instead of SQL Mail. Usually if I have a job with 3 steps, I'll add a 4th...
May 25, 2006 at 11:34 am
You need to use dynamic SQL, it won't automatically parse your table name in.
create procedure set_interface_flag
@lnkey varchar(20),
@Tname varchar(25),
@fname varchar(25)
as
declare @sql nvarchar ( 4000 )
set @sql = 'update ' + @Tname...
May 24, 2006 at 12:12 pm
Try this:
INSERT INTO SalesPerson (userName, CompanyId)
SELECT 'Hank', Id
FROM SellingCompany
WHERE CompanyName='Austin West-Side Lyncanthropic Association'
That will be fine so long as you don't have multiple Austin West-Side Lycanthropic Association values in SellingCompany.
May 19, 2006 at 6:12 pm
If you want to put it on the same physical box you'll need to probably install a second instance. When you go through the SQL installation process, it will...
May 19, 2006 at 12:02 pm
Hmm... it ate my first response, let me try again (shorter version):
EXEC() pulls out your dynamic SQL into a seperate context for execution. So things you declare in this...
May 19, 2006 at 10:21 am
could use COUNT_BIG()
SELECT COUNT_BIG(*) FROM table
May 18, 2006 at 3:45 pm
I think the point of the question is that in 2005 maintenance plan tasks are executed all at once (though individual steps can be performed sequentially) based on a single...
May 18, 2006 at 10:16 am
The easiest way in my opinion would be to probably use two seperate derived tables. Derive them from BarCollectionTransactions each with the data you need.
Something like:
SELECTins.InsuranceGroupID as InsGroupID, bct_day.Date,...
May 17, 2006 at 2:29 pm
I've seen it done by inserting all the data into a global temporary table (## prefix) like this:
CREATE TABLE ##tmp_table (
id_field INT IDENTITY(1,1)
,column1VARCHAR ( 50 )
,column2 VARCHAR ( 50 )
)
INSERT...
May 15, 2006 at 3:59 pm
If you're trying to do it the way you describe that could be problemmatic. If you want to pivot data and you're using SQL Server 2005, you want to...
May 15, 2006 at 11:45 am
Just do an ALTER DATABASE mydb SET RECOVERY SIMPLE.
May 15, 2006 at 10:17 am
Viewing 15 posts - 406 through 420 (of 458 total)