Forum Replies Created

Viewing 15 posts - 286 through 300 (of 1,048 total)

  • RE: Adding special characters

    Sean Lange (8/7/2013)


    like this?

    update table1 set Name1 = '!@#$%^&*()' + Name1

    In this manner, but only for those tables who has column of varchar types.....

  • RE: Exists

    Good explanation Kingston 🙂

  • RE: Exists

    Good question....

    Thanks twin 🙂

  • RE: Collation issues

    You can also put the COLLATE to the column names where you are getting collation error like this:

    Column1 Collate collationname = Column2 Collate collationname

  • RE: Convertion from Varchar to Datetime

    Can you please post what you tried?

    Also, post the sample data and what would be your desired output from that

  • RE: i am a newbie . help me to learn sql server

    If you are not making mistakes, you are not learning anything new 😛

  • RE: concatenate ' and % in like estatement

    masoudk1990 (8/5/2013)


    Thank you very much but 'N' character in condition is critical because i search none English.

    I need something like:

    DECLARE @name VARCHAR(20) = '?????'

    SELECT * FROM Person.Person WHERE LastName LIKE...

  • RE: concatenate ' and % in like estatement

    Try in this manner-

    DECLARE @name VARCHAR(20) = 'S'

    SELECT * FROM Person.Person WHERE LastName LIKE '%'+@name+'%'

  • RE: IDENTITY_INSERT

    I have solved myself_

    Changed the query to this--

    DECLARE @projectId int

    SELECT @projectId = ProjectId FROm Project with(nolocK) WHERE ProjectNo = '61N24643'

    SET IDENTITY_INSERT DC1..DMAuditHistory ON

    INSERT INTO DC1..DMAuditHistory (ProjectID,ProposalID,SolutionID,RequestID,AuditFieldTypeID,SrNo,Dateaudited,

    AuditFieldvalue,DrawingStatus,CommerceId,DeleteFlag,AddedBy,DateAdded,ChangedBy,dateChanged,GlobalUniqueID)

    SELECT * FROM DMAuditHistory...

  • RE: How To Use IS NOT NULL in a Case Statement

    Actually I didnt see the outer query and was just focused on correcting Case statement...

    I read query and see that case can return multiple values and this can lead to...

  • RE: How To Use IS NOT NULL in a Case Statement

    🙁

    Thanks Chris for correcting........

    Teee: I apologize you for not providing the proper solution!!

  • RE: How To Use IS NOT NULL in a Case Statement

    Teee (8/2/2013)


    This works perfectly, Thank you all for your responses. 🙂

    Welcome :hehe:

  • RE: Lock mode RangeI-N

    Danny Ocean (8/1/2013)


    It's not an easy for me. but i got it correct.

    Something new i learn today. Thanks 🙂

    +1

    First have to BOl about it before answering 😛

  • RE: How To Use IS NOT NULL in a Case Statement

    Teee (8/2/2013)


    Select

    jc.intJobCardId

    ,b.vchBarcodeas [Barcode]

    ,i.dteIncidentDateas [IncidentDate]

    ,ISNULL(ISNULL(p.nvcDisplayName, p2.nvcDisplayName), '')as [ServiceProvider]

    ,dteAssignedDateas [AssignedDate]

    ,dteCompletedDateas [CompletedDate]

    ,DATEDIFF(Hour, dteAssignedDate,dteCompletedDate) as [TimeToComplete]

    ,ISNULL(lb.TotalHours, 0)as [TotalHours]

    ,lb.TotalHours/DATEDIFF(Hour, dteAssignedDate,dteCompletedDate)as [Efficiency]

    ,''as [Productivity]

    ,l.vchLocation

    ,typ.vchType

    From dtlIncident i

    Inner Join dtlJobCard jc on...

  • RE: How To Use IS NOT NULL in a Case Statement

    what I understand with ur prob is that you can write CAsE statement in this manner-

    SELECT

    Case when 1=1 THEN 'Yes' ELSE 'No' END

    WHERE 1 IS NOT NULL

Viewing 15 posts - 286 through 300 (of 1,048 total)