Viewing 15 posts - 9,901 through 9,915 (of 13,469 total)
ok, here's some working code, witht eh update you seem to need; but here's the rub:
this is what it does:
for each matching record, if today happens to be sunday,...
March 3, 2010 at 5:05 am
ok great that helps a lot...i can do the table and the joins.
just need one more piece of information.
what do you want to do to RESULTDATE? i thought you either...
March 3, 2010 at 4:57 am
the problem is the @in_name.
since you are executing a string you put together, it is possible that instead of the expected customer name being 'dba-vb'
i could pass ''';DELETE FROM CUSTOMERS;DELETE...
March 3, 2010 at 4:35 am
if you have two logical steps, you'll need to update statements, each witha WHERE statement to control which rows get updated.
what does the stored procedure do?
your pseudo code doesn't have...
March 3, 2010 at 4:28 am
with a CASE statement, you can't. case statements return data or help filter a WHERE statement.
a case helps goes something like this:
SELECT
CASE
WHEN status=1
...
March 3, 2010 at 4:11 am
tfader is there any common themes applied to the parent-child fields, even when no FK is created?
for example, if the following are all true, i have a script i call...
March 2, 2010 at 6:52 pm
same issue that i saw in the other thread i think;
the mix of old vs new style joins is causing a cross join and increasing the rows processed:
select distinct a.empnumber,...
March 2, 2010 at 12:01 pm
...from Vwrevenue as a inner join #revdates as b on a.empnumber = b.empnumber, #daterange
i think because you inner join one table, and then use a comma to join the old...
March 2, 2010 at 11:43 am
Thanks Wayne;
I think the minor tweak Lynn suggested is better; the change you made gives some inaccurate/unexpected results, even though the code runs without error:
i think it's because i was...
March 2, 2010 at 11:19 am
BOL says ALTER LOGIN can be used to rename a login, the example is for a SQL login though:
--Changing the name of a login
--The following example changes the name...
March 2, 2010 at 11:06 am
yep that did it; I'm looking at it now, not sure why there's a difference.
March 2, 2010 at 10:58 am
yeah Lynn, i had done basically the same thing...when i use a function, the function works, and i get the delimited results as expected, but when i try to do...
March 2, 2010 at 10:02 am
he's just gone from the company, not dead. We had almost the same thing happen, guy left and noone knew what to do.
There's always the thought that someone leaves you...
March 2, 2010 at 9:08 am
i just create a view of a trace,a nd then scripted the view to be a table;
CREATE VIEW sp_DMLTrace
AS
SELECT * FROM ::fn_trace_gettable('c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\MyDMLtrace2.trc', default)
here's it's definition;...
March 2, 2010 at 8:53 am
To continue with Sarab's points, two issues I always check for:
update statistics on production; this can make a big difference.
does your procedure have "default" values for any of it's parameters?...
March 2, 2010 at 6:32 am
Viewing 15 posts - 9,901 through 9,915 (of 13,469 total)