Viewing 15 posts - 1 through 15 (of 51 total)
Hey Journeyman,
Check out this stored proc:
create procedure dbo.usp_getData
(
@environment nvarchar(100)
)
as
begin
set @environment = ltrim(rtrim(@environment))
declare @errmsg as varchar(255)
if ( isnull(@environment,'') = '' )
begin
set @errmsg = 'No database provided'
raiserror...
May 30, 2005 at 9:03 am
Hi Larry,
From looking at your UPDATE statement, your performance problem seems to be in the way you are updating the totalpts column in the scoring table. The UPDATE...
December 12, 2004 at 10:34 am
Hi sstecher,
Although a query timeout increase is not recommended, below is the link that explains how to do it:
for local queries:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_5rfy.asp
for remote...
October 9, 2004 at 10:21 am
Hi,
You can also do it like this:
select suser_sid('BUILTIN\Administrators')
Regards,
JP
October 9, 2004 at 10:09 am
Hey Demicoq,
Try to see if this is what you are looking for:
create procedure dbo.usp_FindParentOf
(
@item integer,
@parent_relation varchar(50) = 'parent'
)
as
begin
-- table to store the...
October 9, 2004 at 9:33 am
Hey,
Check out if the T-SQL code below is what you are looking for or helps you get there:
create procedure dbo.usp_logError(@errcode integer, @errmsg varchar(500))
as
begin
insert into error_log(errcode,...
October 7, 2004 at 9:29 pm
Hi Yogi,
Try out these steps:
1) Have Enterprise Manager generate a CREATE script of the UDF functions you want to move
2) Copy the generated script code
In SQL...
October 3, 2004 at 5:04 pm
Hi Yogi,
It sounds like almost all your databases will be using the UDF functions.
Maybe, it might be less work if you just create the functions once in...
October 3, 2004 at 10:56 am
Hey Demico,
I edited the SQL proc in my previous post based on the info in your last reply (refer to my previous post for the edited code, it is...
October 2, 2004 at 6:00 pm
Hi Roxanne,
Have you tried writing VB code that uses ADO to execute your built queries?
You would need to return the SQL queries in a resultset. So, you...
October 2, 2004 at 11:42 am
Hey,
Check out if this SQL stored proc is what you are looking or helps you get there:
create procedure dbo.usp_getItemLevels(@item1 integer, @item2 integer)
as
begin
create table #hierarchy_levels (
parent...
October 2, 2004 at 10:15 am
Hey,
Check if this SQL is what you are looking for:
-- example: getting the 1000th row
declare @N_row as bigint
set @N_row = 1000
-- option to tell SQL...
October 2, 2004 at 8:50 am
Hey,
Check if this SQL gives you the results you are looking for:
SELECT
c.CustomerID, MAX(o.OrderID) AS OrderID
FROM
Customers c JOIN Orders o ON c.customerID = o.CustomerID
GROUP BY
c.CustomerID
HAVING
o.DateOfOrder = MAX(o.DateOfOrder)
September 12, 2004 at 6:55 pm
Hey,
SQL might look something like this:
SELECT
Product,
Location,
Type,
day_0 = SUM(CASE WHEN day = 0 THEN qty ELSE 0 END),
day_1 = SUM(CASE WHEN day...
August 7, 2004 at 7:09 am
thank you everyone for your input ...
msahoo, could you please post in this thread your code sample on how to call CDONTS from a stored procedure. i know...
July 29, 2004 at 8:33 pm
Viewing 15 posts - 1 through 15 (of 51 total)