Viewing 15 posts - 2,686 through 2,700 (of 7,191 total)
I don't really know what to suggest, then. Are you running the stored procedure with parameters, and if so, what parameters? Have you tried running the code in...
April 12, 2016 at 6:01 am
What's happened to your PRINT statement?
If I were you, I would take this opportunity to terminate all statements with a semi-colon - there'll come a day where unterminated statements are...
April 12, 2016 at 4:56 am
The statement before the MERGE statement is required to be terminated with a semi-colon.
John
April 12, 2016 at 4:00 am
It's the old-style join syntax. These two are equivalent:
...
FROM TableA, TableB
...
FROM TableA CROSS JOIN TableB
... as are these two:
...
FROM TableA, TableB
WHERE TableA.ID = TableB.ID
...
FROM TableA INNER JOIN TableB
ON TableA.ID...
April 12, 2016 at 3:58 am
wrightyrx7 (4/12/2016)
Is it possible to make the DepartmentCode the Primary Key?
No, a primary key is a property of the table, not of a particular query that you execute against the...
April 12, 2016 at 2:59 am
It all depends on your data and your hardware. Are the drives on separate physical disks? Do you have tables or structures that are frequently accessed at the...
April 11, 2016 at 9:41 am
SELECT TOP 10000 CAST(RAND(CHECKSUM(NEWID())) * 100000000000 + 700000000000 AS bigint)
FROM sys.all_columns c1
CROSS JOIN sys.all_columns c2
Make sure you have a unique or primary key constraint on the column that you insert...
April 11, 2016 at 7:40 am
If you click on the items that failed, you'll see more information in the Details pane. There'll be even more information in the log file, a link to which...
April 11, 2016 at 3:58 am
Restore the database to a test server, then compare how long it takes to shrink down to your target size in one go versus how long it takes doing it...
April 11, 2016 at 3:23 am
What adverse impact do you expect it to have on the application? Do it at a quiet time, and you shouldn't have any problems.
John
April 11, 2016 at 2:57 am
Something like this?
select
sc.scholarship_category
,COUNT(s.scholarship_id) as [No of applicants]
,COUNT (distinct d.student_fullname)
from Students s
join Students_Scholarships_junction ss on ss.student_pk = s.student_pk
join Scholarships sc on ss.scholarship_id = sc.scholarship_id
join Defaulters d on s.student_pk = d.Dstudent_pk
where...
April 11, 2016 at 2:21 am
SQL Browser runs per server, not per instance, and it only works for named instances. Therefore, if you have any default instances that don't run on the default port,...
April 8, 2016 at 2:52 am
Those square brackets that you copied from Books Online mean that the parameter is optional. You're not meant to leave them in your code.
For the other errors, double-click on...
April 7, 2016 at 8:59 am
Yes, it is an old post. Far better to start a new topic.
Luis is right - it doesn't make sense to shell out to a command line and then...
April 7, 2016 at 8:09 am
In your execution plan, you've got some very large discrepancies between the estimated rows and the actual rows. Are your statistics up to date? You might also consider...
April 7, 2016 at 7:51 am
Viewing 15 posts - 2,686 through 2,700 (of 7,191 total)