Joined: 05 Jun 2015
Online Status: Offline
Posts: 28
Topic: sql function in command Posted: 02 Jul 2015 at 7:23pm
something like this
select a.name,b.rate,dbo.[getname(@empid)] as 'empname'
from abc a join bca b on a.id=b.id and join cab c on b.cid=c.cid i have written select query like this not the table name and filed name are real but for just example.
so this query i used in command in crystal report
it gives me error if m used this dbo.[getname(@empid)] as 'empname' if I'm remove it no error.
need help as soon as possible.
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 06 Jul 2015 at 8:31am
It appears that getname is a stored procedure or a view. I know that sometimes Crystal Reports has issues 'seeing' SP's and views depending on security set on the database. Also make sure that under File,Options, Database that Views and Stored Procedures are checked.
Joined: 05 Jun 2015
Online Status: Offline
Posts: 28
Posted: 07 Jul 2015 at 7:58pm
as in crystal reports command is only use to give the idea that the firld is which type
string ,number,etc.
it gives error like @empid paramter need to paas but i dont want to paas it
]then after i just change selct query in cimmmand of crystal report like this
select a.name,b.rate,'' as 'empname'
from abc a join bca b on a.id=b.id and join cab c on b.cid=c.cid
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 08 Jul 2015 at 4:17am
I have never tried to call a sql custom function in a command. Just a guess but the function is likely just a replicating a join from a code on your primary table to an employer table that stores the name. Using a join should do the same thing. You would need an outer join if any rows in your primary table have no matching record
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum