Solved

Sybase insert and update through unix bash script

Posted on 2011-03-12
2
660 Views
Last Modified: 2012-05-11
How can i perform sybase insert and update throough unix script.
I am performing following through isql and getting nothing but when i try running manually , it works.
if exists (select 1
             from custodymktval_inbound_status fs
            where cobDate= '20110311' and
              fs.clientId=2
           )
        update custodymktval_inbound_status
           set processStartTime=getdate()
         where cobDate= '20110311'
           and clientId=2

  else
insert into custodymktval_inbound_status
values (2,'ZRC',getdate(),getdate(),'20110311','N')
0
Comment
Question by:sunilbains
[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
2 Comments
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 35118254
When you say "running it manually", do you mean in a SQL tool of some kind? Are you logging into isql using the same credentials? My initial instinct, especially if the SQL runs okay (aside from not returning anything) is that you're lacking some permissions that your SQL user has but the user you're using for isql does not.
0
 
LVL 13

Accepted Solution

by:
alpmoon earned 500 total points
ID: 35130207
I am guessing that you are missing "go" at the end.

You can check answers there as well:

http://www.experts-exchange.com/Database/Sybase/Q_24902478.html?sfQueryTermInfo=1+10+30+isql+unix
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

615 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