Viewing 15 posts - 241 through 255 (of 275 total)
I think you're going the wrong direction....i think an easier solution would be to start at the other end....test for the presence of 1 record "given all conditions applied"....and if...
July 21, 2004 at 2:38 am
Without delving into the problem direct....I'd seriously advise you to ditch the cursors. The performance gains from doing SET-based operations is massive. 99% of SQL can be written without cursors. ...
July 9, 2004 at 2:54 am
Just remember...that consumer laws in most jurisdictions would expect any rounding to be in favour of the customer. A discount of 15% needs in practice to mean 15% or better....not...
July 9, 2004 at 2:46 am
other than the main one of a doubling of the storage capacity for companyname....and the consequent reduction in total capacity for storage on a row....there is v.little operational difference between the use...
June 4, 2004 at 2:38 am
talk about covering the bases!!!
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=35674
and the main advice of "supply the real DDL, sample input and expected results".....applies as the best advice everywhere!!!
June 1, 2004 at 3:10 am
it's nothing to do with the speed of SQL...or the seed number.
RAND() is evaluated once per result-set
NEWID() is evaulated once per row.
May 28, 2004 at 3:28 am
if you have 2 queries in a batch/sp....and the costs are estimated to be 66% and 34%....then you can (reasonably) infer that the 1st query will take/cost approx twice the...
May 28, 2004 at 3:27 am
no you just call the SP with the while loop once......
the while construct will keep updating batches of 10000 records until there are no more batches left....
and then it will...
May 28, 2004 at 2:36 am
I was aware my suggestion wasn't perfect....I was just trying to give a flavour of a solution!
...too busy (careless) to get it right....
any way that would be too easy for...
May 27, 2004 at 6:13 am
the best/closest one can do is to simulate this using a WHILE Loop
set rowcount 10000
WHILE @@ROWCOUNT > 0
begin
update x
set y = z
where a = b
end
set rowcount 0
May 27, 2004 at 2:45 am
Issuing begintrans commands outside of T-SQL/SP's is not a good idea....as you've found out....keeping it in SQL, allows the SQL engine to figure out/realise that the connection has been killed...
May 7, 2004 at 3:10 am
Also...
"A.SO_ID NOT IN (Select distinct(H.SO_ID) from PS_HH_NARDA_HIST H
where (H.HH_NARDA_STATUS in ('SB', 'RJ', 'RS')) and H.HH_NARDA_NUM <> ' ' and H.DTTM_STAMP < '2004-05-03') AND"
The DISTINCT portion of this is unnecessary...
May 5, 2004 at 3:21 am
That'll prevent future incorrect data.....Is the questioner not asking how to clean existing data?
select replace(replace(ssncol,'-',''),' ','') from ssntable
once it is cleaned....then it's just a case of parsing the result above into...
April 23, 2004 at 2:34 am
couple of things......
1. there's next to no difference between your UDF's (udf_SysComp, udf_TestSets, etc)...other than the hard-coded .ItemTypeUseID = xx statements....you could/should make them more generic....to minimise the amount of code...
April 14, 2004 at 4:19 am
1. analysis server http://www.microsoft.com/sql/evaluation/bi/bianalysis.asp
2. you could use 'own-codes' instead of GUID's.... ie prefix all data with the ZIP-CODE of the relevant city...
so you would have 90210-PRxx and 90111-PRxx and 90212-PRxx for...
April 14, 2004 at 2:37 am
Viewing 15 posts - 241 through 255 (of 275 total)