Viewing 15 posts - 316 through 330 (of 485 total)
You should also be passing your variable into the dyanmic SQL i.e
set @sql='select t.AdvertiserID,(select Name from dbo.[States] where ID=t.State) as StateName,t.Slot,
a.FullName,a.City
from TopReplacement t inner join Advertisers a
on t.AdvertiserID = a.ID
inner...
November 1, 2002 at 3:34 pm
I think your not realting your sub query to your main query. try this
SELECT
P1.FirstName,
P1.LastName,
P1.PersKey,
EncCOunt.count_
FROM Person P1
JOIN (SELECT Encounter.OwnedBy_EmpPersKey AS PersKey,
...
November 1, 2002 at 3:20 pm
Or both for a carriage return line feed (needed for notepad in NT)
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
November 1, 2002 at 3:20 pm
Just caught onto this thread and not sure if this has already been said but you should never reference a table from an outer join in a where clause, except...
November 1, 2002 at 3:11 pm
You could use the FOR command in DOS, this will loop though a list of files, and execute some dos commands to insert the data, bcp is only a little...
November 1, 2002 at 3:03 pm
You can remove it but you will probably want to add another nt group that are you sql server admins. (especially if you forget the sa password, if using mixed...
November 1, 2002 at 3:01 pm
What makes you think its been running for 200 hours?
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
November 1, 2002 at 2:55 pm
Deadlocks are different to lock tinmeouts. A deadlock is where 2 processes have locks that are stopping each other from proceeding, and so one has to be killed. The lock...
November 1, 2002 at 2:54 pm
Could be that the SQL Agent couldn't log into the database (msdb). This is either a standard or trusted connection. Does the SQL Agent error log say anything
Simon Sabin
Co-author of...
November 1, 2002 at 2:50 pm
You always have to start from a backup i am afraid
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
November 1, 2002 at 2:45 pm
Excuse this comment but are you sure you have space on the disk that the database is on. I know people assume it is the database they are working in...
November 1, 2002 at 2:43 pm
Can you not divide the cpu time by actual duration by the number of processors? This should give you the number you want
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
November 1, 2002 at 2:36 pm
If you are using ADO you will have to increase the command timeout on the command object.
From experience it is best to insert data in bacthes of ~ 2000. So...
November 1, 2002 at 2:34 pm
You need to decide costs and look at the options, and the acceptable downtime and data loss.
Simplest.
Backup to tape periodically
On Failure restore to standby server.
Next step
Backup db and logs
and...
November 1, 2002 at 2:31 pm
You can't a foreignb key has to reference a unique record in the parent table and so must reference all columns that make the primary key or unique constraint
Simon Sabin
Co-author...
November 1, 2002 at 2:18 pm
Viewing 15 posts - 316 through 330 (of 485 total)