I have a query which I put into a stored procedure.
The query has two parameters which are start and end date.
I execute this query via a web site.
When I enter small date ranges as t...
The idea is to retrieve the PNL by 5 minute increments, and calculate a percentage at each interval against the final PNL for that day. procedure input would be a TradingDesk and the start an...
Experts:
I need an EXAMPLE of a FUNCTION that you may have that basically is designed to ASSIGN A CUSTOMER STATUS to a customer number, based on some form of logic that is based on a SPECIF...
SELECT * FROM SIAPROD WHERE PRO_DESC LIKE '%100R12 3/8%'
SELECT * FROM SIAPROD WHERE PRO_DESC LIKE '%100R12 3/8%'
Is there any way to make only one query with several expression in like?...
Please see the TSQL below, it is inside a Stored Procedure, If I run just the SELECT statement by passing in the values directly it returns the right number but when I am using an IF statement...
I'm running some databases on a MS SQL 7.0 server and want to move these to a new box that is running MS SQL 2000 SP3. Tried the upgrade utility, but it supports only SQL 6.5. Is there another...
I am using MS SQL 2000.
I have 3 column
Sn. Name Sector
-----------------------------------------------------------
1 ABC 25,150,28,45,36,55...
Based on the example shown below. I would like to know how to get back the person, the reviewer and date of reviewer based on the most current review date of the three date columns.
Example...
Hi!
Is it possible to execute a dynamic procedure name fetched thru "select @myproc = storeprocname from customprocedures" and passing a parameter?
Looking for something like the EXEC sp_e...
I'm attempting a new install of SQL 2000 on Windows XP, where I accepted most of the default settings. In Enterprise Manager (left side), I'm able to navigate to the databases just fine (no l...
i want the results of an sql query to return all results that have a '%' in the field but since % is the wild card in sql i cant just use example like '%'.
i have tryed doing '%%', '/%', '%"...
I am new to ms sql server and I have a client whose host oniy has ms sql server 2000
but I have a copy of ms sql 2008. so I would like to know if there any confict with haveing both on the sa...
Why is this sp tryiing to return an int?
ALTER PROCEDURE [dbo].[testproc]
@FiscalPeriod nvarchar(20)
AS
BEGIN
declare @temp datetime
set @temp = (select min(date) from tableA wh...
Although this particular Update produces the intended results, it's performance is dismal, and I would like to call the SUM(dbo.TR_TransactionEntries.Days) just once instead of the multiple on...
Hi all, I can't find a way to retrieve the last login datetime of a particular database user in SQL Server 2005.
Anyone got an idea?
Does anyone know if I can make a procedure quit (raise an error) if it has run for more than x seconds?
My client is running MS Accounting 2007 - we are running into an error that the Primary Group is Full. The data base is set to AutoGrowth. Here's the error:
Could not allocate space for o...
I've found similar articles everywhere concering Linking Tables for many-to-many table relationships. However, I still don't know how the Linking table rows are populated. Is this done by Inse...
Hello, I have a table that has a bunch of orders in it. Table has following fields:
OrderNumber
LineNumber
ProductID
Qty
Data looks like this:
ORDER_NO LINE_NO PRODUCT_ID ...
SQL Server 2005
I want to add a check constraint on table exchange_rates so that dates are not duplicated
for e.g I cannot add 13/06/2008 as it already exists between dt_from and dt_to
This problem is on going for me as i am a complete novice with SQL Server 2005. I was getting memory alerts not so long ago on our SBS server about allocated memory. I moved an application o...
The Issue:
I have a set of Customers that have related Services. Some of these Services can not exist without another type of Service. For Example, Service = AB can exist alone, however...
I have a table that contains two columns, a date and a count. I need to write a query within a procedure that basically returns 0 or 1. If the data in the table shows an increasing trend (i.e....
How to decrypt the stored procedure in SQL SERVER 2000
Tables
Students PK StudentID
Dependents PK DependentID
PaymentRecord PK PaymentRecordID
I need to be able to record the payment records for students and dependents.
How would I design t...