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
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 User Setup Issues

Author  Topic 

sql_dwilliams
Starting Member

4 Posts

Posted - 2011-11-10 : 13:57:17
I am having a problem creating a user that can get data to return back to the SQL Server Management Studio. I am able to connect to the database(s) and see the tables and views that I am attempting to query, but when I execute the query all I get in return are the field names with NULL in the grid below them. I have tried creating just a SQL Server authentication and using the Windows Authentication - either way with the same results.

Can anyone point me in the correct direction?

Thanks,

X002548
Not Just a Number

15586 Posts

Posted - 2011-11-10 : 14:25:25
whats the query?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

sql_dwilliams
Starting Member

4 Posts

Posted - 2011-11-10 : 15:02:15
Just a simple select * from view_name.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-11-10 : 16:19:35
Do this

SELECT COUNT(*) FROM view_name

Can you post the DDL of the view

If it were a permission problem you would have gotten an error



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

sql_dwilliams
Starting Member

4 Posts

Posted - 2011-11-14 : 10:03:41
When running the count(*) query with the user that I am having trouble with setting up, the return is 0. When running the query using a user that was previously set up as part of the application, the response is 143,778.
Go to Top of Page

sql_dwilliams
Starting Member

4 Posts

Posted - 2011-11-14 : 10:46:39
Also here is the DDL for the view:

create view [dbo].[ar_customer] ( a_ar_customer_cid,c_cid_name1,c_cid_name2,c_the_prefix,c_addr_line1,c_addr_line2,c_cid_city,c_cid_state,c_cid_zip,c_cid_country,c_soc_sec_num,c_nw_sw,c_phone_number,c_fax_number,c_email_account,c_create_dept,c_account_type,c_resident,c_updated_by,c_updated_date,c_updated_time,c_internet,c_ssn,c_convert,c_geographical_cd,c_customer_type,c_vendor_number,c_external_ref,cp_dob,cp_phone,cp_drivers_license,cp_empr_cd,cp_empr,cp_empr_addr,cp_empr_city_st,cp_empr_zip,cp_empr_phone,cp_s_name,cp_s_dob,cp_s_phone,cp_s_drive_license,cp_s_empr_cd,cp_s_employer,cp_s_empr_addr,cp_s_empr_cst,cp_s_empr_zip,cp_s_empr_phone,ce_account,ce_category,ce_property_code,ce_license,ce_ar_code,ce_eft_code,ce_eft_bank,ce_bank_account,ce_filler,c_confidential, c_dept, c_employee_number, c_filler, c_pod, c_status, ce_eft_draft_day ) as select arcs_acct ,arcs_name1 ,arcs_name2 ,arcs_the ,arcs_addr1 ,arcs_addr2 ,arcs_city ,arcs_state ,arcs_zip ,arcs_country , CASE WHEN rtrim(ltrim(SSN.rupr_value))='Y' THEN arcs_ssn ELSE 'xxx-xx-xxxx' END,arcs_person ,arcs_phone ,arcs_fax ,arcs_email ,arcs_module ,arcs_cust_class ,arcs_resident ,arcs_updt_by ,arcs_updt_date ,arcs_updt_time ,arcs_internet , CASE WHEN rtrim(ltrim(SSN.rupr_value))='Y' THEN arcs_ssn ELSE 'xxx-xx-xxxx' END,arcs_convert ,arcs_geo_code ,arcs_cust_type ,arcs_vendor_num ,arcs_external_ref ,arcp_dob ,arcp_phone ,arcp_drivers_lic ,arcp_empr_cd ,arcp_employer ,arcp_empr_addr ,arcp_empr_city_st ,arcp_empr_zip ,arcp_empr_phone ,arcp_s_name ,arcp_s_dob ,arcp_s_phone ,arcp_s_drive_lic ,arcp_s_empr_cd ,arcp_s_employer ,arcp_s_empr_addr ,arcp_s_empr_cst ,arcp_s_empr_zip ,arcp_s_empr_phone ,arce_acct ,arce_cat ,arce_prop ,arce_lic ,arce_ar_code ,arce_eft_code ,arce_bank ,arce_bank_acct ,arce_filler ,arcs_confidential , arcs_dept , arcs_employee_num , arcs_filler , arcs_pod , arcs_status , arce_prfr_drft_dy from arcstcid T0 INNER JOIN sprviews ZZ on (ZZ.sprv_idcode = CAST(substring(system_user,charindex('\',system_user)+1,len(system_user)) AS CHAR(20))) and ZZ.sprv_ar='Y' LEFT OUTER JOIN arcstper T1 on T0.arcs_acct = T1.arcp_acct LEFT OUTER JOIN arcsteft T2 on T0.arcs_acct = T2.arce_acct LEFT OUTER JOIN rousrper SSN on ZZ.sprv_idcode = SSN.rupr_userid and SSN.rupr_permcat = 'ACCT_RCV' and SSN.rupr_permkey='arid_show_ssn'
Go to Top of Page
   

- Advertisement -