Forum Replies Created

Viewing 15 posts - 2,686 through 2,700 (of 7,191 total)

  • RE: Stored proc problem

    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...

  • RE: Stored proc problem

    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...

  • RE: Stored proc problem

    The statement before the MERGE statement is required to be terminated with a semi-colon.

    John

  • RE: Master.dbo.SysColumns

    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...

  • RE: Assign Primary Key to existing field in a View/Query?

    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...

  • RE: Hard disk space and moving/transferring files

    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...

  • RE: Create 10,000 12 digit random numbers - starting with the number 7

    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...

  • RE: Error installing SQL Server Database Engine Services Instance Features Invalid command line argument.

    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...

  • RE: Production DB size issue

    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...

  • RE: Production DB size issue

    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

  • RE: how to combine results of these two queries?

    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...

  • RE: Having to specify a port number...

    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,...

  • RE: CONCAT

    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...

  • RE: Msforeachtable

    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...

  • RE: Differences in run time for same query

    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...

Viewing 15 posts - 2,686 through 2,700 (of 7,191 total)