all groups > sql server programming > june 2004 > threads for saturday june 12
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
best way to tune a stored procedure?
Posted by AFN at 6/12/2004 11:28:45 PM
I have a big 200 line stored procedure that pulls (select ...) data from 10
joined tables. Results are slow, often taking about 4-10 seconds for 1000
rows of output. The SQL Server hardware is new and fast. What are the
steps I should follow to tune this stored procedure and/or the applicabl... more >>
How to restrict data by locations
Posted by Debbie at 6/12/2004 8:17:01 PM
Hi all,
We have a central database with a number of remote sites that need to see the data particular to their site only. We now have Access 2002 and are using replication. How would this be accomplished in SQL Server? Do we have to use replication? Thanks so much.
Debbie... more >>
Re: Query help
Posted by nagu at 6/12/2004 7:39:48 PM
Hi Celko,
Sorry about the missing DDL
it is like this
CREATE TABLE DataChain
(old_val nvarchar(50) NOT NULL,
new_val nvarchar(50) NULL);
I do not see how the chain is traversed in your solution. And I do not
have the liberty to pick one marker - This is the data I get. In fact
it gets ... more >>
Stored Procedure - Unable to create a dynamic SQL
Posted by Sevugan at 6/12/2004 6:32:25 PM
Hi,
This is the stored procedure which will return the account name given
account code. I am not able to execute the same. I get the below error.
Please help me out to solve this problem
Server: Msg 137, Level 15, State 1, Line 1
Must declare the variable '@svAccountNameTemp'.
CREATE PR... more >>
Query help
Posted by Shawn at 6/12/2004 1:20:22 PM
I have a table like:
ComNbr MinYear MaxYear
200 1998 2000
I want to get result with the company nbr and evey year between MinYear and
MaxYear. It is like:
ComNbr Year
200 1998
200 1999
200 2000
How can I do it? Thanks.
... more >>
"EXISTS" is a ANSI SQL syntax of SQL server specific syntax.
Posted by Peri at 6/12/2004 12:34:32 PM
Hi,
I am developing an application for both oracle and SQL server. Can anyone
tell me,
1. "EXISTS" is available in oracle or not ?
2. What are the consideration should I take If I need to code for SQL server
and Oracle ?
--
Thanks and Regards,
Peri
... more >>
calculating whole school total tuition
Posted by gazawaymy at 6/12/2004 12:08:01 PM
I am trying to calculate a whole school total tuition. I've been helped with individual tuition total which I came up with
create proc sp_individualtuition
as
select c.contractNum, (c.tuition-((sum(d.discountPer))* c.tuition)) as totaltuition
from contract c, contractDiscount cd, discount d
... more >>
SQL SCRIPT
Posted by AQ Mahomed at 6/12/2004 11:56:44 AM
Hi
I need to write a script that will return data on a condition;
I have a field that has the ability to take 30 characters, I need to
extract all rows that have less than 10 characters in this specific
field.
Many Thanks
AQ
*** Sent via Devdex http://www.devdex.com ***
Don't just ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
msde create view error
Posted by TJS at 6/12/2004 11:39:55 AM
why does the following :
========================
CREATE VIEW vw_users AS
select *
from
portal_users, portal_userRoles, portal_roles
where
Portal_users.userID = Portal_userRoles.UserID
and
Portal_userRoles.RoleID = Portal_Roles.RoleID
===============================... more >>
SQL-Query with virtuell Index Column
Posted by milmus tender at 6/12/2004 8:33:02 AM
Hi,
I have a table with two columns: The first is an unique id and the second a group. Now I need a select statement which get me these 2 columns and a third one which should be an counter for the current group.
The following TSQL-script shows my source table and the result which a I want to get... more >>
Dynamic T-SQL
Posted by Alan Seunarayan at 6/12/2004 8:28:53 AM
Hello all,
Is it possible to create a Stored Proc that executes a dynamically built
SQL statement and return the results? I know it is possible in Oracle's
PL/SQL but can SQL Server do it?
ie
Create Proc dbo.Test(@Clause varchar)
as
Exec @Clause
return
Cheers,
Alan
... more >>
Extending T-SQL with COM
Posted by Bob Zagars at 6/12/2004 7:53:01 AM
I am trying to use Excel financial formulas in a stored procedure and can not resolve a problem.
I read an White Paper article by Dan Jurden that showed how to use the PMT function in Excel which seemed logical to fit my needs for a project I have to develop.
I used primary all the syntax and ... more >>
Query help
Posted by nagu at 6/12/2004 6:54:02 AM
Hi,
I have a table dataChain as follows
oldVal, newVal
And the data can be a chain as follows
oldVal newVal
a b
b c
c null
So when u search with a or b, you need to get c (the last oldVal with
newVal null or blank ie '')
Right now I am looping li... more >>
I have generated scripts in ent.manager. How do I run these scripts? PLEASE HELP!!!
Posted by mortenjj NO[at]SPAM broadpark.no at 6/12/2004 3:32:21 AM
Hi.
I'm a newbie with sql server, but I have long experiences with
databases (db2 and oracle)
I have 1 production server and 3 test machines. I would like to
transfer tables etc from one machine to another. In this case I just
wanna do something REALLY simple.. (so I thought atleast..)
I... more >>
Insert Into without identity columns
Posted by Jaco at 6/12/2004 3:20:01 AM
Hi
I had to create a bunch of inserts from two tables into another table. The problem I had is that we do not use identity columns.
----- I started by inserting the data into a temp table -----
Select Name, Address1, Address2, Address3, Address4, Postcode, Phone, Fax, 19 as 'type'
into #j... more >>
Subquery to rank in Group
Posted by Valmir.Meneses NO[at]SPAM noesisglobal.com at 6/12/2004 1:26:01 AM
Hi ,
I could use some help on a query.
I need to return the second best (rank) from within a group.
Take the sample below from NorthWind Database:
Select Distinct CategoryID,SupplierId,ReorderLevel
From Products
Order by CategoryID,ReorderLevel
Result set:
CategoryID SupplierId Reorder... more >>
|