Click here to Skip to main content
12,066,448 members (55,739 online)
Rate this:
 
Please Sign up or sign in to vote.
ALTER proc [dbo].[sp_chart1](@from as varchar(30),@to as varchar(30))
as 
begin
DECLARE @ft datetime
DECLARE @tt datetime
set @ft=CONVERT(datetime,@from)
set @tt=CONVERT(datetime,@to)
CREATE VIEW VIEW11 AS SELECT Time_Sheet.entry_by,Time_Sheet.duration,Module_Master.module_name FROM Time_Sheet INNER JOIN Module_Master ON Time_Sheet.module_id=Module_Master.module_id where Time_Sheet.create_date>=@ft and Time_Sheet.create_date<=@tt
end

note:-
the above stored procedure gives error plz help me friends ..
Posted 8-Apr-13 4:17am
Edited 8-Apr-13 4:27am
Maciej Los213.7K
v2
Comments
Pablo Aliskevicius 8-Apr-13 9:26am
   
Did you read the error message? They usually point you in the right direction.

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Why change the view? Isn't the date part of the select you would perform on that view?

SELECT ... 
  FROM VIEW11 
  WHERE Time_Sheet.create_date>=@ft 
  AND Time_Sheet.create_date<=@tt

Good luck!
  Permalink  
Comments
Maciej Los 8-Apr-13 10:42am
   
Good work, my 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web03 | 2.8.160208.1 | Last Updated 8 Apr 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100