Viewing 15 posts - 3,301 through 3,315 (of 5,504 total)
Unfortunately, it's a little more complicated, since SQL Server doesn't have a valid dateformat like the one you need to use as an input...
SELECT CAST(LEFT(@t,8) +' ' +SUBSTRING(@t,9,2)+':' +SUBSTRING(@t,11,2)+':' +SUBSTRING(@t,13,2)...
June 17, 2010 at 12:40 pm
Please read and follow the first link in my signature.
Providing ready to use table DDL, sample data, expected result and what you've tried so far is the best way to...
June 17, 2010 at 10:28 am
We're using XML files only for getting data from a DB2 into SQL Server through a (required) 3rd party middleware.
The reason we're using XML is to be flexible in terms...
June 16, 2010 at 11:50 am
Would you please clarify your requirement?
Where did you get the 30min steps from?
Please provide ready to use sample data as described in the the first link of my signature.
Also, please...
June 16, 2010 at 11:36 am
ColdCoffee (6/15/2010)
Lutz, got a question here ; from the OP's queries, if you could see, he/she is using 3 different tables to get the values ; so I guess,...
June 16, 2010 at 10:27 am
It's usally a better idea to start a new thread if you have a different question.
The chances are low to find somebody providing a date difference solution if the title...
June 16, 2010 at 10:21 am
It would be much more helpful if you could post your data in a ready to use format as described in the link I pointed you at.
There are some people...
June 15, 2010 at 4:11 pm
Unfortunately, the original question got out of focus in most of the current posts.
So, may I kindly ask to focus on the subject?
Whoever is willing to continue the "challenge discussion"...
June 15, 2010 at 3:41 pm
Seems like you've got trapped by a "semi-optimal" table design...
Storing different dates and corresponding values in several columns violates normalization. As a "side effect" it makes queris like you're trying...
June 15, 2010 at 3:31 pm
David Webb-200187 (6/15/2010)
June 15, 2010 at 2:20 pm
My fault. Sorry....
I didn't realize the alias within your original query.
Change FROM (...) tAdjustmentEx AS I
to FROM (...) I.
June 15, 2010 at 2:06 pm
The most probable reason: each and every row in your query contains values where cma_completed_date2 > cma_completed_date1.
A CASE statement will set the return value according to the first (sequential) true...
June 15, 2010 at 2:03 pm
Your code looks correct, assuming rxo.RX_NUMBER and rxf.REFILL_NUMBER are both character values. Otherwise SQL Server will assume that you're trying to do some math. So, the result should not be...
June 15, 2010 at 1:47 pm
Please post table def, sample data and expected result based on the sample data as described in the first link in my signature. There are some people around (including me)...
June 15, 2010 at 1:37 pm
I just stumbled across the concept a few days ago when reading a thread related to the same issue. Unfortunately, neither can I find the thread nor the original author....
June 15, 2010 at 1:34 pm
Viewing 15 posts - 3,301 through 3,315 (of 5,504 total)