Skip to content
Advertisement

Tag: function

Cant understand my syntax mistake in MySQL CREATE FUNCTION

This is my code and I can not find the mistake! I am trying to create a function that multiplies a value to de input parameter and returns that result! It should not be that difficult but I am not finding my sintaxt mistake The mistake says: error code 1064 Answer The DECLARE has to be before the code. I

SQL Function has no destination when called

I’m getting a success when creating the below function, but when I call it I receive an error stating there is no destination. Answer Language SQL: https://www.postgresql.org/docs/current/xfunc-sql.html language plpgsql: https://www.postgresql.org/docs/current/plpgsql.html Language sql is more easier to understand. your query is not dynamic, so it’s just a function and $$ query $$. setof inventory.filmid%type will make it more flexiable. If you

User function return query and insert into

I trying to make function, that merge where select query return result as value(not table) and insert into that use value from select statement. The function where argument gets from user, and this argument provide into select query on table_foo that return value id where I try set and use in insert into to diff table(table_bar). So I little bit

Trim Intermediate spaces in a string in Postgres

In the result, want only intermediate spaces to be removed. Need to print only first part before hypen (-) along with Percentages. Can you please help. Input String: AMAZON – 25%; SAP – XXXXX – 45%; MICROSOFT – XXX&YYY – 30% Query: Answer regexp_split_to_table can be used to split the value into strings by the delimiter ;, then you can

Revisting ORA-06576: not a valid function or procedure name for simple function call via various database tools

Revisting ORA-06576: not a valid function or procedure name for simple function call via dbeaver database-tool I have seen many posts, but they don’t cover the situation I am experiencing. I am trying to do a simple function call to Oracle SQL via dbeaver: According to the right-click call function obtained via dbeaver the function syntax it is: To be

Advertisement