Viewing 15 posts - 1,201 through 1,215 (of 1,472 total)
Please do not double post. It clutters things up and is generally confusing.
The other thread... http://www.sqlservercentral.com/Forums/Topic594962-338-1.aspx
Maybe I'm missing something... but I don't see where that script generates that...
October 31, 2008 at 12:40 pm
This should do it. In place of the bogus data and the table variable I'm using, create a temp table (with the exact same definition, the index is vital)...
October 31, 2008 at 11:56 am
Try this:
SELECT CONVERT(datetime,'27/08/2008 05:37',103)
The 103 specifies that the date is in British/French format.
October 31, 2008 at 10:02 am
GilaMonster (10/31/2008)
Garadin (10/31/2008)
Syntax issue.Use this instead:
select id, name, changedate
from table1
where changedate > GETDATE()-5
Beware of the time portion of dates. That, if run now, would miss any entries with a time...
October 31, 2008 at 8:08 am
Syntax issue.
Use this instead:
select id, name, changedate
from table1
where changedate > GETDATE()-5
October 31, 2008 at 7:57 am
A good attempt, especially if this gives you the data you were after. These aren't quite derived tables, as they make reference outside themselves and are recursive. Here's...
October 31, 2008 at 6:40 am
luissantos,
If you can post some table Definition / Sample Data for this (an example of how to do this is in my signature), we can help you write...
October 30, 2008 at 10:28 pm
I stumbled across a very tricky way to create this table in the beginning a couple months ago. Apparently it's a pretty standard VB trick, but my background is...
October 30, 2008 at 10:01 pm
The link in my signature will give you an example of the proper way to post the information Greg is asking for. It's a good article to read for...
October 30, 2008 at 9:53 pm
GIMME A BREAK HERE !!
I was focused on showing the compromise solution to the duplicates only, since no one had any problems identifying the breaks. How...
October 30, 2008 at 2:39 pm
Row 5 should be included, as it's a code change. He doesn't want *dupes* of C, but if it's a code change, it is still included.
October 30, 2008 at 2:04 pm
Yes Garadin, I understood what you meant but I couldn’t see an other way to do it. I was thinking to create fake data and do it. But it is...
October 30, 2008 at 12:51 pm
The box is from the QUOTE tags. I responded to your message. I know it's fast, that's what's weird about it. It *should* be slow... but it's...
October 30, 2008 at 9:58 am
Putting criteria in your WHERE that references your LEFT JOINED table prettymuch negates the entire purpose of left joining.
Heh, you just came full circle on this one and did...
October 30, 2008 at 9:51 am
;with cte1 as -- identify breaks
(select t1.RowID,t1.code
from #temptable t1
where t1.code <> (select top 1 code from #temptable where RowID < t1.rowID order by rowID desc)
)
This is a set based solution...
October 30, 2008 at 8:02 am
Viewing 15 posts - 1,201 through 1,215 (of 1,472 total)