Click here to Skip to main content
11,718,016 members (85,848 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server-2008
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 3:17am
Edited 8-Apr-13 3:27am
v2
Comments
Pablo Aliskevicius at 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 at 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
0 OriginalGriff 215
1 F-ES Sitecore 210
2 Maciej Los 140
3 Jochen Arndt 120
4 Andy Lanng 115
0 Sergey Alexandrovich Kryukov 1,649
1 OriginalGriff 535
2 Maciej Los 529
3 Richard MacCutchan 440
4 CHill60 415


Advertise | Privacy | Mobile
Web04 | 2.8.150901.1 | Last Updated 8 Apr 2013
Copyright © CodeProject, 1999-2015
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