Viewing 15 posts - 9,571 through 9,585 (of 15,381 total)
ScottPletcher (1/21/2013)
INSERT INTO dbo.T1 ( ... )
SELECT t2.col1, t2.col2, ...
FROM dbo.T2 t2
LEFT OUTER JOIN dbo.T1 t1 ON
t1.Name = t2.Name
WHERE
t1.Name IS NULL --only...
January 21, 2013 at 3:37 pm
case isdate(col2)
when 1 then cast(col2 as datetime)
else col2
end as col2test
There is the culprit.
January 21, 2013 at 3:35 pm
Doesn't sound too tough. Please take a look at the first link in my signature for best practices when posting questions. Once we have the necessary information you will find...
January 21, 2013 at 3:33 pm
16 posts into what should have been a 1-2 post answer if ddl and sample data were provided...
Here is my last shot in the dark.
SELECT
CASE LEFT(cast(Customer.STARTDATE as varchar(20)), 2)
WHEN...
January 21, 2013 at 10:20 am
kenneth.bucci (1/21/2013)
This is how we fixed it:(@Issue is not null and exists
(select 1 from IssueCodes where charindex(IssueCode, @Issue) <> 0 AND charindex(IssueCode, SPL.IssCode) <> 0)))
Works like a charm!
Glad you...
January 21, 2013 at 10:11 am
Welsh Corgi (1/21/2013)
Msg 8116, Level 16, State 1, Line 1
Argument data type numeric is invalid for argument 1 of...
January 21, 2013 at 9:03 am
Also your script does not take into account if the current and updating values are the same. If you prevent updating the column like you have in your trigger it...
January 21, 2013 at 8:35 am
Had not heard about this function until now. Like others I assumed they got it right. The question actually pretty much answers itself. The first 3 sets of choices are...
January 21, 2013 at 7:44 am
Load it into a table which I would assume you are doing anyway. Then you just query sys.columns to get your list.
SELECT Stuff((SELECT ', ' + name
FROM ...
January 21, 2013 at 7:24 am
Can you be a bit more specific about what you are trying to do? Is the first row in your spreadsheet the column names? If you can explain in more...
January 18, 2013 at 9:51 pm
I would say it is mostly preference but I would agree with you. Why have all your variable declarations at the top? This isn't Pascal or Delphi. It makes sense...
January 18, 2013 at 9:48 pm
kenneth.bucci (1/18/2013)
Unfortunately I have to be careful what gets posted publicly as I work for a hospital. I am not sure I could get you...
January 18, 2013 at 2:38 pm
kenneth.bucci (1/18/2013)
January 18, 2013 at 2:02 pm
kenneth.bucci (1/18/2013)
I am still not sure how to compare the two sets of delimited string items. Each item in one list must be in the other...
January 18, 2013 at 1:51 pm
sqldba_newbie (1/18/2013)
Luis Cazares (1/18/2013)
2 word: Implicit conversionSQL Server needs to do implicit conversions that may affect the query performance.
implicit conversion on what?
The N forces conversion to Unicode.
January 18, 2013 at 1:31 pm
Viewing 15 posts - 9,571 through 9,585 (of 15,381 total)