Questions tagged [embedded-sql]

Embedded SQL is the term used for a method of inlining SQL statements with the source code of another programming language, called host language.

Embedded SQL is the term used for a method of inlining SQL statements with the source code of another programming language, called host language.

Examples of embedded SQL are:

112 questions
2
votes
3 answers

embedded sql in C

I've been attempting to write embedded SQL statements for DB2 that ultimately gets compiled in C. I couldn't find a tutorial or manual on the embedded SQL syntax for C for reference. One case I would like to do is to insert data into a table. I…
user38781
  • 21
  • 2
2
votes
1 answer

Convert float to decimal in Informix

I have a table with a column of type decimal. There is a ESQL/C structure that represents the table. It has a member of type decimal. I also have a normal C structure for equivalent for the same table. The type of the above mentioned field is a…
prabhu
  • 919
  • 2
  • 12
  • 28
2
votes
1 answer

Cannot execute SELECT MAX(ORA_ROWSCN) from Embedded SQL

Environment : HP-UX 11.x C++ (ProC & aCC compiler) Oracle 10g ) I am unable to execute the following command from my C++ Embedded SQL code EXEC SQL SELECT MAX(ORA_ROWSCN) INTO :scn_timestamp FROM table_name ; The changes i'm making are to an…
2
votes
1 answer

What are the incompatibilities for ESQL/C programs while migrating from HP-UX to Red Hat Linux?

I am migrating a project and we need to migrate ESQL/C source files from HP-UX to Red Hat Linux. What may be the incompatibilities while moving these ESQL/C files to Linux?
user1716079
  • 69
  • 1
  • 1
  • 9
2
votes
3 answers

SQL - Delete and subquery

The following is a sql query which I wrote to delete all records in the placement table where the placement.op_number = a list of returned records. The subquery works fine alone and returns only the OP_NUMBER column (with two rows). The error I get…
Markus
  • 133
  • 2
  • 13
1
vote
1 answer

Error in Proc*C compilation

I'm trying to compile .pc file on Red Hat Linux v4.1.2-44 (able to compile on HP and Solaris) with following precompiler options: PROCFLAGS=*maxopencursors*=100 PARSE=NONE userid=db2poc/db2poc@mydb VARCHAR=YES code=CPP CPP_SUFFIX=cpp…
Aniket
  • 11
  • 4
1
vote
2 answers

Informix "SERIAL" to Oracle NUMBER/Sequence/Trigger in Pro*C

I'm trying to convert some Informix ESQL to Oracle Pro*C. In the existing Informix code the "SERIAL" data type was used to indicate automatically incrementing columns. According to the Oracle documentation, the Oracle Migration Workbench for…
1
vote
2 answers

Migrating Informix ESQLC to Oracle Pro*C

Currently tasked with migrating Informix ESQLC files to Oracle Pro*C and have a few questions. First, we use a lot of proprietary Informix functions within our embedded ESQLC code such as rstrdate(), rtoday(), and rjulmdy(). Any pointers on how to…
KNewton
  • 348
  • 1
  • 3
  • 11
1
vote
1 answer

Which is faster "where col = ? or col = ? or col = ?" OR "where col in (?, ?, ?)" in C with informix (.ec/esql)?

Our code is written in C and DB is Informix. We are doing some code optimization in ESQL program and found the following query: UPDATE [TABLE] SET [PRIMARY KEY COLUMN] = [NEW KEY] WHERE COL = ? OR COL = ? ... The number of columns in the where…
Liju Mathew
  • 871
  • 1
  • 18
  • 31
1
vote
1 answer

How to select 32 or 64 bit Informix Csdk 3.7?

My developer machine is a Windows 7 64bit and have some programs on 32 an others on 64 bits since the upgrade of the 3.70FC3 and 3.70TC3, I'm having problems compiling with VisualStudio 2010 sp1. maybe there is some configuration that I need to do…
Aragorn
  • 843
  • 12
  • 25
1
vote
1 answer

ECPG invocation of stored procedure with an array argument

I have a ECPG client attempting to obtain data. It uses a a prepared statement with a subselect clause using a stored function "getsipid" that takes 4 arguments. I have had this working with the 4th argument declared as a simple varchar. I have…
Dave
  • 31
  • 3
1
vote
2 answers

ESQL INFORMIX precompilation step in makefile : error -33042 cannot open input file

I have to modify some very old source code. It comes with a very long Makefile and I'm not very familiar with Makefiles in general. It also relies on a precompiling step by an old Informix server. I need to modify the Makefile so that the source…
SofiaMNC
  • 11
  • 1
  • 5
1
vote
2 answers

RPGLE embedded SQL 'select from final table...' throwing SQL0029 at compile time

What looks like a simple SQL statement is throwing error SQL0029... 'Position 14 INTO clause missing from embedded statement.'. The first obvious point is that the 'INTO' is not missing from my statement but the SQL pre-compiler sometimes provides…
Brenski
  • 13
  • 4
1
vote
2 answers

IIB: INSERT INTO Oracle Database "¿" (inverted question marks) and chinese characters

I am a greenhorn in Oracle Database and IBM Integration Bus and I'm trying to use the INSERT INTO function of ESQL in the IBM Integration Bus to insert data of a CSV file. I'm using a DFDL with ISO-8859-1 encoding to read the file. When using the…
1
vote
1 answer

Whats source program type for GnuCobol with embedded Postgres

Have GnuCobol cobc compiler installed in Ubuntu esqlOC installed for SQL pre-processing, Cob-DB2 is working fine. For Cobol with postgres what should be the source program type (like .sqb is for Cob db2) Presume a new DSN has to be added in data…
Arun
  • 21
  • 2