Forum Replies Created

Viewing 15 posts - 4,546 through 4,560 (of 5,103 total)

  • RE: SQL Construct

    The Code Posted is Correct.

    if exists (select * from dbo.sysobjects where id = object_id(N'[Table1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

    drop table [Table1]

    GO

    CREATE TABLE  Table1 (CaseNbr int)

    GO

    if exists (select * from dbo.sysobjects...

  • RE: Dynamic Audit Trigger

    COLUMNS_UPDATED can be used to detect a multiple column change as a bitmasked value to trigger some actions

     

  • RE: Killing a process through a stroed proc

    that was a typo. I was just trying to help. BTW is not semantics is syntaxis

  • RE: Killing a process through a stroed proc

    CREATE PROCEDURE [dbo].[prc004KillProcess]

    (@intSPID smallint)

    AS

    DECLARE @str as vaschar(100)

    SET @str ='KILL ' + cast (@intSPID as varchar(3))

    exec (@str)

     

     

  • RE: Question of the Day for 03 Mar 2004

    Some examples are:

    DENY ALL PRIVILEGES (BirthDate) ON Employees To guest

    DENY SELECT (BirthDate) ON Employees To guest

    DENY SELECT,UPDATE  (BirthDate) ON Employees To guest

     

    HTH

     

  • RE: Returning multiple rows from single row

    carmines,

    none of the methods shown require temporary tables they were created using temptables just to avoid the creation of a "true" table in our enviroment.

    If you replace the #T1 on...

  • RE: SQL Construct

     

    try:

    INSERT INTO UNRESOLVED (CaseNbr)

    SELECT

     T3.CaseNbr

    FROM

     Table3 T3

     LEFT OUTER JOIN 

     (Select CaseNbr From Table 1

      UNION

      Select CaseNbr from Table 2

    &nbspQ

     ON T3.CaseNbr...

  • RE: Returning multiple rows from single row

    With a minor variation:

    Create Table #Tmp(Product VarChar(50),Quantity Decimal(10,4))

    Go

    Insert #Tmp

     Select 'Widget',5

    Insert #Tmp

     Select 'Widget',6

    Insert #Tmp

     Select 'Widget',4

    GO

    Select * from #Tmp

    Go

    Select Product,number,Quantity

     From #Tmp as t

      Cross Join (SELECT number from master..spt_values where type ='P'...

  • RE: Passing a comma delimited string to a function for a IN() clause

    From what I wrote I forgot to mention you have to do either:

    SELECT * from fnEmployeesByGroupCode (',CMS,CM,')

    OR Better yet:

      SELECT TOP 100 PERCENT dbo.CRM_Groups.Group_Code,

        dbo.Employee.Employee_Id, dbo.Employee.Job_Title,

        dbo.Employee.Team_Number,

           dbo.Employee.Full_Name

       FROM dbo.Employee INNER...

  • RE: Restore "Database Diagrams" (sql 2k)?

    Yep, but Microsoft posted Officially there, so I went straight from the horses' mouth

  • RE: Passing a comma delimited string to a function for a IN() clause

    I am not fun of what you are doing here but this is probably what you are looking for:

      SELECT TOP 100 PERCENT dbo.CRM_Groups.Group_Code,

        dbo.Employee.Employee_Id, dbo.Employee.Job_Title,

        dbo.Employee.Team_Number,

           dbo.Employee.Full_Name

       FROM dbo.Employee INNER...

  • RE: Stored procedure at specified time

    FROM BOL:

    All DB-Library applications, such as isql, work as SQL Server 6.5–level clients when connected to SQL Server 2000. They do not support some SQL Server 2000 features. The osql...

  • RE: Puzzling SQL

    I had to Move some data around just to have intersecting sets because the data was not overlapping very well like:

    if exists (select * from dbo.sysobjects where id = object_id(N'[event]')...

  • RE: SP not working the same SQL 2000 vs SQL 7.0 when exec from Access

    Are you sure that the table BATCH_CONTROL  has an IDENTITY Field?

    BTW when you check for errors after the INSERT The Statement should be

    SELECT @Er=@@ERROR,...

Viewing 15 posts - 4,546 through 4,560 (of 5,103 total)