39 Topics
|
|
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 |
|
# 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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
** 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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 |
|
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 … |
|
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 |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 * … |
|
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 … |
|
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 … |
|
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 … |
|
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, … |
|
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# … |
|
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 … |
|
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 … |
|
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 … |
|
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: … |
|
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 … |
The End.