Need help with SYBASE syntax

Posted on 2016-07-14
Last Modified: 2016-08-01
I am wondering if there are any SYBASE sql coders who can spot any syntax errors at line 355. I am getting this error message,
and cannot spot what the problem is?

Incorrect syntax near '+'.

355  PRINT ' Client Endtered Data On ' + CONVERT(VARCHAR(10),CONVERT(TIME,GETDATE()))
Question by:brgdotnet
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 52

Expert Comment

by:Ryan Chong
ID: 41711664
can you post codes from lines 354 to 356 ?

line 355 seems ok.
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 500 total points
ID: 41711710
I know the same limitation in sql server:
PRINT format-string [, arg-list]

Open in new window

so you need to do this:
PRINT ' Client Endtered Data On %1' , CONVERT(VARCHAR(10),CONVERT(TIME,GETDATE())) 

Open in new window

LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 41711711

Author Closing Comment

ID: 41713777
Thank you Guy

Expert Comment

ID: 41738054
Adding to Guy  Hengel's link above (for the print logic only) are you trying to do this
declare @var1 varchar(10), @var2 varchar(10)
select @var1 = convert(varchar(10),getdate(),108)
select @var2 = convert(varchar(10),getdate(),118)
PRINT ' Client Endtered Data On %1!', @var1
PRINT ' Client Endtered Data On %1!' , @var2
PRINT ' Client Endtered Data On %1! and also on %2! ', @var1, @var2

or am I way off base here?


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
How many times a day do you open, acknowledge, or close an IT incident? What’s your process? Do you have a process depending on the incident, systems involved, and other factors? New Relic Alerts gives you options for how you interact with notifica…
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question