<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - interval - gdzie błąd w składni]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=487&amp;type=atom"/>
	<updated>2010-09-21T05:37:53Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=487</id>
		<entry>
			<title type="html"><![CDATA[Odp: interval - gdzie błąd w składni]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=2204#p2204"/>
			<content type="html"><![CDATA[ok teraz działa dzięki :)]]></content>
			<author>
				<name><![CDATA[WitekS]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=760</uri>
			</author>
			<updated>2010-09-21T05:37:53Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=2204#p2204</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: interval - gdzie błąd w składni]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=2203#p2203"/>
			<content type="html"><![CDATA[Zakładam że robisz to plpgsql jeśli tak to 
[code]
execute 'select now() - interval '' '||sint_day||' day'' ' into dt_delete;
[/code]
(powyżej zostały użyte wyłącznie apostrofy '  nie ma tu znaków cudzysłowia)]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2010-09-20T17:29:47Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=2203#p2203</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[interval - gdzie błąd w składni]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=2202#p2202"/>
			<content type="html"><![CDATA[ustawiam zmienną typu timestamp na podstawie pobranej z bazy wartości całkowitej sint_day wygląda to tak:
[code]
dt_delete := now() - interval ''||sint_day||'  day';
[/code]
problem jest ze składnią wstawienia zmiennej sint_day, próbowałem na kilka sposobów ale nie mogę sobie poradzić przy takim wstawieniu (składni) dostaję komunikat:
[code]
ERROR:  invalid input syntax for type interval: ""
CONTEXT:  SQL statement "SELECT  now() - interval ''|| $1 ||'  day'"
[/code]
jak wstawić sint_day żeby zadziałało?]]></content>
			<author>
				<name><![CDATA[WitekS]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=760</uri>
			</author>
			<updated>2010-09-20T11:11:09Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=2202#p2202</id>
		</entry>
</feed>
