The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Using ODBC to extract data

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
opperman Posted - 11/10/2000 : 04:40:03 AM
Hello,
Iīm using Origin 6.0 Pro SR4 German version to extract data from a Oracle database via ODBC. The script looks like this:

%Z=select a.column1, b.column2
from table1 a, table2 b
where a.column3 = b. column4
and a.column4 like 'ZZA%'
;
label -s -n SQL2 %Z;
SQL2.show = 0;
dll -a db odbc60;
db.dbsource$=LE-Test;
repeat wks.ncols {del col(1)};
db.wksname$=%H;
db.open();
db.autosetcol=1;
db.read.autoaddcol=1;
db.dbsql$=SQL2.text$;
type -a ********************Abfrage*****************;
type %Z;
type ********************************************;
type "";
db.read(0);
db.close();
label -r SQL2;

The problem is, that I canīt use the like-operator of the Oracle-Select within my Variable-Description %Z=select ...

If I use

label -n SQL2
select ....

instead, my select will be truncated if it is a bit longer (which is not unusual, if you work with Oracle :-) )

Does anybody know a solution for the described problem?

Thanks for a short reply.

-Jens Oppermann
1   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 11/10/2000 : 10:05:28 AM
I assume that you have
%Z="select .... like 'ZZA%C'";
Since Origin substitutes %A to %Z in literal string assignments, than %C will be replaced so you can not keep it as such. If that is the case, you will need to write %% to prevent substitution, like

%Z="select .... like 'ZZA%%C'";




The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000