I am trying to use the "get external data" option in EXCEL. I've been
able to query the AS/400 from ACCESS without too much trouble (well, it
won't let me do any complicated queries, but it's working OK). Now, I'd
like to make a query in MSQuery that runs w/in EXCEL so that my data is
directly pulled and placed into my spreadsheet. When I try to make the
query, it always writes the select statement like this:
SELECT table.column1, table.column2 from *n.library.table table
^^^
My problem seems to be around the *n in front of the library. I've tried:
systemname.library.table
systemname/library.table
systemname_library.table
systemname\library.table and even
library.table
None of them work. Where am I going wrong?
Thanks
also, How complex is complex? Sometimes you can do things in reports that
you can't do in queries. I can't seem to sort anything (AS/400 data) in a
query but I can build a report on the query results and sort the report. You
can also do a MAKE TABLE query and then do a second query against that table
to do the "complex" stuff.
Chris Hagwood wrote in message <6hj2bc$fdu$1...@pinta.pagesz.net>...
Well, the intended user of this spreadsheet doesn't have access installed,
so I'm trying to avoid access altogether.
I don't mind using the "analyze with excel" option in access, but there
are others who don't have access, or aren't knowledgable enough to do
that each time. I'm hoping to save a query that they can run from excel
w/out any additional steps.
Thanks for the suggestion.
I can't help you, but I wanted to let you know that I have the same problem
you do. I seem to have know problems using access to access the AS/400
data. But I get an error when I try to use Excel's "Get external Data"
function.
--
Charles Wilt
Miami Luken, Inc.
Springboro, OH. 45066
e-mail: charle...@worldnet.no.spam.att.net
--remove the .no.spam
The correct syntax is systemname.library.table, as shown in the following
that I copied from a working query that I have:
SELECT PSTRUC.PINBR, PSTRUC.USRS1, PSTRUC.CINBR, PSTRUC.USRS2, PSTRUC.MDATE,
PSTRUC.QTYPR
FROM GNPBAT.AMFLIBB.PSTRUC PSTRUC
ORDER BY PSTRUC.PINBR, PSTRUC.USRS1, PSTRUC.CINBR, PSTRUC.USRS2
If this syntax doesn't work, you need to check your ODBC driver setup - you
need to make sure that the system name is explicitly specified in it. I
think the *N could be coming from it being blank, which could be the case if
you're only connecting to one AS/400 (I have two, so I can't leave it
blank).
Once you get past this hurdle, I think you'll find that MSQuery into Excel
works very well - I have much better luck with this than with Access. The
one drawback is that since it always redisplays the retrieved data to you as
you make changes to the query, it can be sluggish setting up the definition
if there's a lot of data involved. It can also make your /400 response drag
if you don't have it tuned to isolate this stuff. Good luck!
--
Dave Shaw, General Nutrition, Greenville, SC (just down the road from BMW -
Bubba Makes Wheels :)
The opinions expressed may not be my employer's unless I'm sufficiently
persuasive...
Hi Dave,
You can get around the re-retrieve of data when you make changes by turning
off the automatic query option from either the toolbar or under the records
option. It always does a full retrieve the first time you go into MSQuery
with a query though, which is a real pain.
HTH
Allan
Sorry to pop here but, I am using the Excel to import data too and it
works well in the majority of files but I'm getting some problems in
files over more or less 800 lines. It starts inserting blank lines and
ASCII code after that number of lines.
I have CA400 V3R1M2 SP SF46059.
Thank's for any help.
--
Manuel Amaro
CIN, S.A. / I.T.Department
Portugal
Mailto:am...@cin.mai.mailpac.pt
Well, stupid me, there it is! Thanks, Allan, that's a GREAT tip!
Anyone know a secret handshake to kill that full retrieve on entry into
MSQuery? That would be quite valuable.
Steve.
>Hi Dave,
>
>Sorry to pop here but, I am using the Excel to import data too and it
>works well in the majority of files but I'm getting some problems in
>files over more or less 800 lines. It starts inserting blank lines and
>ASCII code after that number of lines.
>
>I have CA400 V3R1M2 SP SF46059.
Strange. The SQL that I posted downloads 29,757 records without any
problems. I'm also on CA400 V3R1M2 SP SF46059. What version of Excel are
you running? I'm using Excel 97 on Windows 95B, running on a Pentium MMX
233 with 32 MB of memory. My AS/400 is running V3R7, with the C7343370 cume
installed. I've also installed all the relevant PTF's mentioned in the
CA/400 informational APAR, II10303, as of about a month ago. There were
some database PTF's in there, perhaps one of them has some bearing. II10303
lists the correct PTF's for each OS/400 release - if you haven't reviewed it
against the PTF's installed on your /400, you should. It's supposed to be
out on the Web somewhere, but I normally just use SNDPTFORD to download it
to the /400 when I I want to.
Oh, it probably doesn't matter, but I'm connecting over Ethernet through a
NetWare for SAA gateway. Normally that tends to make problems worse, rather
than to hide them, so I wouldn't think that would be a factor.