Login
Register
Tutorials
Forum
Career Development
Resources
Reviews
Jobs
Interview
Communities
Projects
Training
Silverlight Games
|
Bookmarks
|
New Members FAQ
|
Mentor
|
Code Converter
|
IT Companies
|
Peer Appraisal
|
Members
|
Revenue Sharing
|
Computer Jokes
|
New Posts
|
Social
|
Online Members
ankita
More...
Forums
»
.NET
»
SQL Server
»
SQL query
Posted Date:
27 Jun 2008
Posted By::
krishna chaitanya
Member Level:
Gold
Member Rank:
798
Points
: 1
Responses:
3
thank u for replay
yes i used like its working but am using stored procedure
my s.p is
declare @site as varchar(50)
set @site='40'
declare @t1 table
(
t1 int
)
while charindex(',',@site) > 0
begin
insert into @t1 select substring(@site,1,(charindex(',',@site)-1))
SET @site = substring(@site,charindex(',',@site)+1,len(@site))
end
insert into @t1
select @site
Select m.ItemId, m.CreatedByUser, m.FileFriendlyName, m.FileNameUrl, m.FileSize, m.CreatedDate, m.Category, m.ItemType, m.DestructionDate, m.Acls, m.RealFolderPath, m.RealFileName, m.IndexField2
from Documents m
where m.moduleid =12 and m.FileNameUrl =RTrim('E:\NRA-2\NRAFilesRepository\MyDocuments\')
and (Acls in (select * from @t1))---> hear acls in am using how to use 'like'
acls like (select * from @t1) it is not working how to use that one
Tweet
Responses
#256453 Author:
Bunty
Member Level:
Gold
Member Rank:
14
Date: 27/Jun/2008 Rating:
Points
: 3
Hi,
It's my pleasure.
I want to know onething we can declare as a table because table is not a datatype.
Waiting for your reply.
Thanks and Regards
S.S.Bajoria
Thanks & Regards
Bunty
Expertise Dot Net On Earth
#256466 Author:
RajaSekaran R
Member Level:
Gold
Member Rank:
0
Date: 27/Jun/2008 Rating:
Points
: 4
check whether u are getting value in the @t1 table.
only if u get some rows their u can get the output in last select statement..
so have an i condition in the last select like
If (select count(*) from @t1 ) >= 1
// ur statement with @t1 comparison
else
// statement without using @t1
Hope u got it..
#257130 Author:
Gaurav Agrawal
Member Level:
Gold
Member Rank:
176
Date: 28/Jun/2008 Rating:
Points
: 3
Register urself on this site for earning money by using this link
http://www.rupeemail.in/rupeemail/invite.do?in=MTAxNTM0JSMlS0hqblZtUFI0c3BmTmw2azNNVDhyb1dCaA==
GA
Thanks & Regards,
Gaurav Agrawal
http://www.planetofcoders.com/
Post Reply
This thread is locked for new responses. Please post your comments and questions as a
separate thread
.
If required, refer to the URL of this page in your
new post
.
Tweet
Next :
SQL query
Previous :
RowID From Sqlserver2000
Return to Discussion Forum
Post New Message
Category:
Related Messages
Exporting SQL Server Table to Excel Using DTS
Function is not working
trigger problem.
DATE SEARCH IN ASPX PAGE
Any body tell good pl sql book reference URL and FAQ
Active Members
Today
Prachi Kulkarn...
(37)
Hemanth
(25)
Prasad kulkarn...
(25)
Last 7 Days
Naved Hasan ...
(255)
naveensanagase...
(230)
Pawan Awasthi
(176)
more...
Awards & Gifts
Email subscription
.NET Jobs
.NET Articles
.NET Forums
Articles Rss Feeds
Forum Rss Feeds
Talk to Webmaster Tony John