Viewing 15 posts - 526 through 540 (of 627 total)
Sean Lange (6/23/2015)
yb751 (6/23/2015)
GilaMonster (6/23/2015)
June 23, 2015 at 2:36 pm
GilaMonster (6/23/2015)
June 23, 2015 at 2:15 pm
Can you provide an example of what 'last_occurrence_date' looks like before you try converting it?
Assuming the format is valid...
DECLARE @badDate INT = 20150623
SELECT
CONVERT(DATETIME,CONVERT(CHAR(8), @badDate)) AS GoodDate
I'm assuming you commented out...
June 23, 2015 at 1:09 pm
If you haven't checked already I would suggest you look through your SQL Error Logs. Specifically during recovery or backups. It may provide some clues into some of...
June 23, 2015 at 1:02 pm
That part of the PIVOT is only expecting an Aggregate Function.
If you look up CASE: https://msdn.microsoft.com/en-us/library/ms181765.aspx
CASE can be used in any statement or clause that allows a valid expression. For...
June 23, 2015 at 8:41 am
From MSDN:
Specifies a temporary named result set, known as a common table expression (CTE). This is derived from a simple query and defined within the execution scope of a single...
June 22, 2015 at 9:23 am
You can easily extract the strings with something like this, provided all of the data follows the same format.
Cheers,
DECLARE @postal_latlong NVARCHAR(50) = '66000/66100 42.696595 2.899370'
SELECT
@postal_latlong AS Original,
SUBSTRING(@postal_latlong,0,CHARINDEX('/', @postal_latlong)) AS...
June 22, 2015 at 9:00 am
I'm afraid you will need to be more specific. What 'String' are you trying to compare? Do you need help modifying your statement?
Select Reson_id from reason_data where reason='ryete...
June 19, 2015 at 9:14 am
lewisdow123 (6/19/2015)
I could kick myself, I am running 2008 R2... so sorry
LOL...well for what it's worth here is the final edit to my solution (for 2012) which has the output...
June 19, 2015 at 9:03 am
lewisdow123 (6/19/2015)
Thanks for your help, however I get this message'LAG' is not a recognized built-in function name.
Did you post in the wrong forum? I assumed you were using SQL...
June 19, 2015 at 8:02 am
Ok, well try my updated solution. The one problem I can see though is doesn't account for multiples problems relating to the same child. In your example you...
June 19, 2015 at 7:51 am
Actually I didn't notice you have added a row number as I had started working on the problem from your first post. Give me a bit and I should...
June 19, 2015 at 7:33 am
Ahhh thanks for the data, that's much better.
I've come up with a solution but I'm not sure if it's necessarily the best. Also keep in mind this is based...
June 19, 2015 at 7:27 am
Jeff Moden (6/17/2015)
adonetok (6/17/2015)
One column (memberID) store about 100 member ID like below000001
000002
...
000100
How to code to output like below?
000001, 000002,...000100
Your turn, please. Why do you need the data in...
June 18, 2015 at 6:25 am
I believe this was introduced in SQL 2012 feature but I thought it was interesting.
However, as it is somewhat related I thought I'd mention it. I recently discovered this...
June 17, 2015 at 12:56 pm
Viewing 15 posts - 526 through 540 (of 627 total)