Viewing 15 posts - 346 through 360 (of 902 total)
I wonder if hes teaching you the pain of using whiles. 😀
Anyway back to the question at hand.
Firstly you've placed the @StartDate in single quotes you shouldnt
The...
February 7, 2013 at 4:01 am
I know the one you're talking about GSquared, Gail made a lot of very interesting points and I think Paul also added a few comments about inplace updates.
The only...
February 7, 2013 at 3:56 am
Can you post the code that you have tried.
As you are learning I would strongly recommend that stop using While loops/Cursors these are notoriously inefficient, in addition you will learn...
February 7, 2013 at 3:44 am
This looks like you want to the column in all rows on a table to 1 dependant on the value of a Paramater. correct?
I would suggest using Dynamic SQL to...
February 7, 2013 at 12:41 am
purushottam2 (2/6/2013)
February 7, 2013 at 12:11 am
In your example if @Values=1 then every row in the table will be updated to @Value correct?
Update Table
Set Column1=@values
where @values=1
will do exactly the same as your example, but something in...
February 7, 2013 at 12:06 am
Thats a great take on the Date table creation and added to my snippets.
February 6, 2013 at 8:25 am
You may be looking for something more like this which creates 10 years of dates from the BaseDate.
There are two versions one using a While loop and one with a...
February 6, 2013 at 8:18 am
Phil Parkin (2/6/2013)
Jason-299789 (2/6/2013)
Your best bet is to use a TALLY table, a CTE, or at worst a Recursive CTE.
using an crude tally table
With Cte_n
AS
(
Select 1...
February 6, 2013 at 7:50 am
(reposted from other thread)
Your best bet is to use a TALLY table, a CTE, or at worst a Recursive CTE.
using an crude tally table
With Cte_n
AS
(
Select 1 a Union ALL...
February 6, 2013 at 6:46 am
No problem, I wasnt sure which row you wanted the time assigned to, you could change the assignment round on the Lookup to the CTE a second...
February 6, 2013 at 5:08 am
ScottPletcher (2/5/2013)
That's an awful lot to ask of an intern. Geez, that's a lot to ask of someone with only 2 yrs' full-time experience!
Its called doing it on the...
February 6, 2013 at 3:21 am
something like this should work
I dont know how it will perform, on a large data set, but something like this is probably what you are looking for and should give...
February 5, 2013 at 9:35 am
ChrisM@Work (2/5/2013)
February 5, 2013 at 1:44 am
Viewing 15 posts - 346 through 360 (of 902 total)