Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Sub-Selects in IM

2 posts in PB Infomaker Report Writer Last posting was on 1999-03-20 04:17:31.0Z
Bernard Mikowski Posted on 1999-03-19 14:23:59.0Z
Newsgroups: sybase.public.infomaker.general
From: "Bernard Mikowski" <bmikowski@ecitc.com>
Subject: Sub-Selects in IM
Date: Fri, 19 Mar 1999 09:23:59 -0500
Lines: 59
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0071_01BE71EA.3897A1E0"
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <348_zvoBdPhc#GA.157@forums.powersoft.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:6482
Article PK: 241472

I'm using IM 5.0.04 and noticed that it gave me a syntax error when trying to do something like this:
 
SELECT C1, (SELECT C2 FROM T2 WHERE T2.Cn=T1.C1)
FROM TABLENAME T1
WHERE ...
 
When I removed the sub-select, everything worked fine.  I double-checked for syntax errors and
didn't notice any.  BTW, the database is SQLAnywhere 5.5.0x.  Is this a limitation of IM that doesn't exist in PB? 
 
TIA,
Bernard


Matt Gililand Posted on 1999-03-20 04:17:31.0Z
Newsgroups: sybase.public.infomaker.general
Date: Fri, 19 Mar 1999 23:17:31 -0500
From: Matt Gililand <matt.gilliland@sympatico.ca>
Reply-To: matt.gilliland@sympatico.ca
Organization: home
X-Mailer: Mozilla 4.5 [en]C-SYMPA (Win95; U)
X-Accept-Language: en,fr-CA
MIME-Version: 1.0
Subject: Re: Sub-Selects in IM
Content-Type: multipart/alternative; boundary="------------B21FBADFDDDCF66C423BE25E"
Lines: 62
Message-ID: <348_36F3215B.DE3B71F3@sympatico.ca>
References: <348_zvoBdPhc#GA.157@forums.powersoft.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:6478
Article PK: 241462

Two things,

The syntax below works with SQL Server 6.5 and IM 5.0.04.  So it is definitely not a limitation in IM.   I wasn't aware that SQL Anyware supported the syntax below but I don't use that DB much.

The syntax error I always received from the similar syntax was that I didn't have a space before the newline (carriage return).  IM requires a legitimate space.  So try adding a space add the end of the line
 

Hope it helps

Bernard Mikowski wrote:

 I'm using IM 5.0.04 and noticed that it gave me a syntax error when trying to do something like this: SELECT C1, (SELECT C2 FROM T2 WHERE T2.Cn=T1.C1)FROM TABLENAME T1WHERE ... When I removed the sub-select, everything worked fine.  I double-checked for syntax errors anddidn't notice any.  BTW, the database is SQLAnywhere 5.5.0x.  Is this a limitation of IM that doesn't exist in PB? TIA,Bernard