Viewing 15 posts - 12,511 through 12,525 (of 15,381 total)
Well sort of...but your order by column is not unique so which value of 'A' is first? This makes it rather challenging.
this is close...
IF OBJECT_ID('tempdb..#GETID') IS NOT NULL drop table...
April 9, 2012 at 9:56 am
Well since it is public facing Windows Authentication is not going to work. You could add a SysModUID column or something along those lines to each table, make it not...
April 9, 2012 at 9:43 am
It is kind of hard to determine exactly what you are trying to do. You say Previous row but a table does not know anything about order. You need to...
April 9, 2012 at 9:32 am
Something like this:
declare @StartDate datetime = '2/1/2012'
declare @EndDate datetime = '2/3/2012'
select ROW_NUMBER() over(order by t.N), dateadd(d, t.N - 1, @StartDate)
from Tally t
where N <= datediff(d, @StartDate, @EndDate) + 1
April 9, 2012 at 9:21 am
You should be able to combine datediff, dateadd and a tally table to get what you are looking for. Read Jeff's article about what a tally table is and how...
April 9, 2012 at 9:15 am
I have to agree with Lynn. How about we take this approach, you go dig through the 100+ posts of mostly nonsense and find the ddl and sample data in...
April 9, 2012 at 9:08 am
Take a look at CDC (Change Data Capture).
April 9, 2012 at 8:45 am
As Lutz already said, if you want some real help you will need to provide some real information (ddl, sample data etc)...
Taking a shot in the dark it looks like...
April 9, 2012 at 7:43 am
Jeff Moden (4/9/2012)
Sean Lange (4/5/2012)
April 9, 2012 at 7:20 am
I may be a little late on this one but I would suggest you use @@servername instead of db_name(). This has bitten me a couple times in the past. You...
April 6, 2012 at 1:56 pm
Lynn Pettis (4/6/2012)
Sean Lange (4/6/2012)
April 6, 2012 at 1:08 pm
So given the error message what do YOU think the problem is? This is not some voodoo uber awesome sql thing hidden away. It should take anybody with basic sql...
April 6, 2012 at 12:19 pm
sknox (4/6/2012)
Sean Lange (4/6/2012)
... Basically you can simulate a foreign key via triggers but it is NOT actually a foreign key.
NO.
Any column in a table is a foreign key column...
April 6, 2012 at 12:11 pm
That won't run. There is a where clause stuck in there that I can't figure out what you are trying to with.
April 6, 2012 at 10:10 am
Jack Corbett (4/6/2012)
Sean Lange (4/6/2012)
Hugo Kornelis (4/6/2012)
Sean Lange (4/6/2012)
April 6, 2012 at 8:55 am
Viewing 15 posts - 12,511 through 12,525 (of 15,381 total)