Viewing 15 posts - 7,456 through 7,470 (of 8,731 total)
Try with:
CAST(CAST( NULLIF(NumericDatefield, 0) AS char(8)) AS datetime)
November 19, 2013 at 7:59 am
Usually this questions are to check for a mixture between knowledge and experience. There's not one correct answer, but multiple options depending on many circumstances. Basic answers that might lead...
November 18, 2013 at 12:47 pm
I agree with you, I never suggested the non-dynamic approach. However, it's important to understand it before jumping into the dynamic cross tabs. Pre-aggregation can be used as well on...
November 18, 2013 at 11:55 am
Aaron,
I just wanted to point out that PIVOT is not needed (is just one option). A pre-aggregated CROSS TAB might perform better. Check the articles recommended by Lutz.
By the way,...
November 18, 2013 at 8:53 am
Maybe I sound pedantic, but a good advice is to use the help included with SQL Server. Is as easy as pressing F1.
November 14, 2013 at 3:43 pm
Are you seriously asking something that is clearly documented?
November 14, 2013 at 3:17 pm
There's something wrong with your query. You're comparing a boolean value (EXISTS()) against an integer value.
To get better help, please post DDL for tables involved and sample data in the...
November 13, 2013 at 2:56 pm
What approach did you take?
My option would be something like this:
CASE WHEN ModifiedDate > ISNULL( DateClosed, 0) THEN 1 ELSE 0 END as FieldName
November 13, 2013 at 12:06 pm
Now, there's a method to obtain the correct result. It's called CROSS TABS and you can find information on the following articles:
November 13, 2013 at 12:05 pm
I misread the expected results, I will post a correct solution in a few minutes.
A simpler approach can be found on this article:
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
Here's an example on your data:
SELECT order_number,
sequnce_num,
STUFF( (SELECT...
November 13, 2013 at 11:57 am
LutzM (11/12/2013)
Ich habe keine Ahnung, wovon du sprichst, Luis!(I have no idea what you're talking about, Luis!) 😀
I'm just trying to help 😀
I just hope people won't rely just on...
November 12, 2013 at 3:31 pm
Antes que nada, bienvenido a este sitio.
Te recomiendo que escribas en inglés ya que así recibirás más ayuda y no te quedarás con la ayuda de sólo unos cuantos que...
November 12, 2013 at 1:55 pm
Paul Keys (11/12/2013)
Hi,Try changing your clause for the inner join to
ON loc.Parent_Location = loh.LocationID
With this change, he can loose the WHERE clause 🙂
November 12, 2013 at 8:51 am
Jeff Moden (11/10/2013)
Luis Cazares (11/7/2013)
Do you provide sponsorship for mexicans?If they don't, they should make an exception for you. You're one of the best out there.
:blush: Thank you.
November 11, 2013 at 1:23 pm
Maybe the CROSS APPLY approach to unpivot can help you. Even to create the dynamic code for N number of columns would be easier than the built-in UNPIVOT function.
Reference: http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/
WITH...
November 8, 2013 at 5:25 pm
Viewing 15 posts - 7,456 through 7,470 (of 8,731 total)