Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6440 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Anyone had any luck doing it? I've set up an ODBC connection and I can import data from MySQL using ODBC... but I can't get it to export data, or even to run SQL queries correctly. I made a script to create a table and it gives me an error that my SQL syntax is wrong. I made an "Execute SQL" script and here's the code:

CREATE TABLE "Contact" ("Contact ID" Decimal primary key, "First Name" VarChar(20), "Last Name" VarChar, "Organization" VarChar, "Address" VarChar, "City" VarChar, "State" VarChar(2), "Zip" VarChar)

Seems right to me. Anyone have any ideas? Are there any sites that cover how to do this? Any other threads on this forum (I couldn't find any...)? Thanks for the help.

Posted

Hi Mephtik and welcome to the forums!

Well, I'm pretty sure it's bad practice to be using spaces in your field names in general and as far as i know they aren't supported in SQL statements anyway so just swap them for underscores.

Just tried a few different statements, replacing your spaces with underscores leads to a correct execution as below:

CREATE TABLE Contact (Contact_ID Decimal primary key, First_Name VarChar(20), Last_Name VarChar, Organization VarChar, Address VarChar, City VarChar, State VarChar(2), Zip VarChar)

This topic is 6440 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.