Viewing 15 posts - 286 through 300 (of 1,048 total)
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.....
August 7, 2013 at 8:19 am
You can also put the COLLATE to the column names where you are getting collation error like this:
Column1 Collate collationname = Column2 Collate collationname
August 5, 2013 at 8:30 am
Can you please post what you tried?
Also, post the sample data and what would be your desired output from that
August 5, 2013 at 5:38 am
If you are not making mistakes, you are not learning anything new 😛
August 5, 2013 at 4:40 am
masoudk1990 (8/5/2013)
I need something like:
DECLARE @name VARCHAR(20) = '?????'
SELECT * FROM Person.Person WHERE LastName LIKE...
August 5, 2013 at 4:36 am
Try in this manner-
DECLARE @name VARCHAR(20) = 'S'
SELECT * FROM Person.Person WHERE LastName LIKE '%'+@name+'%'
August 5, 2013 at 4:12 am
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...
August 2, 2013 at 5:58 am
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...
August 2, 2013 at 1:55 am
🙁
Thanks Chris for correcting........
Teee: I apologize you for not providing the proper solution!!
August 2, 2013 at 1:53 am
Teee (8/2/2013)
This works perfectly, Thank you all for your responses. 🙂
Welcome :hehe:
August 2, 2013 at 12:59 am
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 😛
August 2, 2013 at 12:56 am
Teee (8/2/2013)
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...
August 2, 2013 at 12:54 am
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
August 2, 2013 at 12:45 am
Viewing 15 posts - 286 through 300 (of 1,048 total)