User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 392,045 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,306 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 789 | Replies: 0
Reply
Join Date: May 2008
Posts: 6
Reputation: gvalip is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
gvalip gvalip is offline Offline
Newbie Poster

Sybase-Insert getdate()

  #1  
May 20th, 2008
I did following -

  1. CREATE TABLE test_insert_date (field1 datetime NOT NULL)
  2. GRANT ALL ON test_insert_date TO public
  3.  
  4. CREATE proc usp_test_ins_dt
  5. @field1 datetime NULL
  6. AS
  7. SELECT @field1
  8. INSERT INTO test_insert_date
  9. VALUES (getdate())
  10.  
  11. RETURN
After this, I executed the proc as -
usp_test_ins_dt getdate()
I got error as "Incorrect syntax near ')'."

But if I run the proc as
usp_test_ins_dt "01/01/2008"
It runs fine. Any help in understanding how Sybase is behaving?
Last edited by peter_budo : May 23rd, 2008 at 11:05 am. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 11:19 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC