Viewing 15 posts - 1,306 through 1,320 (of 2,894 total)
Lowell (8/30/2012)
you could search for words that exist after "FROM" and "JOIN", right? ...
What about: INSERT, INTO, DELETE, TABLE (in possible truncate, create, alter or drop table statements).
August 30, 2012 at 6:54 am
No probs.
Actually it was never safe to use three part set in quirky update.
If your read BoL abnout UPDATE you will find that:
Setting Variables and Columns
Variable names can be...
August 30, 2012 at 6:39 am
Search for "OMG" In J.M. article:
http://www.sqlservercentral.com/articles/T-SQL/68467/
It does explain the problem in details and gives good example.
August 30, 2012 at 5:01 am
Replace the line executing the proc with following:
declare @dt datetime = CAST (FLOOR (CAST (CURRENT_TIMESTAMP as float )) as datetime)
exec dbo.CreerFile '00000000-0000-0000-0000-000000000000',@RefCourrier , @dt
August 30, 2012 at 4:58 am
...
...
,@tempno = helpergroupno = CASE
...
Please note, the "three-parts" SET is not reliable. You better to split it to two of "two-part" SET's.
August 30, 2012 at 4:38 am
CELKO (8/29/2012)
In the early days, we had to load parameters into registers in the hardware. Why are you still doing that with local variables?...
Oh those old days,
They gone away.
But...
August 30, 2012 at 3:15 am
...
In light of that, it makes a lot of sense to always code your update statements with conditions that verify that the rows actually need to be updated, especially since...
August 29, 2012 at 11:29 am
...
P.S. Respectfully, to everyone shouting at Sergiy: he may have an apparently combative style...
I wouldn't call it shouting as such. But that exactly style makes this thread a real thriller!...
August 29, 2012 at 9:42 am
....
IF YOU DON'T FEED A TROLL EVENTUALLY IT WILL STARVE TO DEATH AND GO AWAY! LET THIS GUY BE WRONG AND MOVE ON! ALL HE IS DOING IS...
August 29, 2012 at 6:58 am
...
You can slightly simplify this be leaving out the Group By clause in the subquery. It's not necessary, since the Where clause already enforces a distinct value. Not...
August 28, 2012 at 10:45 am
Luis Cazares (8/28/2012)
create procedure dbo.STORED_PROC_NAME
(
@sstrg varchar(100)
)
as
begin
set nocount on;
--declare @strg varchar(100) = 'Catalog',
set @sstrg = '%' + REPLACE( @sstrg, '*', '%') + '%'
SELECT project_name
FROM...
August 28, 2012 at 9:48 am
anuj12paritosh (8/28/2012)
HI ALLPLEASE PROVIDE SOME EASY WAY IF YOU KNOW
THANKS
The easiest way to achieve that will be switching to SQL2012 and using sequences.
All others ways will not be easy...
August 28, 2012 at 9:46 am
Sergiy (8/27/2012)
SQL_path (8/27/2012)
GSquared (8/24/2012)
Same as any other table.and should i drop the ## table in sp2 and sp3 both?
Generally the good practice is to drop objects within the same procedure...
August 28, 2012 at 4:23 am
Jeff Moden (8/24/2012)
tyson.price (8/24/2012)
Do you think this:
SELECT SUBSTRING(@Source,PATINDEX('%[^'+@Char+'X]%',@Source),1000)
out performs this:
select REPLACE(LTRIM(REPLACE('000temp001', '0', ' ')), ' ', '0')
"A Developer must not guess... a Developer must KNOW!" 😉 Test it. ...
August 24, 2012 at 2:03 pm
tyson.price (8/24/2012)
I get your point but, that is why we have comments. I will take performance over easy to read any day of the week. Comments are easy to type...
August 24, 2012 at 1:23 pm
Viewing 15 posts - 1,306 through 1,320 (of 2,894 total)