procedure

How to convert xml as a table or html table in sqlserver

依然范特西╮ 提交于 2020-01-05 04:02:05
问题 xml is a type in sqlserver, now I want to pass a table variable to procedure, but you must define the table as type (use "create type"). So I think I can use xml as a variable to pass into the procedure as parameters. declare @tv table ( id int, username varchar(50), department varchar(50) ) insert into @tv values(1,'tom','finance'),(2,'mark','business'); declare @xml xml; set @xml =(select * from @tv for xml path('row') ,type ) select @xml ; I want to use table like @tv as parameter, pass it

MySQL WHERE-condition in procedure ignored

本小妞迷上赌 提交于 2020-01-04 09:22:12
问题 I am trying to make a procedure with arguments. But when I use them in a WHERE condition it is like there were never there. They are simply ignored. DELIMITER // DROP PROCEDURE IF EXISTS p // CREATE PROCEDURE p (IN player TEXT, OUT num INT) BEGIN SELECT COUNT(*) INTO num FROM `sg_playerstats` WHERE `player` = player; END // DELIMITER ; Num gets filled correctly, but whatever I put in player, the result is ALWAYS 66. (The table has 66 rows!) What am I doing wrong??? 回答1: rename your parameter,

Simple task: Connect to database, execute a stored procedure, disconnect

大兔子大兔子 提交于 2020-01-04 06:22:23
问题 I don't necessarily need to pass the stored procedures any variables from my VBScript, I just need to run the stored procedure on the server. I haven't been able to find any clear examples of how to do this—just a lot of people explaining how to pass a variable from a SP back to a VBScript. Any help would be so appreciated! It looks like I'll have to open a connection, then send the command to execute the stored procedure, then close the connection, but I'm a bit lost about how to do this

Calculating the position of QR Code alignment patterns

大兔子大兔子 提交于 2020-01-03 09:46:07
问题 I need to know how to calculate the positions of the QR Code alignment patterns as defined in the table of ISO/IEC 18004:2000 Annex E. I don't understand how it's calculated. If you take the Version 16, for example, the positions are calculated using {6,26,50,74} and distance between the points are {20,24,24}. Why isn't it {6,28,52,74}, if the distances between the points, {22,24,22}, is distributed more equally? I would like to know how this can be generated procedurally. 回答1: While the

How to find the location of TCL procedure?

放肆的年华 提交于 2020-01-03 08:14:28
问题 How can be find the location of procedure (function) in TCL. Under location I mean the source file in which it is declared. I'm trying to read foreign source-code and can not find the declaration of a single procedure, example: set MSISDNElement [regexp -all -inline {ISDN +[0-9]+} $Command] if { $MSISDNElement != "" } { foreach elm $MSISDNElement { set MSISDNValue [list ISDN [getInternationalFormat [lindex $elm 1]]] } } set EptData [list [lindex $Command 1]] InitEptData 3 foreach Element

How to find the location of TCL procedure?

一笑奈何 提交于 2020-01-03 08:14:05
问题 How can be find the location of procedure (function) in TCL. Under location I mean the source file in which it is declared. I'm trying to read foreign source-code and can not find the declaration of a single procedure, example: set MSISDNElement [regexp -all -inline {ISDN +[0-9]+} $Command] if { $MSISDNElement != "" } { foreach elm $MSISDNElement { set MSISDNValue [list ISDN [getInternationalFormat [lindex $elm 1]]] } } set EptData [list [lindex $Command 1]] InitEptData 3 foreach Element

Procedure to open, write and append in Ada

半城伤御伤魂 提交于 2020-01-02 10:00:43
问题 This question is a follow-up of the post at Ada file operation: instantiation and exception about writing to files in Ada. I chose to place this question in a separate post so that it'll become visible to more people as I already accepted an answer on a slightly different issue (which was on exceptions in file handling) in that aforementioned post. WITH Ada.Sequential_IO; WITH Ada.Float_Text_IO; PROCEDURE TEST is package Seq_Float_IO is new Ada.Sequential_IO (Element_Type => Float); X_File :

Rename a mysql procedure

痴心易碎 提交于 2020-01-01 08:06:55
问题 Does anyone know what is the syntax for renaming a mysql stored procedure/function? Or is this even supported in MySQL? I've been googling this for several minutes... 回答1: try this UPDATE `mysql`.`proc` SET name = '<new_proc_name>', specific_name = '<new_proc_name>' WHERE db = '<database>' AND name = '<old_proc_name>'; Also note: If have granted privileges to users for this procedure you will need to update the procedure name in procs_priv as well. UPDATE `mysql`.`procs_priv` SET Routine_name

Rename a mysql procedure

馋奶兔 提交于 2020-01-01 08:06:24
问题 Does anyone know what is the syntax for renaming a mysql stored procedure/function? Or is this even supported in MySQL? I've been googling this for several minutes... 回答1: try this UPDATE `mysql`.`proc` SET name = '<new_proc_name>', specific_name = '<new_proc_name>' WHERE db = '<database>' AND name = '<old_proc_name>'; Also note: If have granted privileges to users for this procedure you will need to update the procedure name in procs_priv as well. UPDATE `mysql`.`procs_priv` SET Routine_name

Rename a mysql procedure

倾然丶 夕夏残阳落幕 提交于 2020-01-01 08:06:10
问题 Does anyone know what is the syntax for renaming a mysql stored procedure/function? Or is this even supported in MySQL? I've been googling this for several minutes... 回答1: try this UPDATE `mysql`.`proc` SET name = '<new_proc_name>', specific_name = '<new_proc_name>' WHERE db = '<database>' AND name = '<old_proc_name>'; Also note: If have granted privileges to users for this procedure you will need to update the procedure name in procs_priv as well. UPDATE `mysql`.`procs_priv` SET Routine_name