Forum Replies Created

Viewing 15 posts - 5,536 through 5,550 (of 6,036 total)

  • RE: case inside case Is it Possible?

    It does not give any error.

    declare @frequency nvarchar (50)

    declare @hours real

    set @frequency = 'biweekly'

    set @hours = 45

    select case when @frequency = 'biweekly' then

        case when @hours > 80 then 1...

  • RE: Difference B/W EXEC and only SP Name execution.

    Is it so hard to open BOL?

    EXECUTE

    Executes a scalar-valued, user-defined function, a system procedure, a user-defined stored procedure, or an extended stored procedure. Also supports the execution of a...

  • RE: The Pitfalls of Foreign Keys

    Are you sure?

    To get statistics for number or total amount of last week orders you don't need to match up those orders to customers, unless you are not sure some...

  • RE: box like charecter

    It may be any of non-printable charachters.

    It's just the way EM displays presence of such charachters.

  • RE: The Pitfalls of Foreign Keys

    So, to display only right orders you need to include Customers into all select statements querying Orders. Are you sure it will not affect performance?

    And if you allow to delete...

  • RE: The Pitfalls of Foreign Keys

    Everybody talks about DELETEs.

    But what about SELECTs?

    Should "well tested procedures" allow to display orphaned objects?

    I believe not.

    How you can ensure it?

    SELECT ....

    FROM ...

    Where ObjectId not in (select ObjectId from...

  • RE: Import a variable text file

    Probably you need to read some topics from "user-defined functions" in BOL, especially about table functions.

    Hope it will help.

  • RE: Raiserror problem inside trigger

    RAISERROR inside trigger will rollback whole trigger transaction.

    That's why you cannot see any result. It works as prescribed.

  • RE: Adding a Sequential Number to a Select Statement

    SELECT IDENTITY(int, 1,1) as ID

    Cusip, UserBondFlag, Par, Price

    INTO #Table

    FROM TableTest

    SELECT * FROM #Table

  • RE: Concatenation & Matching

    I see at least wrong syntax:

    cast(col3 as varchar(20))

  • RE: Column Existence and insert....

    I have tried on my tables:

    exec sp_columns 'Address', @Column_name = 'Id'

    IF @@RowCount = 1

    select GetDate()

    exec sp_columns 'Address', @Column_name = 'No_Id'

    IF @@RowCount = 1

    select GetDate()

    Works fine.

    Check your tables.

  • RE: Returning Rowcount from a Function

    Isn't it easier just to update statistics?

  • RE: need help with a function

    In most cases people really need not what they ask for.

  • RE: need help with a function

    Actually, the right way is to do something like this:

    ALTER FUNCTION dbo.Initials

    (@FirstName varchar(200),

    @MiddleName varchar(200),

    @LastNamevarchar(200) )

    ......

    and call this function in select from whatever table...

  • RE: need help with a function

    Doctor is a person playing role of doctor.

    Patient is a person playing role of patient.

    Nurse is a person playing role of nurse.

    Etc.

    Organisations actually don't have first or last names. Your...

Viewing 15 posts - 5,536 through 5,550 (of 6,036 total)