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 2000 Forums
 SQL Server Development (2000)
 Help writing query

Author  Topic 

sardinka
Posting Yak Master

142 Posts

Posted - 2006-04-19 : 09:38:35
please help me write a query:
I have a user function dbo.udf_Valid which is return true or false
(@SID ,@PType,@Group,@Date)

Table 1 with this info:
SID PType Group
12 12 123
45 1 456

Table2 with this info:
PType PType2
12 13
12 45
12 8
1 8
1 9

when I pass the data from table1 to the function I am Okay.
The complexity starts when table2 is involved.
I need to pass PType2 to the function if Ptype is exists in table1.
If function returns true for one of the PType2 return true in all other cases false.

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2006-04-19 : 16:31:24
You haven't provided enough information. You need to provide
the code used in the UDF and the query you're using to call
the function.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-20 : 01:35:38
sardinka, It seems that you dont follow the topics after you get replies. I have seen two such topics. Explain the logic clearly by giving sample data and the result you want

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -