Forum Replies Created

Viewing 15 posts - 406 through 420 (of 444 total)

  • RE: Unmatched Rows in Tables

    I think I have answered this in another forum. Same question.

    Atif Sheikh

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Row matching in Tables

    ;with wcte (AId, ACourseId, AGroup, AStarttime, AEndTime, AFacultyid,BId, BCourseId, BGroup, BStarttime, BEndTime, BFacultyid)

    Select A.ID AId, A.CourseId ACourseId, A.Group AGroup, A.Starttime AStarttime, A.EndTime AEndTime, A.Facultyid AFacultyid,

    B.ID BId, ...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: rollback in a transaction with TRY CATCH block

    You need to reset the variable in the Catch Block.

    Sometimes you need to reset the variables as they were at the start of the procedure in case of an error....

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Inserting value in existing record by condition

    As far as I understood your problem,

    1. you need insert a record

    2. you need to update the record according to the SELECTED ID

    whats...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: performance difference of plain and next joins?

    Both are same. No difference.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: performance impact of "Try...Catch"?

    Just for error handeing, no issue of performance. Also, I think, using try / catch isd fast in case of execution, as it directly goes to error - handeler on...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Query Help

    Try Using PIVOT with SUM as as Aggrigate Function.

    Atif Sheikh

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: How to create primary key for this table?

    I have so many tables in my database that have such a structure. You always fall in this situation when you are mapping a PK of one table and with...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Data Types conversion

    With Query 1,Try this;

    select (case when status <> "Attended' then

    'green'

    else...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Calculation with Alphanumeric Values

    It will be much better to check your alphanumeric values with ISNUMERIC() function before applying mathematical functions.

    After that, use CAST for conversion to get the job done.

    This way,...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Problem with a Dynamic Stored Procedure

    I think you should use sp_executesql as you want to return a parameter from your executed string. Get your @Row (@Row = COUNT(@FieldName)) variable return from the sp_executesql.

    Atif Sheikh

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Convert from bianry to varchar or nvarchar and join to another table

    Make it a function as;

    CREATE FUNCTION dbo.fnConvertBinaryToChar

    (

    -- Add the parameters for the function here

    @binvalue varbinary(255)

    )

    RETURNS char(500)

    AS

    BEGIN

    declare @charvalue varchar(255)

    declare @i int

    declare @length...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Convert from bianry to varchar or nvarchar and join to another table

    Ok here it goes...

    Declare @binvalue varbinary(255)

    Set @binvalue = 0x000FD4EB2F811A43A3D674D5FA7B5E95

    declare @charvalue varchar(255)

    declare @i int

    declare @length int

    ...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: String search

    You can also user TALLTY Table in this case.

    Thiswill parse your string character wise. Parsing can also be done by many ways, but 'tally table' strategy is fast.

    After parsing...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Name Spaces

    Where is My BOOK...?

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

Viewing 15 posts - 406 through 420 (of 444 total)