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

x
?
Solved

Need help with SYBASE syntax

Posted on 2016-07-14
5
Medium Priority
?
143 Views
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()))
0
Comment
Question by:brgdotnet
[X]
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
5 Comments
 
LVL 53

Expert Comment

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

line 355 seems ok.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 41711710
I know the same limitation in sql server:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00801.1510/html/iqrefso/X315758.htm
Syntax
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

0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 41711711
0
 
LVL 2

Author Closing Comment

by:brgdotnet
ID: 41713777
Thank you Guy
0
 
LVL 3

Expert Comment

by:knel1234
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?

cheers
knel
0

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