Viewing 14 posts - 16 through 30 (of 30 total)
Got the Point!!
Regards,
Karthik.
SQL Developer.
July 24, 2012 at 12:58 pm
Jeff Moden (7/24/2012)
Karthiart (7/24/2012)
select a.start,a.ends from
(select *,
ROW_NUMBER() over (partition by ends order by start asc) Ranking
from ranges)a
where Ranking...
Regards,
Karthik.
SQL Developer.
July 24, 2012 at 12:53 pm
Hi,
2 Things:
1. As Anthony said, please do have a create, insert or the required statements for your requirements. This will help the people to reply back you fastly.
2. Again...
Regards,
Karthik.
SQL Developer.
July 24, 2012 at 5:30 am
Your table schema and the insert values are not matching. Please check and re-post the values properly.
Regards,
Karthik.
SQL Developer.
July 24, 2012 at 3:29 am
Hi Below is the query for the scenario which you gave..
select a.start,a.ends from
(select *,
ROW_NUMBER() over (partition by ends order by start asc) Ranking
from ranges)a
where Ranking = 1
Regards,
Karthik.
SQL Developer.
July 24, 2012 at 3:20 am
Hi, Something like this..
SELECT A.XSYMBOL,A.XCLOSE,A.XDATE AS ILASTDATE,A.XTIME AS ILASTTIME FROM
(SELECT *,
ROW_NUMBER() OVER (PARTITION BY XSYMBOL ORDER BY XDATE DESC, XTIME DESC) [RANK]
FROM STOCKQUOTE)A
WHERE [RANK] = 1
Regards,
Karthik.
SQL Developer.
July 24, 2012 at 2:25 am
Hi,
In desination db Connection Manager, you can use the "expression" properties to set the db name dynamically. (Assign the DB name value to a Variable). Use this variable in your...
Regards,
Karthik.
SQL Developer.
July 24, 2012 at 1:32 am
Hi Saravanan,
Use DBCC DROPCLEANBUFFERS to test queries with a cold buffer cache without shutting down and restarting the server. DBCC DROPCLEANBUFFERS serves to empty the data cache.
Regards,
Karthik.
Regards,
Karthik.
SQL Developer.
July 23, 2012 at 6:23 am
Hi Michael,
Your Schema structure definition is perfect. Can you please brief your requirement clearly. So that i can try my best.
Regards,
Karthik.
SQL Developer.
July 23, 2012 at 6:08 am
Thanks All for your solutions.
Regards,
Karthik.
SQL Developer.
July 4, 2012 at 10:22 am
Here is my sp that i need to rename some server & db names.
create proc test
as
begin
select * from servername.dbname.dbo.tablename
end
Below is the sp that will replace the values according to the...
Regards,
Karthik.
SQL Developer.
July 4, 2012 at 6:29 am
Hi Anthony,
Here is an example
Daily backup will be there from Production TO TestEnvironment.
Production will have db name as 'Sample' But in UAT, we will...
Regards,
Karthik.
SQL Developer.
July 4, 2012 at 5:41 am
Yes Anthony correct.
But, If i start replacing it for first time then it will work perfectly.
On First Execution: 'Newdb.[Replaced_DBName].dbo.TableName'
But from the next time, when it find a word DBName, then...
Regards,
Karthik.
SQL Developer.
July 4, 2012 at 5:17 am
Hi Eugene & Anthony,
I tried that REPLACE, but that will work only for some extent.
If i want to replace DBName with Replaced_DBName means we cant use REPLACE right?
So can you...
Regards,
Karthik.
SQL Developer.
July 4, 2012 at 5:06 am
Viewing 14 posts - 16 through 30 (of 30 total)