Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi .. I'm a newbie and trying a simple script with the intent of a RIGHT JOIN
Basically - I want all of the hostnames from the dSeries table and only the matching ones from the ODBC load (Snapshot) table.
dSeries:
LOAD PROD as 'dSeriesENV',
Hostname as 'dSeriesHostname',
ShortHostname as 'hostname'
FROM
(
right join (dSeries)
ODBC CONNECT TO REPO_ODBC (XUserId is SUWDDRFNfKYGWRVMTbcSD, XPassword is CEaFfSFMNDNEWUZR);
Snapshot:
select hostname
, status as 'itamstatus'
, osplatform as 'itamosplatform'
, os as 'itamos'
, osversion as 'itamosversion'
from itam_reporting.reporting.snapshothw_current
where sigappitnonit = 'vzw';
Any ideas?
Try the following script:
No single quotes for field names and what you need is a left join.
dSeries:
LOAD PROD as dSeriesENV,
Hostname as dSeriesHostname,
ShortHostname as hostname
FROM
(
ODBC CONNECT TO REPO_ODBC (XUserId is SUWDDRFNfKYGWRVMTbcSD, XPassword is CEaFfSFMNDNEWUZR);
LEFT join (dSeries)
select hostname
, status as itamstatus
, osplatform as itamosplatform
, os as itamos
, osversion as itamosversion
from itam_reporting.reporting.snapshothw_current
where sigappitnonit = 'vzw';
You need a same field name between the two tables where you are right joining them on. I don't see any common field names in the two tables. Rename the two fields which they are supposed to be Right Joined on and I think it should work for you.
My bad, is it getting right joined on hostname?
Try the following script:
No single quotes for field names and what you need is a left join.
dSeries:
LOAD PROD as dSeriesENV,
Hostname as dSeriesHostname,
ShortHostname as hostname
FROM
(
ODBC CONNECT TO REPO_ODBC (XUserId is SUWDDRFNfKYGWRVMTbcSD, XPassword is CEaFfSFMNDNEWUZR);
LEFT join (dSeries)
select hostname
, status as itamstatus
, osplatform as itamosplatform
, os as itamos
, osversion as itamosversion
from itam_reporting.reporting.snapshothw_current
where sigappitnonit = 'vzw';
Hi,
Use NagaianKs advise.It will works.