Ask Your Question
0

LO Base SQL problems [closed]

asked 2012-05-04 17:36:30 +0200

anonymous user

Anonymous

updated 2013-02-17 06:03:51 +0200

qubit gravatar image

My Query

DECLARE @var
SET @var = 10
SELECT @var

fails to execute. (All are on separate lines)

Also there is no syntax highlighting for DECLARE statement.

Exact syntax error:

syntax error, unexpected $end, expecting BETWEEN or IN or SQL_TOKEN_LIKE
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by qubit
close date 2013-03-19 05:57:47.882730

1 Answer

Sort by » oldest newest most voted
0

answered 2012-05-04 20:31:44 +0200

mahfiaz gravatar image

What are you trying to achieve?

edit flag offensive delete link more

Comments

1

This was just a test query.My goal is to set an entry in one table with SUMed data from column in other table.I already have the SQL code,but the problem is that LO Base will not recognise the DECLARE statement.

DO YOU NEED TO KNOW gravatar imageDO YOU NEED TO KNOW ( 2012-05-05 21:20:42 +0200 )edit

You probably don't need variables at all, just use subquery. But the error is about the select statement. In the select statement you also need to specify the table you are selecting from, e.g SELECT * FROM "MyTable"; But setting the column using variable didn't work (but this is not what you need).

mahfiaz gravatar imagemahfiaz ( 2013-02-18 09:12:53 +0200 )edit

@DO YOU NEED TO KNOW -- Did @mahfiaz's Answer help solve your question? Are you still interested in finding an answer to this question?

qubit gravatar imagequbit ( 2013-03-02 19:24:05 +0200 )edit

Question Tools

Stats

Asked: 2012-05-04 17:36:30 +0200

Seen: 516 times

Last updated: Feb 17 '13