Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

SQL Help with DBreader

I am trying to do a left join in the sql statement, but it keeps erroring out. If I take out the left, it joins the tables, but I don't get all the data I want. Can someone tell me how to do a left join? Everything I have read on Sybase says the left join should work.

4 REPLIES
Red

Re: SQL Help with DBreader

What is the exact syntax of the statement that you are using?

New Member

Re: SQL Help with DBreader

SELECT dev_fqn.Device_Name, dev_domain.Device_Domain_Name

FROM dev_fqn LEFT JOIN dev_domain ON dev_fqn.Domain_Id = dev_domain.Domain_Id

This should bring up all the records from dev_fqn and if there is a matching record in dev_domain.

I exported all the tables from rme to access and can run this statement in access and it works fine.

If I take out the left keyword, then dbreader runs but I don't get all the records from dev_fqn table.

Red

Re: SQL Help with DBreader

Try this one instead:

SELECT dev_fqn.Device_Name, dev_domain.Device_Domain_Name FROM dev_fqn LEFT OUTER JOIN dev_domain ON dev_fqn.Domain_Id = dev_domain.Domain_Id

New Member

Re: SQL Help with DBreader

That worked. Where do you find this stuff. I can find no reference for dbreader specific to CiscoWorks.

141
Views
5
Helpful
4
Replies
CreatePlease to create content