Viewing 15 posts - 13,591 through 13,605 (of 15,381 total)
My first job was as a sail plane mechanic. I basically helped rebuild wrecked gliders. That was in high school. I then became a chef and spent close to ten...
November 2, 2011 at 11:23 am
SQLDCH (11/2/2011)
November 2, 2011 at 11:20 am
That is really not what sql does. It is possible but it is difficult to pull of because it breaks 1st normal form. Check out this article from Jeff Moden...
November 2, 2011 at 11:15 am
Homework? We can point you in the right direction but certainly won't do the work for you.
You need to provide some more information before anybody will be able to...
November 2, 2011 at 11:10 am
Something like this?
;with MyTable (BadColumn)
as (
SELECT 'LN1, FN1' UNION ALL
select 'Lastname2, Firstname2' UNION ALL
select 'Lastnm3, Fname3' UNION ALL
select 'Lastname444, Firstname444'
)
select
SUBSTRING(BadColumn, CHARINDEX(',', BadColumn) + 1, DATALENGTH(BadColumn))
+ '...
November 2, 2011 at 11:07 am
I agree with Lynn, we need something to go on here.
However, just in the skeleton you posted you can increase performance AND accuracy to at least some degree by getting...
November 2, 2011 at 10:45 am
It just isn't a "here is the code for you" type of solution. You are going to have to read the second article I linked and understand how to apply...
November 1, 2011 at 2:32 pm
Well those characters are in your data. If you want to remove just update your table after your import.
Update MyNewTable
set DRG_FINAL = replace(DRG_FINAL, '"', ''),
PAYOR = replace(PAYOR, '"', ''),
DISCH_SERVICE =...
November 1, 2011 at 2:02 pm
Sound like dynamic cross tab. Take a look at the articles from Jeff.
The first is all about cross tab and the second is how to make it dynamic.
http://www.sqlservercentral.com/articles/T-SQL/63681/%5B/url%5D
http://www.sqlservercentral.com/articles/Crosstab/65048/%5B/url%5D
November 1, 2011 at 12:44 pm
Please don't cross post. Direct all replies here. http://www.sqlservercentral.com/Forums/Topic1198847-146-1.aspx
November 1, 2011 at 12:41 pm
right click the database -> Tasks -> Import Data.
From the data source select flat file and check the box that says the first row contains column names.
November 1, 2011 at 12:00 pm
Looks like you have a couple issues going on that need to be cleaned up.
SET @DocumentID = CONVERT(VARCHAR, @DocumentID)
SET @LinkID = CONVERT(VARCHAR, @LinkID)
SET @SubTypeID = CONVERT(VARCHAR, @SubTypeID)
You are converting to...
November 1, 2011 at 10:32 am
I assume you trying to search every column of every table for a specific value? The nested while loops you have are horrible for performance but for this type of...
November 1, 2011 at 8:52 am
You could do it with openrowset but it would be rather ugly. It is usually easier to just create the table first. Here is a link from a discussion today...
October 31, 2011 at 2:01 pm
You are welcome. Glad that worked for you.
October 31, 2011 at 11:04 am
Viewing 15 posts - 13,591 through 13,605 (of 15,381 total)