Viewing 15 posts - 9,256 through 9,270 (of 15,381 total)
It is pretty unclear what you are trying to do here but I think you want a dynamic cross tab. Please see the articles in my signature about rows to...
February 25, 2013 at 7:42 am
dndaughtery (2/22/2013)
Found it!
Be careful now. That only shows index usage. If your queries are not sargable or you have a heap your results may not be exactly what you are...
February 25, 2013 at 7:10 am
How are you going to handle those once a year type of things? I can understand wanting to do this periodically but weekly? Are you really going to drop tables...
February 22, 2013 at 2:22 pm
dndaughtery (2/22/2013)
I need a query to show all tables in a database sorted by last datetime queried ordered oldest first. Can someone help me with this?
There is nothing by default...
February 22, 2013 at 2:04 pm
MadRazzi (2/22/2013)
I have a table with 7 columns like Cumulative_cnt, AX1, AX2, AX3, AX4, AX5, POS
i want to find the first AX column with a 'null' and assign that column...
February 22, 2013 at 2:02 pm
SQL STEWIE (2/22/2013)
So, I am sure this is a pretty simple query, but I am stumped.
You are right this is probably a pretty simple query. However with no ddl or...
February 22, 2013 at 12:40 pm
A tally table will perform far better for this than a recursive cte. The biggest challenge at this point is that we can't help much because we don't know what...
February 22, 2013 at 10:06 am
You need to use a calendar table for this type of thing.
http://www.sqlservercentral.com/articles/T-SQL/70482/%5B/url%5D
February 22, 2013 at 8:11 am
Thanks for the details. Makes this kind of thing a lot easier!!!
Something like this?
SELECT t.*, isnull(x.ItemCode, '') as ItemCode
FROM #tTestTB t
outer apply(select top 1 ItemCode as ItemCode from #tTestTB...
February 20, 2013 at 1:28 pm
I am pretty sure of what you are looking for. Can you take a few minutes to read the article found in my signature about best practices when posting questions?...
February 20, 2013 at 12:28 pm
Jeff Moden (2/15/2013)
Sean Lange (2/15/2013)
You should use DATEADD because the simple math does not work with date or datetime2 datatypes.
I have to ask... if you're not using the DATE or...
February 20, 2013 at 8:15 am
Jeff Moden (2/15/2013)
Why not...
February 15, 2013 at 2:59 pm
Here is David's solution with the syntax errors corrected.
create FUNCTION fn_fibo (@end INT)
RETURNS VARCHAR(255)
AS
BEGIN
DECLARE @a INT
,@b INT
,@fib INT
,@counter INT
DECLARE @fstring VARCHAR(255)
SET @end = @end - 2
SET @a = 0
SET @b-2...
February 15, 2013 at 1:28 pm
Like this?
update #X set Samp = Samp / 100000
February 15, 2013 at 10:58 am
jbalbo (2/15/2013)
Hi,I want to display only MM/YY from the formula of @enddate -21??
Thanks
This type of display should be handled in the front end. SQL is not good at string manipulation...
February 15, 2013 at 10:55 am
Viewing 15 posts - 9,256 through 9,270 (of 15,381 total)