Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 add more than one account to a report

Author  Topic 

rango316
Starting Member

20 Posts

Posted - 2008-03-04 : 07:05:53
Hi I have this report:

SELECT fullname, new_directextensions, new_mobileextension, jobtitle, accountidname, statuscode
FROM FilteredContact
WHERE (accountidname = 'account1') AND (statuscode = '1')
ORDER BY fullname

how do i add more accounts for the accountidname? if I use a + i get nothing out of the report...

Thanks

Ian

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-03-04 : 07:10:14
What do you mean by "adding more accounts"?

Like this?
Where accountidname  in ('account1', 'account2', 'account3')


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

rango316
Starting Member

20 Posts

Posted - 2008-03-04 : 07:15:40
Hi,

I get this error if i write this:

SELECT fullname, new_directextensions, new_mobileextension, jobtitle, accountidname, statuscode
FROM FilteredContact
WHERE (accountidname = 'account1','account2') AND (statuscode = '1')
ORDER BY fullname

ADO error: incorrect syntax near ','
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-03-04 : 07:16:19
Did you see my reply properly?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

rango316
Starting Member

20 Posts

Posted - 2008-03-04 : 07:19:48
YOU are a flippin genius!

Thank you very much!!!

:)
Go to Top of Page
   

- Advertisement -