Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

POSTGRES setting variables. Works in PGAdmin. Error in Heidi

danoldenkamp's profile image danoldenkamp posted 5 months ago in Running SQL scripts

This generic set a variable and print it script doesn't work but works in PGAdmin. his looks like a PostGres compatibility issue.

SYNTAX ERROR NEAR VARCHAR:

DO $$ DECLARE counter INTEGER := link text1;

first_name VARCHAR(50) := 'John';

last_name VARCHAR(50) := 'Doe';

payment NUMERIC(11,2) := 20.5;

BEGIN

RAISE NOTICE '% % % has been paid % USD', counter, first_name, last_name, payment;

END $$;

Koszyk's profile image Koszyk posted 4 months ago

I can confirm that. I think it is double dolar related. I think it is shortly described here http://www.postgresqltutorial.com/plpgsql-block-structure/ .

I sav various PostgreSql codes. Some people use $$ and some $body$ and other.

Please login to leave a reply, or register at first.