December 30, 2008 at 12:55 am
hello,
i have a table with tis design:
ID int
Title nvarchar(500)
Body nvarchar(max)
Date_Time datetime
Cat1_ID int
Cat2_ID int
Lang_ID int
i want to write a storeprocedure to get (Date_Time) and a (Cat1_ID) or (Cat2_ID)
and then give me all of the records with that or those Categorys in that date.
i thinkk i need 4 variable for enter the parameters:
1: Category name
2: Category desc
3:date&Time1
4:date&Time2
ii want this store procedure ask me these three and then give me he records:for example:
ID Title Body Date_Time Cat1_ID Cat2_ID Lang_ID
1 a aaaaa 01/01 Weather Internal 1
2 b bbbbb 12/05 Water External 2
3 c ccccc 01/05 water Internal 1
4 d dddddd 01/03 water Internal 1
Now
1: Category name: Cat1_ID
2: Category desc:water
3:date&Time1 :01/03
4:date&Time2 :01/05
and it must give me this record:
3 c ccccc 01/05 water Internal 1
4 d dddddd 01/03 water Internal 1
Edited: Today @ 7:36:05 AM by nazaninahmady_sh
December 30, 2008 at 12:59 am
This is basically a duplicate post. Please place answers in this thread, http://www.sqlservercentral.com/Forums/Topic627035-146-1.aspx.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
December 30, 2008 at 12:59 am
Please don't cross post. It just wastes peoples time and fragments replies.
No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic627035-146-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 30, 2008 at 1:01 am
I won this time Gail.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply