Viewing 15 posts - 61 through 75 (of 462 total)
lmu92 (1/23/2010)
Did you notice that you've got two answers with sample code after that short time?The reason is simple: You provided ready to use sample data! Well done! 🙂
Cent percent...
January 23, 2010 at 12:24 pm
Just replaced table variable with temp tables
;WITH CTE AS
(SELECT R.TrnxID, RoutecD, R.CoutCD, Sequence, CoutDesc FROM
#TRouteD R
JOIN #tCounter S ON R.CoutCD = S.CoutCD)
SELECT RouteCD,
STUFF((SELECT '-'+p.CoutCD
...
January 23, 2010 at 12:11 pm
Exactly!!! and moreover.. you are an 'ssc- addicted'. By now you should be knowing how to post data?
January 23, 2010 at 3:34 am
Not sure if there is a better way to do it in 2000 , but if you have the luxury of creating a function, you can do it this way...
CREATE...
January 23, 2010 at 12:17 am
vick.ram79 (1/22/2010)
CodeName SARatio
---------- -------
AB ...
January 22, 2010 at 9:06 pm
ooaaaaaaa!!! see how old this thread was.. .you should've started a new topic..anyhow.. this works.
Declare @counterdatetime char(24)
SET @counterdatetime = '2010-01-24 22:30:43:234'
IF(CONVERT(DATETIME, CONVERT(VARCHAR(24),@CounterDateTime)) >= CAST('1/19/2010 10:44:18
PM' AS DATETIME))
BEGIN
PRINT...
January 22, 2010 at 11:24 am
Is this some kind of puzzle 🙂 ?? Care to elaborate a bit?
Can you tell us what do you mean by 'remaining things'?
January 22, 2010 at 1:34 am
Script all the sps (Obj exploere->right click on db -> tasks -> generate script) from a database, store it in one single sql file, open it in the new...
January 21, 2010 at 1:23 am
Just a guess work as you've not given us anything to work with. I think you need a dynamic sql to achieve whatever you are doing?
Something along these lines??
CREATE...
January 21, 2010 at 1:09 am
Thanks Gail, I just looked at the trigger code and it was just there for 'insert' and thought default would do. Your code above should do well for OP in...
January 20, 2010 at 7:47 am
Well, just to answer your query, one of the way could be this...
Select SYSTEM_USER
.
But I dont think trigger is the right way of handling it? You can just set the...
January 20, 2010 at 6:51 am
Thanks for the feedback 🙂 and try to give test data like that in the future whenever you need help and lot of folks here would be ready to help...
January 19, 2010 at 10:19 am
I mean, applying it to your query, it would become..
SELECT SUM(CASE WHEN dbo.LK_EXPHistory.Exp_High = 1 THEN 1 ELSE 0 END) AS High,
...
January 19, 2010 at 8:49 am
Since you are relatively new here (SSC), lemme help you with this...
Is this what you need, may be you need to SUM it instead of count?
CREATE Table #exp(High bit,...
January 19, 2010 at 8:45 am
hmm.. bit hard to understand this way.. do you think its possible to simulate and give some test data and table scripts. Read this article on how to do that..
http://www.sqlservercentral.com/articles/Best+Practices/61537/
January 19, 2010 at 8:34 am
Viewing 15 posts - 61 through 75 (of 462 total)