Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8197229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:41:56+00:00 2026-06-07T05:41:56+00:00

I am writing small application in python which read records from Oracle and insert

  • 0

I am writing small application in python which read records from Oracle and insert them into Vertica.

To read from Oracle I am using the cx_Oracle python package and to write into Vertica I am using the pyodbc package.

When I read a date column from Oracle I get it in the following format:

datetime.datetime(2011, 9, 13, 10, 47, 54, 795658)

Edit:

When I hit the following query in vertica :

INSERT INTO "TEST" (COL1) values(datetime.datetime(2011, 9, 13, 10, 47, 54, 795658))

I get the following error:

Error: ERROR: schema "datetime" does not exist
SQLState:  3F000
ErrorCode: 0

My question is how to convert this into a Vertica time stamp column.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:41:57+00:00Added an answer on June 7, 2026 at 5:41 am

    You are trying to mix Python code and SQL; your Vertica server is trying to interpret the datetime.datetime information as a SQL schema, and it fails.

    Use parameters instead:

    from datetime import datetime
    
    cursor.execute('INSERT INTO "TEST" (COL1) values(?)',
        datetime(2011, 9, 13, 10, 47, 54, 795658))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started learning Python by writing a small application using Python 3.1 and
I'm writing a small application which updates my AD with info from a DB
I have been writing a small application using C# to copy a document into
I'm writing a small application which works at compiling a file from a source
I'm writing a small application which needs to perform a common task on a
I'm working on writing a small application using the WPF MediaKit , and I
I'm currently writing a small python app that embeds cherrypy and django using py2app.
I am currently writing a small application with Python (3.1), and like a good
I'm writing a small multithreaded client-side python application that contains a small webserver (only
I am writing a small application about stock monitoring for my company. Using mysql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.