Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Need help with SYBASE syntax

Posted on 2016-07-14
Medium Priority
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 53

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 2000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

705 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