Tag Info

New answers tagged

2

I've made a function where you just put the string and the output will be in Capital Letters: DELIMITER // CREATE DEFINER=`root`@`%` FUNCTION `LCAPITAL`(eCADENA VARCHAR(150)) RETURNS varchar(150) CHARSET latin1 DETERMINISTIC BEGIN DECLARE vPOSICION INT DEFAULT 0; DECLARE vTMP VARCHAR(150) DEFAULT ''; DECLARE vRESULTADO ...


2

You can do it with Native dynamic SQL ( http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/dynamic.htm#LNPLS011 ) using the EXECUTE IMMEDIATE statement. Here's an example: DECLARE v_sql varchar2(128); v_username varchar(30); cursor c1 is select username from dba_users where username like ('PATT%'); BEGIN for REC in c1 loop v_sql := ...


1

CONCAT(UCASE(LEFT(firstname, 1)),UCASE(LEFT(lastname, 1)) You missed one more closed parenthesis in your statement CONCAT(UCASE(LEFT(firstname, 1)),UCASE(LEFT(lastname, 1))) 2.The query you wrote for concatenation returns only first letter in capital letters of both fist and last names and it doesn't print space between them. example :First ...


3

Insert query: INSERT INTO pdone.reps (veeva_rep_id,display_name,username,first,last,email,avatar_url,rep_type) SELECT Id, CONCAT(UCASE(MID(firstname,1,1)),LCASE(MID(firstname,2)),' ',UCASE(MID(lastname,1,1)),LCASE(MID(lastname,2))), username, firstname, lastname, email, 'www.some_static_url.com', '1' FROM veeva.user ...


0

I have answer for this question from member of Microsoft Technet called Lydia Zhang: ...SSIS will inherit the patch level that your installation media contains, which has no impact on the patch level of your existing SQL Server 2014 failover cluster instance... ...


0

I will go by using the binary log, it only reflects the changes on data or schema and its already integrated in mysql.


1

First observation is that your update statement has no WHERE clause. This means that it will update all rows of the table. Are you sure you want that? From the comments, it seems that all rows have year_period = 2016 and you do want to update all of them. In my opinion, it wouldn't hurt to explicitly add this condition in the statement. The opposite, it ...


0

You want to update field ID and set to 10? Some sample: UPDATE test.personal_info SET ID = '10' WHERE db1.table1 = db2.table2 OR UPDATE test.personal_info SET ID = '10' ON <DB.TABLE> JOIN TABLE1.FIELD = DB.TABLE2.FIELD


0

I had forgotten about this question, sorry. But we resolved the issue. Using a MERGE statement reduced the query time to under an hour. Disabling indexes had no effect.


0

After some googling and @Daniel's suggestions I came to following solution I need define my own type and use it to extract data from subquery: create type closest_poi as (cost float, poi_gid bigint); with closest as ( select distinct o.gid, ((select row(cost,gid) from pgr_kdijkstraCost( 'SELECT gid as id, source, target, walk_cost as cost FROM ...


3

There are multiple ways to do it in Oracle. Right of the bat I can think about two. Straightforward, not Oracle specific (assuming shop_code is unique in table1) update TABLE2 t2 set SHOP_NAME = ( SELECT GET_shop_name(t1.regitry_id) FROM TABLE1 T1 WHERE t2.shop_code = t1.shop_code ); Oracle specific syntax(requires inline view to be ...



Top 50 recent answers are included