Procedure Increase By % Using Criteria?
Sep 17, 2014
I am trying to increase the price of an product by a user entered % for items with Dishwasher in the itemdesc.
Below is the procedure I have which doesn't appear to show any errors in the SQL Developer.
CREATE OR REPLACE PROCEDURE AdjustPrice(
pItemDesc IN ITEM.ItemDesc%TYPE,
pPercent IN NUMBER)
IS
BEGIN
UPDATE Item
SET ItemPrice = ItemPrice + ItemPrice * pPercent / 100
WHERE ItemDesc = pItemDesc;
END;
This is my run script:
BEGIN
AdjustPrice ('%Dishwasher%',10);
END;
I think the problem is with the way I have done the run script to filter to items with Dishwasher in the description. I tried LIKE an that didn't work either.
View 2 Replies
ADVERTISEMENT
Sep 25, 1998
Hi,
I am writing an ASP based application that creates a dynamic querry and then
executes it and displays results. I was thinking about writing a stored procedure to increase performance. How much can the SP help me boost querry responce time ???
Thanks for your time,
Robert
View 1 Replies
View Related
May 28, 2008
Hi,
Can any one give me an idea how can i increase performance of the stored procedure.
In SP many temporary tables are used.
Also i need a information from any one you that is there any tool to find out the performance of a query or SP etc.
Thanks
Ganesh
Solutions are easy. Understanding the problem, now, that's the hard part
View 4 Replies
View Related
Jun 24, 2008
I am trying to test the connection pooling of my app and need to artificially increase the execution of a stored procedure to 10-15 seconds. There aren't any big tables in my sample data to select on. What would be the easiest way to make a stored procedure fun for a few seconds?
Thanks.
View 6 Replies
View Related
Apr 7, 2015
I have a store procedure that search by Firstname and Lastname. I want it search by either both (Firstname and Lastname) or any of them. For example if only FirstName passes to it shows all the record with that Fistname. Currently I have to pass both Firstname and Lastname to my store proc to get the result.
This is my stor proc:
USE [CustomerPortal]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[CSA_Search_Customer_By_Name]
[Code] ....
View 4 Replies
View Related
Dec 13, 2006
Hello All,
I was hoping that someone had some wise words of wisdom/experience on this. Any assistance appreciated... feel free to direct me to a more efficient way... but I'd prefer to keep using a stored proc.
I'm trying to pass the selected value of a dropdownlist as a stored procedure parameter but keep running into format conversion errors but I am able to test the query successfully in the SQLDatasource. What I would like to do is this: select * from tblPerson where lastnames Like "A%" . Where I pass the criteria after Like. I have the values of the drop down list as "%", "A%", "B%", ....
I've been successfully configuring all of the other params, which includes another dropdown list (values bound to a lookup table also)... but am stuck on the above...
Thank you for any assistance,
View 3 Replies
View Related
May 24, 2004
For example, consider the following queries:
DECLARE @SomeParam INT
SET @SomeParam = 44
SELECT *
FROM TableA A
JOIN TableB B ON A.PrimaryKeyID = B.ForeignKeyID
WHERE B.SomeParamColumn = @SomeParam
SELECT *
FROM TableA A
JOIN TableB B ON A.PrimaryKeyID = B.ForeignKeyID AND B.SomeParamColumn = @SomeParam
Both of these queries return the same result set, but the first query filters the results in the WHERE clause whereas the the second query filters the results in the JOIN criteria. Once upon a time a DBA told me that I should always use the syntax of the first query (WHERE clause). Is there any truth to this, and if so, why?
Thanks.
View 3 Replies
View Related
Dec 10, 2007
Choose an EEO-1 Classification: Increase all employees salaries that have: the selected EEO-1 classification by 10%.
Increase all employees salaries by 5%
Hi! I am new to SQL, but trying to teach myself. I have had lots of help from you guys and appreciate it very much. Today, I was trying to do the following:
In my table of "Employees", I have a column called classifications. I want to increase the salaries of the employees with a classification of EE0-1 by 10%, but I have not figured out to do so.
My second question is how would I increase all employees' salaries by 5%?
Anyone can help?
Thanks!
Scott
View 2 Replies
View Related
Jul 20, 2005
i have DB 2GB on disk.if i increase tha ram up to 4GB, the sql sever use with theram to his temporary table while process quiry?
View 1 Replies
View Related
Sep 2, 2004
Hello all,
I have, what i think, is a unique problem that i'm hoping some of you can help me on.
I need to create a record number that is incremented by 1 whenever someone adds a new record to the database. For example, records numbering 1,2,3 are in the database. When the users adds a new record, SQL takes the last recordno, 3 in this case, and adds 1 to it thus producing 4.
Also, i need to have the ability to replace deleted record numbers with new ones. Using the example above, say a user deletes record number 2. Whenever someone adds a new record, sql would see the missing number and assign the new record that number.
I hope i'm making sense here. Does anyone have any ideas about this? Any articles on the web that someone could point me to?
Thanks.
Richard M.
View 1 Replies
View Related
Jan 26, 2004
Can someone tell me how I can write a stored procedure that will automatically increment the value of the index by 001? I am attempting to build a table for a menu system and I need to increment the index value of the document by 001 when submitted to the database. I also need to have the script obtain the last index value of the node before inserting new value.
All ideas appreciated.
Sincerely,
Tim
If interested, this requested is based upon an article written by Michael Feranda:
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=7321&lngWId=4
View 1 Replies
View Related
Oct 30, 2006
Database's log file can not increase when nearly get 2 GB
Mine is sql server2000,What's wrong with this? Any idea about this?
Thanks
View 2 Replies
View Related
Mar 5, 2007
hi,
I have one DB in SQL Server 2005.When I was creating it
takes 7813 MB.Now the databse size almost full.Now I want to extend the
DB Size.At my HDD has more space(near by 160 GB).But I don't know how to
extend the Size.More over I had one doubt.Am executing the
exec sp_helpdb command.It shows the Datafile maxsize is Unlimited.I want to
know when the data is full,whether it automatically takes the size from the
HDD or not.
Please Help me out to this Problem.
View 2 Replies
View Related
Feb 14, 2007
We are getting the following error on an SSIS package:
"54 Diagnostic VirtualSQLName DomainUserName Load Daily 859CF005-CB7F-47D8-8432-AE7C074B343C 1A986F18-343F-4424-ABAB-AC6575187DF3 2007-02-14 10:05:42.000 2007-02-14 10:05:42.000 0 0x Based on the system configuration, the maximum concurrent executables are set to 4. "
Basically it is saying the we have reached the maximum amount of executables. How can we increase this value and where?
Thanks
View 3 Replies
View Related
Jan 10, 2008
I am really starting to like CTEs. My only qualm is that you can only use them within the first statement after you declare them. I wish they would remain active for the duration of the sql batch just like everything else (variables,local temp tables, ect). Is there any trick so that you can use them multiple times? Maybe define them as a string and do dynamic sql or something like that? Hopefully (i have not researched the new version of sql server) in SQL Server 2008 the scope has increase. Anyways any help would be appreciated.
thanks,
Ncage
View 19 Replies
View Related
Apr 1, 2001
Hi,
I created a view on two huge tables. I tried to run a simple SELECT statement on this view and it took me several hours to obtain the result. How can I improve the performance of a view? The view should make use of the indexes built in both table, am I right? Thanks.
View 1 Replies
View Related
Jun 29, 2000
"Cursor provide row-by-row level processing and it will store the result sets in 'TEMPDB' database".
(Because of this) or (By using Cursor in Triggers or Stored Procedures) the performance will increase or performance will come down?. I am thankful if I get a good reason for this?
Srinivasan
View 3 Replies
View Related
Jan 29, 2001
I wonder is there any way to increase number of server licences without re-installing SQLServer?
View 1 Replies
View Related
Sep 4, 1998
I am receiving an error from my ODBC driver “Maximum number of DBPROCESSes already allocated.”
I confirmed that there are 25 connections and that this is the default. This is caused by error message 10029, SQLEDBPS, when the maximum number of simultaneously open DBPROCESS structures exceeds the current setting. I would like to increase this maximum.
I have found only two ways to do this. One is using dbsetmaxprocs using C and the other is using SqlSetMaxProcs using Visual Basic. My problem is that I am interfacing to SQL Server using a third party tool that is doing the lower level programming.
Is there some way that I can increase the maximum number of DB processes for all databases that are part of the SQL Server 7 environment, or can I set this value using a program that is called from a stored procedure?
Any ideas in this area will be greatly appreciated.
View 1 Replies
View Related
Oct 6, 1998
Hi all,
I encountered error 1105 (Can`t allocate space for object .....) while running a query.
I had dump transaction with no log sucessfully and retry running my query but
still encounter error 1105.
I had checked my database size and following are the info:
Datasize : 2500MB Database size available : 753.39
Log space : 500MB Log space available : 500MB (this was acheive after
after dump trans. twice. it was around 480MB before)
Thus looks like the data segment is full!!!
I expanded the size of the disk device D on which the segment device A is on by 50MB. When I did a sp_helpdevice D, the expansion is reflected.
Next I run sp_extendsegement, A, D.
However running sp_helpsegment A doesn`t show that segment A is expanded.
Please help!!! How do I expand the size of the segment? (without creating a new disk device, is it possible)
Any other way to resolve this problem?
Also how to check if a particular segment is full? eg. the %usage of data/log segment.
Thanks in advance.
View 1 Replies
View Related
Jan 27, 1999
I seem to remember that the font size and type can be controlled in SQL Server 6.5 and the process controlls the fonts displayed
throughout the program - Enterprise Manager, Query Tool, etc.
I have just re-installed 6.5 and the fonts are way too small.
Can anyone tell me how this is done?
Thanks.
Jack
View 1 Replies
View Related
Jul 14, 2004
Can someone tell me how to increase tablespaces in SQL Server?
Is the syntax the same as Oracle? Is there a wizard in Enterprise Manager?
Cheers
View 4 Replies
View Related
Dec 21, 2004
We are using SQL server 7.0, our users use to connect to SQL server remotely using Visual Basic Application. When all the users are connected it keeps on increasing the memory utilization and at 1,836,848 KB memory utilization it stops increasing the memory i.e memory utilization become stangnet. The actual amount of physical Memory is around 5GB but SQL server dont increase it after the treshhold level and the performance of the server get affected badly. Any one please suggest me the possible solution.
View 2 Replies
View Related
Jan 13, 2005
I have a database that is over 45 GB and need to increase the size, can someone help me with the code to get it done?
Thanks
View 6 Replies
View Related
Jul 15, 2006
Dear
I am using varchar data type in my table.it provides maximum 8000 character. but i want more than that.
how to increase size more than 8000
i want to use text datatype but when i type in length it doenst type.it displays only 16.i cant change to another value.
please help me out
Waiting for reply
Regards,
ASIF
View 1 Replies
View Related
Apr 29, 2014
Am using Windows Server 2008R2,In this Server C:/ drive space is getting increase day by day as per my knowledge i have to format that system.If is there any other chances to get space and remove unwanted things from my Server.
View 7 Replies
View Related
Nov 10, 2006
Dearfriends,
please guide me,
i've a column with varchar(100).
presently, i need that column as varchar(500).
thank you very much.
Vinod
View 4 Replies
View Related
Jan 22, 2007
I use Sql server 2000.I have implemented paging as guide in link :
http://dotnetjunkies.com/Tutorial/975BE770-E5DC-4610-870B-A82BDB9B8845.dcik
Is peformance good ? My database has 200000 records.
I feel my web application quite slowly in loading.
I suppose that 100 user simultaneously run in store above links.Mean that it create 100 temp table and load 100 * 200000 records.is it correct ?
Please give me valueable suggestion about performance.
Thank you very much.
View 1 Replies
View Related
Feb 23, 2007
Dear friends,
i've a column with nvarchar type. how can i increase the size of the column?
Vinod
View 5 Replies
View Related
Nov 3, 2006
Hello again,
I'll just throw my question: how could I increase SSIS-performance?
I have a really heavy job with thousands of records my base selection, then I perform some lookups (I replaced most of them by sql) and derived columns (again, I replaced as much as possible by sql). Finally, after a slowly changing dimension task, I do update/insert on a given table. Is there a trick to speed up lookups and inserts (something like manipulating the buffer sizes - just asking).
Fact is that I replaced a script task by pure sql-joins and gained 6 of the 12 hours this job took.
Any ideas?
Greets,
Tom
View 2 Replies
View Related
Jul 9, 2007
hey
i've a db running sql server express sp2. the db size now is 1.1 gb
i've a table with a varchar column of size 20 . when i try to increase the column size to 50 i get a
timeout exception, and the the cloumn size is unchanged. this table has 2.5 million records
i use sql server management studio express to do the changes
is there a way to increase this timeout or whtever i can do to update this column size?
thx in advance
View 4 Replies
View Related
Oct 23, 2006
Is there any way to increase the activation time, i.e. the time between service broker creating a new instance of the activation SP.
View 3 Replies
View Related
Oct 22, 2007
Hi,
How can I increase the transaction log size of my sql server 2005 database? i can execute the shrink and backup log which can shrink the .ldf file to 1MB. However, since my dts involves a lot of inserts and updates, the my transaction log grows to 700MB in the middle of my dts execution. How can i increase the transaction log size maximum capacity to probably 1.5GB just so it can accommodate my full dts execution?
BTW, this is my commands to shrink the log file:
DBCC SHRINKFILE(<dbname>_log, 1)
BACKUP LOG <dbname> WITH NO_LOG
DBCC SHRINKFILE(<dbname>_log, 1)
cherriesh
View 3 Replies
View Related