473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can't set variable without an error

I'm trying to put together a fairly simple query, or at least I thought it was, but even the most basic parts don't want to work so I have to take this piece-by-piece.

I am trying to declare a varialbe in PostgreSQL 8.4 and when I put in this:
Expand|Select|Wrap|Line Numbers
  1. url varchar := 'http://bytes.com';
I get this:
Expand|Select|Wrap|Line Numbers
  1. :6: ERROR:  syntax error at or near "varchar"
  2. LINE 1:  url varchar := 'http://www.chefa.com';
I get the same thing if I try to start the line with "declare "

Somehow I am missing something.
Jul 23 '13 #1
1 1513
rski
700 Expert 512MB
Are you put it in plpgsql function?
Jul 24 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fie Fie Niles | last post by:
At our client site, when I tested a simple ASP page like the following: <%Session("test") = "this is testing"%> they got an error either "HTTP 500 page cannot be displayed" or "error '8002801d' ....
3
by: Me | last post by:
Hi Folks I keep recieving the following error message when i try to bind a combobox to the value that is in a textbox. the application crashes on the following line... Me.CBoxTitle.SelectedItem...
2
by: Larry | last post by:
how to use a class variable without initiate for example: ClassA { int var1; }
6
by: Gabor | last post by:
Hí All, Does anybody can help to solve this problem? When I set in the web.config file <trace enabled="true"/>, I get the following error in one of main web pages: ...
2
by: Usarian Skiff | last post by:
I execute most of my applications on one of two machines. They are basically identical with two exceptions, one I develope on, the other has a sql server desktop database running on it. My...
0
by: kotobe | last post by:
A newby question. I have a Variable defined in the first line of a script block. The same variable is giving me a "Variable is Undefined" error in an embedded script within the block that defined...
7
by: anto frank | last post by:
hi friends, is it possible to call a variable from the main function to a sub fuction with out sending as a argument, pointer and can't declare as global variable? void main() { int a=10;...
1
by: Scott M. | last post by:
Many methods return objects when they are called. With Excel these objects are placed in memory and must be destroyed via ReleaseComObject as you have done with your NAR method, but the line: ...
3
by: zhw | last post by:
How can i use a variable without define it ? I have thought about the __import__ function, but the docs says "the __import__() function does not set the local variable named eggs"$B!#(B
3
Atli
by: Atli | last post by:
Hi everybody. This is not so much a problem, since I have already managed to find a solution, but my solution requires the use of the eval() function, which I just hate to use. The problem is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.