Forum Replies Created

Viewing 15 posts - 2,611 through 2,625 (of 7,187 total)

  • RE: Divide two function columns

    In which case, can I borrow your car, please? It doesn't appear to have used any fuel on any of its journeys!

    John

  • RE: T-SQL query error while datetime conversion

    Please will you check - is TableNameT1 actually a table, or is it a view?

    SELECT type_desc FROM sys.objects

    WHERE SCHEMA_NAME(schema_id) = 'dbo'

    AND OBJECT_NAME(object_id) = 'TableNameT1'

    John

  • RE: T-SQL query error while datetime conversion

    Are you saying that when you work with BusinessDate on its own, you don't get the error, but you do when you include other columns in your query? That...

  • RE: Move Systemdatabases

    Yes, the process is different from that for user databases. Search for "moving system databases sql server" and you'll soon find how to do it. I can't see...

  • RE: Using reserved words as column names

    Sergiy (4/28/2016)


    There is nothing wrong with objects or columns named Number, Version, Join, etc.

    The names don't affect performance or quality of the code anyway.

    It's not a bad coding practice either.

    The...

  • RE: Update query problem

    Well, yes - since you've tested in the WHERE clause that that condition is true, you don't need to test again with a CASE expression. But there's no syntax...

  • RE: Update query problem

    Good - does that work now, then? By the way, don't use TOP without an ORDER BY clause, since there's no guarantee which row you'll get.

    John

  • RE: Update query problem

    Probably Zip4 is an invalid column, then. Do you get a similar error for this?

    SELECT TOP 1 Zip4

    FROM TimCIS.dbo.Legis_Districts

    John

  • RE: Find column values based on min and max of other columns

    Thanks Drew. I didn't know that. It doesn't seem to make a difference to the execution plan in this particular case, but I'll certainly bear it in mind...

  • RE: Execute server DTEXEC from a PC

    Well, you did mention SSMS! But anyway, that's easy. Use sqlcmd to call the stored procedure, and wrap that in a batch file.

    John

  • RE: collate error when creating a View

    Presumably the collation of the database you're creating the view on isn't Latin1_General_BIN? I think the easiest way to solve this would just be to put the same COLLATE...

  • RE: rewrite a query

    Don't look at indexed views as panacea to improve performance. If you have a high proportion of write activity to reads, it could make things worse. Instead, consider...

  • RE: Execute server DTEXEC from a PC

    Assuming the server also runs the database engine and that xp_cmdshell is enabled, create a stored procedure that executes the dtexec command, and give him permission to run the stored...

  • RE: Maximum number of concurrent SQL Server Agent

    No, there's no limit, but the more jobs you attempt to run at the same time, the more likely you are to experience concurrency issues (blocking and deadlocks) and contention...

  • RE: rewrite a query

    I don't think there's any easy way round this. As you've seen, there are quite a few constructs that aren't allowed in indexed views. Consider whether you need...

Viewing 15 posts - 2,611 through 2,625 (of 7,187 total)