Forum Replies Created

Viewing 15 posts - 11,551 through 11,565 (of 18,923 total)

  • RE: UDF as Default Attribute Value

    Ya I had forgotten that one.  Looks like you'll have to set the default in the insert procedure, or in a trigger.

  • RE: Indexed VIEWs

    Why do you think you need an indexed view in the first place?

  • RE: Is it possible to schedule a job to run every 10 seconds ??

    Check out sp_update_jobschedule in the books online.

     

    The parameter @freq_subday_type  allows for minutes and hours.  But if you notice, there's a missing value in the list (0x02) which stands for seconds. ...

  • RE: Maintenance Plans ?

    Run a full db backup

    run a transaction log backup

    rerun a full db backup

    run dbcc DBCC SHRINKDATABASE

    then DBCC UPDATEUSAGE

    then exec sp_helpdb 'DbName'

     

  • RE: UDF as Default Attribute Value

    From the top of my head :

    RetierementDate is a smalldatetime column.

    update all the rows to reflect the default retirement date

    then RetierementDate defaults to dbo.Generate_Retire_Date(BirthDate)

  • RE: SP-Param-declaration

    Actually sp_depends is not the best way to do this because it is unreliable.

     

    The safest way to scan for such changes is to look in the syscomments table for the...

  • RE: SP-Param-declaration

    Yup you'll have to update all the objects if you ever change the column size.

    And yes the default size of the varchar() is 1 but it's a best pratice to...

  • RE: Ordering tables

    Primary key : OrderID

    Clustered index : OrderDate

    Indexed column : CustumerID

    The select will still be very fast because an index seek will be performed (followed by bookmark lookup which will cost...

  • RE: SELECT * in a view

    exec sp_refreshview 'dbo.DEMO'

    This will force a recompile of the view definition.

    But it doesn't say anywhere that it recompiles the other objects accessing the view.

    Anyone can confirm this behavior?

  • RE: is the sql server being smart or stupid?

    Maybe you just found the frontier between a correlated subquery and a subquery. Seems to make some sens but I agree that it should somehow error out if there's...

  • RE: Truncating a numeric

    That only truncates the last 0.

    I was thinking about a similar solution but it was involving a function and a while loop.

    But I'm sure there's a way to trap the...

  • RE: Stored Procedure and playing with fields

    Well first things first.  Can you change the design of the table so that you have a column TypeEmployeID?

    That would normalize the design and make your job much easier.

  • RE: Truncating a numeric

    I don't see why you'd want to remove the 0's from an int since it would alter it value but you can surely do something like this :

    DECLARE @I AS INT

    SET...

  • RE: A query which has 16 joins

    If you wish to provide something more usefull, ,you can continue the discussion on this thread. 

    PS Please do not cross post.

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=19&messageid=315001

  • RE: A query which has 16 joins

    How much data in each table?

    How much data should be returned by the query?

Viewing 15 posts - 11,551 through 11,565 (of 18,923 total)