Viewing 15 posts - 9,526 through 9,540 (of 15,381 total)
momba (1/25/2013)
Sean Lange (1/25/2013)
January 25, 2013 at 9:53 am
Depending on how often you will be running this query you might consider using sp_executesql instead of the more generic exec. It will cache your execution plan and more importantly...
January 25, 2013 at 9:20 am
jeff-weigang (1/24/2013)
TransDate GroupCode Symbol Price
1/21/2013 ...
January 24, 2013 at 4:03 pm
wmalik001 (1/24/2013)
First of, i am sorry for not providing the information in correct format secondly thanks a lot for your replies.I will provide the ddl soon.
No problem. It is hard...
January 24, 2013 at 1:15 pm
wmalik001 (1/24/2013)
create script:CREATE TABLE [dbo].[tablep1](
[iNumerator] [float] NULL,
[iDenominator] [float] NULL,
[vShortName] [nvarchar](255) NULL,
[VORGCODE] [nvarchar](255) NULL
) ON [PRIMARY]
This will work but do you really have no primary key?
Insert script:
INSERT INTO [comparison].[dbo].[tablep1]
...
January 24, 2013 at 12:54 pm
This should be reasonably close...not sure what columns you are using to determine if it exists.
select iNumerator, iDenominator, vShortName, VORGCODE
from Table2
where NOT EXISTS
(
select iNumerator, iDenominator, vShortName, VORGCODE
from Table1
Where Table1.iNumerator...
January 24, 2013 at 12:52 pm
Can you post ddl (create table scripts) and sample data (insert statements)? Something so we can create tables and data locally?
January 24, 2013 at 12:46 pm
You absolutely do not need a single cursor, let alone nested cursors for this. You need to use a calendar table. Just do a quick search on this site and...
January 24, 2013 at 12:31 pm
Can you post ddl (create table scripts) and sample data (insert statements)?
I don't understand why the output would be only the one row. None of the rows you posted are...
January 24, 2013 at 12:30 pm
dclemens (1/23/2013)
Sean Lange (1/23/2013)
January 23, 2013 at 1:41 pm
What a completely bizarre requirement. However you did provide very easy to consume data!!! A solution here is not really too bad. Just add the next character into your CTE...
January 23, 2013 at 12:37 pm
Your query doesn't produce any results because it has a table called manpowerprofile? If I comment out that table it returns a single value - 26. This is consistent with...
January 23, 2013 at 12:19 pm
The kudos belongs to Michael Higgins. He provided the solution. I just suggested a way for you to fit it in with your system. 😀
January 23, 2013 at 9:55 am
s_osborne2 (1/23/2013)
Thanks for you help.
I've been playing with this, and you're right it does work but doesn't give me the solution to the problem i have. I've given @table as...
January 23, 2013 at 9:33 am
dclemens (1/23/2013)
I've been working on a...
January 23, 2013 at 9:27 am
Viewing 15 posts - 9,526 through 9,540 (of 15,381 total)