Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bawtry

    What permissions required to use SET IDENTITY_INSERT statement?

    What permissions are required for a user to run a stored procedure which includes the SET IDENTITY_INSERT statement? Books On Line states: "Execute permissions [for SET IDENTITY_INSERT] default to the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles, and...
  2. bawtry

    Check constraint to ensure both or neither values

    You're right, and that would imply that the check constraint could be written: CHECK (fld1 is null and fld2 is null or isnull(fld1,-1) between 60 and 240 and (isnull(fld2,-1) between 0 and 100)) This does indeed work. Thanks for your help Graham
  3. bawtry

    Check constraint to ensure both or neither values

    Thanks, that works as desired. I would like to understand why the first examples don't work, and why SQL Server rearranges the statements in the forms it does. Can anyone explain?
  4. bawtry

    Check constraint to ensure both or neither values

    Given a table tblABC, I want to ensure that if a value is entered in field fld1 it is between 60 and 240 and that a value between 0 and 100 is entered in field fld2, or no value is entered for either field fld1 or field fld2. In other words both or neither. I have tried this: ALTER TABLE...
  5. bawtry

    Function calls to referenced mdb from toolbar

    Problem: An Access database (mdb) has a reference to another mdb. Function calls can be made OK in a code module from one to the other. However, function calls made in a toolbar button's onAction property fail. Any suggestions? Further details: 1. The same structure works fine on some...
  6. bawtry

    Is there an alternative to expensive correlated subqueries?

    Is there an alternative to the correlated subquery. Running the subquery for each row returned by the outer query must be expensive. Any help greatly appreciated. Graham Robbins The following is an example of a correlated subquery: /* Ensure that only the most recently added patient contact...
  7. bawtry

    SQL-Server DATE COMPATIBILITY ACROSS RELEASES MYSTERY

    OH YES! YET ANOTHER DATE CONVERSION PROBLEM. Can anybody explain this mystery? ... Query issued by client system: VERSION ISO: UPDATE tblPatientDetails SET Dob = '1948-06-25' VERSION USA: UPDATE tblPatientDetails SET Dob = '1948-25-06' SERVER 1: (as reported by @@Version) Microsoft...
  8. bawtry

    SQL SERVER - SET FIELD (COLUMN) TO DEFAULT VALUE?

    Given a Field (Column) called PhoneNo ... need to SET PhoneNo = '' if supplied value is Null. SQL DEFAULT is OK for INSERT. How do you do this for UPDATE? HINTS: Client is Access making the update directly ... so can't use S-PROC. Don't want NULL to be allowable in Table Def ...

Part and Inventory Search

Back
Top