Viewing 15 posts - 3,451 through 3,465 (of 15,381 total)
Here is one way you could do this without using a loop. This uses the concepts of a tally table which you can read more about here. http://www.sqlservercentral.com/articles/T-SQL/62867/%5B/url%5D
WITH
E1(N) AS (select...
December 17, 2014 at 11:42 am
Brandie Tarvin (12/17/2014)
WayneS (12/17/2014)
Jeff Moden (12/17/2014)
Koen Verbeeck (12/17/2014)
Brandie Tarvin (12/17/2014)
Brandie Tarvin (12/16/2014)
I just spent 2 & 1/2 days reworking a package and its supporting tables / stored procedures. Previous...
December 17, 2014 at 7:25 am
You should read this article about dynamic sql. http://www.sommarskog.se/dynamic_sql.html
December 16, 2014 at 3:56 pm
Ed Wagner (12/16/2014)
SQLRNNR (12/16/2014)
Ed Wagner (12/16/2014)
djj (12/16/2014)
SQLRNNR (12/15/2014)
ContortionPain
Weakness
leaving
Body
piercing
December 16, 2014 at 10:40 am
jshuter (12/16/2014)
If you want to take the direct approach, you'll need to loop through with DATEADD( ) function
then go forward with D, 1,
and backwards with...
December 16, 2014 at 10:03 am
koti.raavi (12/16/2014)
Okay..thanks..! as of know i don't want to include holidays just last 5 business days and next 5 business days is enough..
What defines business days? Monday - Friday? There...
December 16, 2014 at 9:46 am
koti.raavi (12/16/2014)
Hi Sean, Thanks for your reply...Is there any way we can do same using Sql Query without using calender tables?..Thanks
Sure but it is much more difficult and less...
December 16, 2014 at 8:54 am
You should use a calendar table for this type of thing. http://www.sqlservercentral.com/articles/T-SQL/70482/%5B/url%5D
December 16, 2014 at 8:22 am
david.gugg (12/16/2014)
SELECT s.*
FROM dbo.Stocks s
WHERE s.id IN ( SELECT s.id
...
December 16, 2014 at 8:00 am
For those interested in reading about INNER JOIN versus IN...http://sqlinthewild.co.za/index.php/2010/01/12/in-vs-inner-join/%5B/url%5D
December 16, 2014 at 7:05 am
McSQL (12/12/2014)
There are several DOC_NO duplicates
There are many more REV_NO duplicates
I want to select all...
December 12, 2014 at 11:57 am
Stylez (12/12/2014)
would it be possible if I could also do this?
Case When Condition 1 = true then When Condition 2 = true then Execute Anything....
I would like to know...
December 12, 2014 at 10:11 am
ben.brugman (12/12/2014)
ZZartin (12/12/2014)
How do you not know table structures at design time.....
I am building a generic tool. *)
The tool can be used on tables which are not in existence yet.
Ben
*)
More...
December 12, 2014 at 10:06 am
Lynn Pettis (12/12/2014)
(To the tune 100 Bottles of Beer on the Wall)
... Mark one off, 78 days to go on the calendar. 78...
December 12, 2014 at 10:02 am
Your question does not really have enough clarity to offer much help. Why do you need to create temp tables from persistent tables like this? Perhaps if you can more...
December 12, 2014 at 9:49 am
Viewing 15 posts - 3,451 through 3,465 (of 15,381 total)