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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Using ODBC to extract data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

opperman

Germany
2 Posts

Posted - 11/10/2000 :  04:40:03 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,
Im 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 cant 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

cpyang

USA
1406 Posts

Posted - 11/10/2000 :  10:05:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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'";



Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000