Forum Replies Created

Viewing 15 posts - 181 through 195 (of 388 total)

  • RE: Adding a Persisted Column locks the table... avoidable?

    Hi Bradley,

    How big is the table? Are there indexes on these two columns? I wonder if they can obstruct the lock acquisition during the alter table.

    Maybe if you don't need...

  • RE: Can a CLR Function be made similar to Coalesce?

    Hi,

    Why don't you use CASE statement? Maybe more explicit, but deffinitely faster.

    create table t1

    (

    OptOutDate datetime,

    InactiveDate ...

  • RE: Predict output

    Nice question.

    The execution plan for slightly modified query

    SELECT 2 UNION

    SELECT 1 union

    SELECT NULL UNION

    SELECT '1' union

    SELECT '2'

    shows that Merge Join operators are used to merge inputs from particular...

  • RE: UDF - INSERT ERROR

    Hi Tom,

    Perhaps OUTPUT clause would halp you? You could process inserts in batches then, retrieving relevant values to a temporary table or table variable.

    Regards

    Piotr

  • RE: Update-records by passing XML values

    You should use handleyou got from sp_xml_preparedocument in OPENXML, not the parameter you pass to proc.

    Regards

    Piotr

  • RE: Order by Query

    One of the ways is to update column to have leading 0 before single digit hours. The other way is to store these values as number of minutes (smallint) and...

  • RE: get all databases that contain an table

    I used SMO objects in similar scenario. I connected to server,enumerated databases and for each checked if given object exists in it. If it did, database was added to...

  • RE: Comparing Image Field

    I am disappointed. This function should really take longer parameters.

    Thanks guys for the info.

    Piotr

  • RE: Comparing Image Field

    Right. Shouldn't have been so quick. Direct comparison is better than calculating checksum.

    On the other hand, I never heard of a case that two different byte streams produce same checksum....

  • RE: Comparing Image Field

    Look at the HashBytes function. The fields will be equal when their checksums are equal.

    From BOL:

    DECLARE @HashThis varbinary(max);

    SELECT @HashThis = CONVERT(varbinary,0x1234123412341123412341223432243123545654345736576234535232452345234);

    SELECT HashBytes('MD5', @HashThis);

    GO

    HTH

    Piotr

  • RE: using express edition in production environment

    Well I agree, one could've used bigger version of SQL server. Yes, I created custom maintenance plan. A few scripts ran by windows scheduler.

    The reason I used 'free SQL...

  • RE: using express edition in production environment

    I developed an access control system that has been working on MSDE for 5 years now.. The database is about 150MB in size, biggest table contains 1.5M rows, there are...

  • RE: instead of trigger problem

    ok these triggers are DDL triggers, looks you don't have any. To see a trigger on a table you must expand table node (in Tables) and there are triggers you...

  • RE: instead of trigger problem

    But you said you wrote the trigger, you must have its code then? Are you using SQL 2005? Why do you use Enterprise Manager then?

    Look at sys.sql_modules catalog view.

    Piotr

  • RE: instead of trigger problem

    Do you have any error messages? Can you post code of the trigger?

    Piotr

Viewing 15 posts - 181 through 195 (of 388 total)