Viewing 15 posts - 151 through 165 (of 683 total)
Another option...
delete a from
(select *, row_number() over (partition by CityName, Zip, Description order by CityName) as x from SC) a
where x > 1
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 30, 2008 at 11:33 am
Nicole (4/30/2008)
Hi all,can any one send me the query to find the number of rows for a particular column,
thanks
You have a terminology problem here, so it's hard to understand...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 30, 2008 at 10:13 am
karthikeyan (4/30/2008)
I have modified your query littleselect PRID, min(Year * 100 + Month)/100 as Year,
min(Year * 100 + Month)%100 as Month,
From #t1 group by PRID
It is working perfectly.
Yep - that...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 30, 2008 at 8:37 am
This query...
select *, Year * 100 + Month as YearAndMonth from #t1
...gives this output...
/*
PRID Month Year ...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 30, 2008 at 8:34 am
Here's another way...
select PRID, YearAndMonth / 100 as Year, YearAndMonth % 100 as Month
from (select PRID, min(Year * 100 + Month) as YearAndMonth from #t1 group by PRID) a
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 30, 2008 at 7:52 am
For a start, you can just take what you've done and nest the query you were putting into #A1
select #A1.PRID,Y,Min(Month)
from (
select PRID,Min(Year) as Y
...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 30, 2008 at 7:49 am
jpettigrew (4/30/2008)
I need to create stored procedure that will output information created 3
months after the record was created. For example: if the stored procedure was
run today or based...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 30, 2008 at 7:42 am
Use the other post! This one is the duplicate! Leave it alone... 😉
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 25, 2008 at 10:59 am
You'll get a reply, don't worry. The trouble with posting it twice is that someone might spend time trying to help you, only to discover you'd already been helped, or...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 25, 2008 at 10:45 am
Duplicate http://www.sqlservercentral.com/Forums/Topic490818-359-1.aspx
Please don't cross-post.
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 25, 2008 at 10:33 am
Jack Corbett (4/25/2008)
Got me again! 😀
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 25, 2008 at 10:31 am
The characters are probably some other 'invisible' characters - like tabs or returns.
Use something like this to figure out what the ascii values are...
select distinct ascii(substring(MyColumn, number, 1)) from myTable...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 25, 2008 at 10:30 am
This site is for SQL Server - you need a different site. Try this one...
http://www.dbforums.com/forumdisplay.php?forumid=81
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 25, 2008 at 9:44 am
Like this?
insert tableA
select col1, col2, col3, ... ,'MHCIRC1208' from tableA where bspid like '%CI11%'
Or is 'MHCIRC1208' derived somehow?
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 25, 2008 at 9:42 am
Jack Corbett (4/25/2008)
I hate it when that happens 😀
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
April 25, 2008 at 9:35 am
Viewing 15 posts - 151 through 165 (of 683 total)