Viewing 15 posts - 2,836 through 2,850 (of 6,036 total)
Here: DateOnly function
you may find UDF dbo.DateOnly.
If @DateTime = dbo.DateOnly(@DateTime) then there is no time portion.
September 17, 2008 at 2:54 am
Jeff Moden (9/16/2008)
I do see why you gave up... writing an "intelligent" true CSV splitter in T-SQL is gonna be tougher than I thought.
As I said, I eventually...
September 16, 2008 at 7:44 pm
Jeff Moden (9/16/2008)
September 16, 2008 at 6:56 pm
Jeff Moden (9/16/2008)
Can you show us one, Sergiy... so we can get the idea of how to do it? Thanks.
I've already shown you once.
You should just avoid implicit conversions...
September 16, 2008 at 6:52 pm
WHERE dbo.Transportation_ServiceSchedules.OId = ' + CONVERT(VARCHAR(10), @id) + ' + ')'
September 16, 2008 at 2:22 pm
Wrap your query into derived table and select FOR XML from there.
September 16, 2008 at 2:14 pm
I believe consistent deadlock statistics will add to my info something even more useful as soon as you've got 2 or more users start to do updates on the "table...
September 16, 2008 at 2:04 pm
If I was you I'd create small and effective trigger on that table updating another, properly formatted table(s) when the value is updated.
Then I'd gradually move selects from old to...
September 16, 2008 at 1:57 pm
Jim Russell (9/16/2008)
September 16, 2008 at 1:49 pm
You'd better split it for data storage purposes.
And (if needed) concatenate for display purposes.
It would save you from a lot of problems.
Google "Normalization Rules" - sometimes it's useful to know...
September 16, 2008 at 6:33 am
I don't deal with updates on tables with a ton of column.
It would compromise my professional reputation.
I don't do crap.
September 16, 2008 at 6:12 am
Jeff Moden (9/16/2008)
It sure does...
It "eats" the comma from the last value.
... but the OpenRowSet thing I showed does it right.
I explained why it's not an option.
September 16, 2008 at 1:05 am
Even worse - those REPLACEs don't work.
For another string :
'"Pick-up",,"",1234,"2008-08-24", "2008-08-24","17"", unknown brand"'
it fails.
September 15, 2008 at 11:49 pm
The delimiters also line up and could be imported using a BCP Format File with \" to mark the quotes in the delimeters.
BCP is too vulnerable to format errors.
And...
September 15, 2008 at 10:56 pm
If I try to import file with wrong formatting (broken rows, unquoted delimiters in strings, missing header or header row where it not supposes to be, etc.) I'll end up...
September 15, 2008 at 10:47 pm
Viewing 15 posts - 2,836 through 2,850 (of 6,036 total)