Forum Replies Created

Viewing 15 posts - 136 through 150 (of 249 total)

  • RE: Row level security

    Because views do not have parameters, a separate view for each division will be required.  If this is not acceptable, then a stored procedure or udf will be the way...

  • RE: Functions

    ...maybe a left join and a where clause looking for no record joined (i.e., [ID] is null)....

  • RE: Functions

    and Issuers.TickerSymbol not in

      (

      select [ID] from dbo.fn_EqOnlyBeta(@INTERVAL_ID)

       where BETA <> 0

    This looks very ugly to me.  Make sure that not very many records are in the TABLE data_type...

  • RE: Want to get data from two diffrent servers

    However it's done, be carefull to limit the records when possible.  In the OPENROWSET, be sure to use a WHERE when possible to limit the records returned.  With linked servers, simple joins...

  • RE: Want to get data from two diffrent servers

    Depending on your needs, an OPENROWSET might be used (e.g., in a join, to load a temp table, etc.) 

  • RE: Execute a Store Procedure in a select statment

    However, if your login does not have execute permissions to a stored procedure, then syntax tricks will not help.  "Extra" access is not granted based on the T-SQL in the ad-hoc...

  • RE: Execute a Store Procedure in a select statment

    You have at least two options if you need to use the resultset from the stored procedure. 

    1) You can use the stored procedure to insert the results into a...

  • RE: Row level security

    If access is by username, the user name can be passed to a stored procedure (returning a rowset) or user-defined function (returning a TABLE data_type).  The T-SQL code can then use...

  • RE: Table Variables

    I have similar trouble using a TABLE data_type.  The TABLE datatype has local scope and can't be passed as a parameter. 

    I wanted to return a list of table names...

  • RE: Truncate Log File

    I have had this problem in the past.  I ended up doing do-nothing transactions to get the "logical log" to wrap to the beginning.  See "Shrinking the Transaction Log" in...

  • RE: Setting @@ERROR from a trigger

    It is possible to create your own user-defined messages using sp_addmessage (c.f., BOL).  The user-defined error numbers start at 50001.  However, messages are not database specific.  If moving the related...

  • RE: Update Statistics Failure with Computed Column

    I also rebuilt my indexes first.  Perhaps that made a difference. 

  • RE: Update Statistics Failure with Computed Column

    Thank you for the reference.  I'll try the following in the job, as suggested in the article. 

    SET ARITHABORT ON

    SET QUOTED_IDENTIFIER ON

    EXECUTE master.dbo.xp_sqlmaint N'-PlanID ....

    -Randy

    It's not a bug -...

  • RE: Update Statistics Failure with Computed Column

    PS  The computed column uses the formula

    (convert(tinyint,case when ([check_count] = 0) then 0 when ([check_sum] = [pay_line_sum]) then 0 else 1 end))

    I initially cast to a bit.  I changed...

  • RE: Why must tables have PKs?

    If you ever need to work with the data, then having a PK will make life much easier, even if it is just an identity column.  Perhaps you can argue...

Viewing 15 posts - 136 through 150 (of 249 total)