Viewing 15 posts - 3,106 through 3,120 (of 3,606 total)
When you use a UNION clause it does an implicit SELECT DISTINCT.
If your two selects produce completely different records then change the UNION to UNION ALL.
Also, qualify the multiid in...
July 21, 2004 at 1:57 am
Just curious, why don't you have AND Shifts.dtShiftdate < GETDATE()-1 in the first query when you have it in the 2nd?
July 21, 2004 at 1:48 am
I would also go for the backup/restore method but make sure that you transfer logins first, otherwise you will get broken users.
If your two servers have different sort orders, code...
July 21, 2004 at 1:44 am
If you have a view then you can only use ORDER BY statements if you use the SELECT TOP 100 PERCENT version.
July 21, 2004 at 1:40 am
Personally I am not ecstatic about anything that involves coding logins and passwords into stored procedures.
If you use sp_helptext on a stored procedure you get all the code for the...
July 21, 2004 at 1:26 am
You need all of them.
If you don't know what the structure is i.e. is notify_level_eventlog an int, smallint, byte it doesn't matter because SQL is intelligent enough to do an...
July 20, 2004 at 8:17 am
I forgot to add, your temporary table structure has to match the sp_help_job returned recordset structure.
July 20, 2004 at 7:54 am
sp_help_job is in the msdb database therefore change you statement to
insert #tblJob (job_id, current_execution_status)
exec msdb.dbo.sp_help_job @job_name='jobname', @job_aspect='JOB'
July 20, 2004 at 7:51 am
I think you mean SELECT INTO.
I don't know because SELECT INTO is on my list of "avoid like plague" constructs.
It has huge performance overheads which is why I never use...
July 20, 2004 at 7:12 am
I seem to remember that Steve or Andy had a problem where accessing the first 9000 rows of a table was OK, but anything after that produced errors.
The solution was...
July 20, 2004 at 6:09 am
If you know the structure of the recordset returned by a stored procedure then you can build a temporary table of the same structure.
For example, let us suppose that my...
July 20, 2004 at 6:06 am
You can't write extended stored procedures with VB.
They require specific function calls that are not supported in VB.
The last time I checked C++ and Delphi were the main languages for...
July 19, 2004 at 1:45 am
Look on the bright side guys, we have to put up with Tony Blair.
July 19, 2004 at 1:30 am
CAST and CONVERT cause syntax errors in Index Server.
Index server SQL looks like "proper" SQL, but as I said, it seems to leave out all the useful bits!
July 15, 2004 at 7:11 am
If you look on the Microsoft SQL Server site you will see that there is a books on-line update dated January 2004.
You can tell if you need the update by...
July 15, 2004 at 1:56 am
Viewing 15 posts - 3,106 through 3,120 (of 3,606 total)