Forum Replies Created

Viewing 15 posts - 5,311 through 5,325 (of 5,393 total)

  • RE: Force Query timeout

    This is something you have to set on the client side. If you are working with ADO, try setting the CommandTimeout property.

    Regards

    Gianluca

  • RE: SQL locking and unlocking a row

    I think you are trying to use a table to store some kind of progressive number incremented by every call to some kind of procedure, am I wrong?

    If so, UPDATE...

  • RE: Trigger

    So try joining INSERTED, or you'll be updating the whole table. You can use the code I put in my previous post replacing [PrimaryKey] with the actual primary key of...

  • RE: Howto: Backup from remote server and store file on local drive?

    From BOL:

    Backing Up to a File on a Network Share

    For SQL Server to access a remote disk file, the SQL Server service account must have access to the network share....

  • RE: Trigger

    I don't see references to the INSERTED table: try adding the join.

    ALTER TRIGGER [dbo].[CC_TR_CANDIDATE_PF] ON [dbo].[CANDIDATE]

    FOR UPDATE

    AS

    BEGIN

    IF UPDATE(CUR_STAGE)

    ...

  • RE: Alias Field names in table

    You can deny privileges to the users on the columns you don't want them to see:

    DENY SELECT ON OBJECT::dbo.myTable(columntToHide) TO [LowPermissionUser]

    Obviously they won't be able to issue statements like SELECT...

  • RE: Alias Field names in table

    You could also achieve it by creating a table for the 3rd party software and adding a trigger instead of insert/update that populates your table.

    Of course it would work for...

  • RE: Alias Field names in table

    Ok, so do the contrary: use a table for 3rd party sw, and a view for your querying.

  • RE: Alias Field names in table

    Use a view:

    Example:

    Table with your column names:

    CREATE TABLE Orders (

    ID int,

    customerID char(100)

    )

    View with different column names:

    CREATE VIEW LinkedOrders

    AS

    SELECT ID AS OrderNumber,

    customerID AS...

  • RE: Troublesome Update statement

    You're not updating the results of you join statement, but you're updating one of the tables. Maybe your join statement doesn't match exactly one record from the first table with...

  • RE: performance tuning question

    Personally I prefer looking at the query plan. Whenever I find a scan, I try to change it to a seek with the appropriate indexes. This depends on the arguments...

  • RE: A sproc

    You're missing some commas between the parameters declaration.

    CREATE PROCEDURE SearchFlightByCities

    (

    @startingFrom nchar(33) ,

    @destination nchar(33) ,

    @RowNum int )

    ...

  • RE: Can I push an Index hint down into a base tables from a view

    Have you tried some kind of query refactoring to force the query optimizer to do what you expect?

    Sometimes the same query with a different syntax takes a different query plan...

    select...

  • RE: Email Notifications

    I call database mail in a separate step as well, I find it being the simplest way.

    If it works, don't touch it! 😉

  • RE: Can I push an Index hint down into a base tables from a view

    I would never mess with index hints, let MSSQL choose the best plan for you.

    Try updating statistics: poor query plans are often due to outdated statistics or bad indexes.

Viewing 15 posts - 5,311 through 5,325 (of 5,393 total)