By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,620 Members | 1,303 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,620 IT Pros & Developers. It's quick & easy.

Add Command button not present and SQL Expression syntax error

P: n/a
Two questions, first I'm using CR 10 and connecting to a Sybase
database. I don't see a 'Add Command' button in the 'Database Expert'
dialog.

Second is how would I correctly code the syntax for the following SQL
code in the SQL expression editor:

SELECT JobNam, JobFailInstrTxt
FROM SchedUNIXJob, ApplicationCdeVal
WHERE ApplicationCdeVal.ApplicationTxt = "dailyops"
AND SchedUNIXJob.ApplicationCde = ApplicationCdeVal.ApplicationCde
GROUP BY SchedUNIXJob.JobNam

I've tried single and double quotes, but no luck I always get a syntax
error. I've even read where you should enclose the whole SQL statement
in paranetheses.
I'd appreciate any help with these two???

Nov 28 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ri***********@northwesternmutual.com wrote:
SELECT JobNam, JobFailInstrTxt
FROM SchedUNIXJob, ApplicationCdeVal
WHERE ApplicationCdeVal.ApplicationTxt = "dailyops"
AND SchedUNIXJob.ApplicationCde = ApplicationCdeVal.ApplicationCde
GROUP BY SchedUNIXJob.JobNam

I've tried single and double quotes, but no luck I always get a syntax
error. I've even read where you should enclose the whole SQL statement
in paranetheses.


I think you should use single quotes in the WHERE clause, but your
syntax error may be caused by the GROUP BY. The GROUP BY must include
all non-aggregate columns that are in the SELECT list. That means you
must include the JobFailInstrTxt in the GROUP BY since it is a non
aggregate column.

Nov 28 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.