39 Topics

Member Avatar for
Member Avatar for subhashish12

hello i need solution for to create a insert/select/delete/update stored procedure in mysql and how to call them from php currently i am using xampp 1.6.6 version of software thank you

Member Avatar for Adnan_10
0
3K
Member Avatar for Bob Hensley

# MySQL Stored Routines: Another Useful Scenario # [In a past guide](http://blog.bobbyhensley.com/sql-procedures-functions-authentication-example/) I discussed MySQL stored routines within MySQL. Now I’m back with another guide on MySQL stored routines. And this time it’s a more concrete case; one that you may run into yourself in the future (or maybe you …

Member Avatar for batuzai04123
2
494
Member Avatar for Maideen

Hi. I am Sorry that I don't know how to ask question for my Scenario. Thats why I just used "How to update qty into table2 from table1? " This is the scenario of one of my customer Table-1 Subscription Master(News Paper) - Received Subscription CustCode Name Copies date Agent …

Member Avatar for simplypixie
0
210
Member Avatar for nevek

Hi I have a stored procedure with a cursor which check if a field is filled in after a certain deadline. DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `controleDeadlines`() BEGIN #declaratie variabelen die nodig zijn declare cId int; declare cDeadline text; declare cUitgevoerd date; declare cOpmerking text; declare cStatus text; declare DONE …

Member Avatar for nevek
0
282
Member Avatar for morfious90

I'm implement if else in stored procedure with and oprator . If both Conditions are true the if statement should return 1 else -1. here username and email should not be duplicate please review query below. alter proc spUserdetailss @name Nvarchar(50), @passwords Nvarchar(100), @emailadd Nvarchar(50), @Gender nvarchar(50) as begin declare …

Member Avatar for pclfw
0
414
Member Avatar for spowel4

I have this query as part of a stored procedure, and this query as it is listed here works: INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 8.0;Database=G:\KF\GBSData.xls;', 'SELECT * FROM [Sheet1$]') SELECT * FROM [KWF_GBSData].[dbo].[tblKWF_WorkTable2] WHERE invoiceNumber IN ( SELECT invoiceNumber FROM [KWF_GBSData].[dbo].[tblKWF_WorkTable2] WHERE stockNumberShipped LIKE 'CCCOMBO%' ) I would like to change …

Member Avatar for askme_1
0
554
Member Avatar for Himanshu Chawla

** Hello i am newbiw to MYSQL .... iwant to create stored procedure in PHPMYADMIN . But when i am same procedue od MS SQL in MYSQL it is giving error . #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL …

Member Avatar for AleMonteiro
0
334
Member Avatar for darijan.mekic

0 down vote favorite I have a table: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `score` int(11) NOT NULL, PRIMARY KEY (`id`) Now i want to create a stored procedure that will insert new column into this table with the next id (which is …

Member Avatar for parijatziw
0
321
Member Avatar for nel gomez

Good day, Just want to ask some help, Please! I always encounter "Cannot find Table 0" when i call Stored Procedure in DB2 using VB .Net with Ole DBConnection Provider. Here is my code: Private Sub cmdPost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPost.Click rsSearch = clsDAOMngr.getConfigParam(2) For …

Member Avatar for Begginnerdev
0
577
Member Avatar for arkulin

I am trying to create stored procedure which will insert one row in the first table and identity of inserted row in other two tables. For some reason I am receiving error "Procedure or function expects parameter '@id', which was not supplied.". My code is as follows: ALTER PROCEDURE InsertProf …

Member Avatar for arkulin
0
379
Member Avatar for Lethugs

Hi, is it possible to combine Stored Procedure and Text Command Type in Select Statement? I have a stored procedure that compute available items, it quite a bit long select statement, now i need to call this statement in another select statement which is in text command type, how will …

Member Avatar for ryanjayson
0
462
Member Avatar for MEHMET TURAN

This SP is working well. But when recordcount in dbo.PTSGELEN is over 1000000 approx. it comes timeout error. ALTER PROCEDURE [dbo].[PTS2Tabloya] @KOLETIK nvarchar(40), @SIL tinyint , @EKLENEN int OUT AS BEGIN SET NOCOUNT ON; set @EKLENEN = 0 IF @SIL=0 AND LEN(@KOLETIK)=20 begin INSERT INTO dbo.URUNGIR (GTIN,SN,XD,BN,CLABEL,SLABEL) SELECT GTIN,SN,XD,BN,CLABEL,SLABEL FROM …

Member Avatar for BitBlt
0
177
Member Avatar for logicslab

Dear friends, I am using Wordpress 3.6 . I need to integrate an alert system(to send email notification) to users when a preference value (Reach price of onion 40 $/kg). Is stored procedure can do any thing with it? Please advise how it is feasible. Thanks, Anes

Member Avatar for pritaeas
0
168
Member Avatar for weeraa

I faced to a huge problem when i coding some stored procedure. How to combine some string to sql string in stored procedure??? This is what i did upto now. @WhereCondition = ' WHERE id = 102 ' DECLARE recoredSet CURSOR FOR SELECT SUM(Amount) as AmountSum FROM sale + @WhereCondition …

Member Avatar for C#Jaap
0
224
Member Avatar for riahc3

I currently have $tableName="thenameofthetable"; $someid=$_GET["someidthruget"]; $result = mysql_query("SELECT name,age FROM ". $tableName. " WHERE idp=". $someid); Which looks really insecure. How can I do it using a stored procedure which I think will make it a lot more secure? Thanks

Member Avatar for riahc3
0
634
Member Avatar for jacksantho

Hi, Please look at my code Declare @tableName varchar(100), @total int, @sql nvarchar(2000),@id varchar(4) set @tableName='details'; set @id='C'; SELECT @sql= ' select @total = count(*) from details where id='+@id exec sp_executesql @sql, N'@total int output', @total output select @total Error: Msg 207, Level 16, State 1, Line 2 Invalid column …

Member Avatar for BitBlt
0
208
Member Avatar for while(!success)

Hi guys, I'm still new to .NET and your answers to my questions have been so helpful. I have another question yet again, however. This time my question has to do with sql server and handling it with code behind. I am creating a stored procedure which is supposed to …

Member Avatar for while(!success)
0
2K
Member Avatar for crownedzero

CREATE OR replace FUNCTION fn_findraise (dept_in IN VARCHAR2, salary_in IN FLOAT) RETURN NUMBER IS salaryraise NUMBER; BEGIN IF dept_in = 'MIS' THEN salaryraise := salary_in * .10; ELSIF dept_in = 'SALES' THEN salaryraise := salary_in * .15; ELSIF dept_in = 'HR' THEN salaryraise := salary_in * .20; END IF; RETURN …

Member Avatar for pritaeas
0
160
Member Avatar for G_Waddell

HI All, I'm writing an application in Visual Basic .NET but the application will use a SQL backend. If the user runs the application and the backend database is not set up, I want the user to select a SQL Database Instance, supply an administrator user ID (sa) and Password …

Member Avatar for G_Waddell
0
328
Member Avatar for Raja Pandiyan

The procedure for Insert/update.I use datagridview get and display the data. I get the error message "Procedure or function Updatedata has too many arguments specified." // this is my Procedure ALTER PROCEDURE [dbo].[Updatedata] @item char(30), @uom int,@group int,@orqty int,@avgcons int,@reorder int AS BEGIN SET NOCOUNT ON; IF EXISTS( SELECT * …

Member Avatar for kkunodziya
0
265
Member Avatar for mohitnarang01

Hi, I am in urgent need for converting sql procedure to postgre sql procedure.Please help me ASAP. CREATE FUNCTION sp_get_id_des (IN cellid INT, IN mcc VARCHAR(3), IN mnc VARCHAR(3), IN nwtype INT, IN mlac INT , IN mrac INT ) returns SETOF record AS' declare pscnt int ; declare cscnt …

0
193
Member Avatar for network18

Hi, Needs to construct the tables with the meta info retrived by another stored procedure I wrote, given the table id or name. There could be some flaws in the logic, not sure. The flow is - - iterate through one table which stores tbl name, id info - pass …

Member Avatar for network18
1
292
Member Avatar for ZER09

i created a dll file using vb.net then it has a shared function that will execute a stored procedure of mysql but my code is something long and when accessing it, it has a big risk that it can produce an error if there is an incorrect string input, i …

Member Avatar for thines01
0
498
Member Avatar for stereoworld

Ahoy, I'm having a bit of trouble executing a stored procedure using PHP's SQLSRV package thing. It's pretty much just a simple select query, with the parameters being passed through a php (it's from a property search). SqlSrv is a tough nut to crack as docuemtnation is either non existent, …

Member Avatar for stereoworld
0
5K
Member Avatar for Charles.m

Hello, I am getting the contents on my website from database using SQL Stored Procedure (C#). Now, I want to change the output look with XML / XSLT. How can I do this? Something like this http://forums.asp.net/t/1230093.aspx/1 but am not sure how to go about it, am new to C# …

Member Avatar for Charles.m
0
679
Member Avatar for voidyman

Hi, Is there a way i can pass variable column names to a stored proc? Here's what i want to do: i have lots of tables and for each of those i want to select out a few columns. e.g from table titles i want to pick out title_name and …

Member Avatar for debasisdas
0
610
Member Avatar for jrotunda85

So I'm trying to figure out the best way (if possible) to combine these two stored procedures. Basically these are the same, the only difference is one is looking at a 'Spot' table, the other is looking at the 'Retail' table. However, in both cases the column count is the …

0
96
Member Avatar for jrotunda85

I recently moved a script I created for Google Maps over from my development site and I changed the information in the mysqli line and now I'm recieving an error mesage -- any idea what's going on here? Here's the error message: [CODE]Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user …

Member Avatar for diafol
0
366
Member Avatar for nicoalmontec

Hi folks, this is my first post in danniweb, please excuse me if I am in the wrong place or the thread title lacks self explanation. I am very disoriented in the field since im new in MS SQL. Before going into the problem, I'm going to give some context: …

Member Avatar for nicoalmontec
0
230
Member Avatar for sithembisophp

Hi everyone, Can anyone tell my why this does not work? I created a stored procedure that uses a variable / input value as table name, but it does not do what it's supposed to do. Here is the code: [CODE] delimiter // DROP PROCEDURE IF EXISTS userpages.respondtoconnectionrequest// CREATE DEFINER …

0
76

The End.