• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 678
  • Last Modified:

Sybase insert and update through unix bash script

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
        update custodymktval_inbound_status
           set processStartTime=getdate()
         where cobDate= '20110311'
           and clientId=2

insert into custodymktval_inbound_status
values (2,'ZRC',getdate(),getdate(),'20110311','N')
1 Solution
Ryan McCauleyData and Analytics ManagerCommented:
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.
I am guessing that you are missing "go" at the end.

You can check answers there as well:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now