Viewing 15 posts - 376 through 390 (of 429 total)
I made it this way. Please provide some easy solutions
DECLARE @CurWeek DATETIME
DECLARE @Week1 DATETIME
DECLARE @Week2 DATETIME
DECLARE @Week3 DATETIME
SELECT @CurWeek = MAX(DataDate) FROM @DataTable
SELECT @Week1 = MAX(DataDate) FROM @DataTable WHERE DataDate < @CurWeek
SELECT @Week2...
June 9, 2005 at 10:48 am
Try using number of re-trys and donot report error properties of SQL server job.
Or
Create an application with C#, VB which can very well handle these errors and call the...
June 9, 2005 at 9:02 am
Remi I don't belive you are suggesting Dynamic SQL
How about this
CREATE PROC MyProc
(
@pParam VARCHAR(2000)
)
/* Parse the Params */
DECLARE @TblParam TABLE
(
Param VARCHAR(25)
)
WHILE CHARINDEX(',', @pParam) > 0
BEGIN
INSERT @TblParam VALUES(SUBSTRING(@pParam,1,CHARINDEX(',', @pParam) -1))
SELECT @pParam...
June 8, 2005 at 2:09 pm
It would need to build a dyanic query which will lead to security lapses/issues.
(Normally db name is determined by the connection unless there is a need to make external...
June 8, 2005 at 8:15 am
If you can call DTS package from coldfusion (We can do it with ASP) create a DTS Package and Execute the package.
June 8, 2005 at 8:01 am
Made it without a loop.
SET NOCOUNT ON
/* Add sample Data Start */
DECLARE @status TABLE
(
RecTime DATETIME,
Status VARCHAR(25)
)
DECLARE @DELAY INT, @DELAY1 INT
DECLARE @CTR...
June 8, 2005 at 7:50 am
You have all the these functions in crystal Reports. It is a way better than access I would say. Max, Min, COunt, Avg allare there you name it it is...
June 7, 2005 at 9:12 am
I would assume '2005/a/b/001' is record number and is in one column.
Next recorde would be some thing like '2005/a/b/002' the '/' in the data is confusing.
IF EXISTS (SELECT *...
June 7, 2005 at 8:32 am
There can be
Only one row for the criteria or
somtimes it happens to me. Make the changes but forget to excute the changes in the data base.
Query looks fine...
June 7, 2005 at 8:10 am
I had to go another level to get the results.
SET NOCOUNT ON
DECLARE @temperatures TABLE
(
TempTime DATETIME,
Temperature NUMERIC(5,2)
)
DECLARE @CTR INT
DECLARE @Temp NUMERIC(5,2)
DECLARE @myDate DATETIME SET @myDate = '06/07/2005'
SET @CTR = 0
WHILE @CTR <=...
June 7, 2005 at 7:58 am
The problem is if the regional settings of a client is dd/mm/yyyy and regional SQL server date format is mm/dd/yyyy. Client will send 02/03/2005 as 2nd March and Server will...
June 7, 2005 at 6:28 am
SQL Server version 6.5 we face a lot of problems like this. There If the table has datatype varchar(10) and if we insert a 11 character string it doesn't complain....
June 6, 2005 at 8:14 pm
SELECT university_id,college_id,department_id,year_id,semister_id, grade, count(student_id) as number_of_students
FROM
(
SELECT university_id,college_id,department_id,year_id,semister_id,'grade'=
CASE WHEN score <.5 then 'c'
WHEN score>=.5 AND score< .7 THEN 'b'
ELSE 'a'
END,
student_id
FROM university_grades
WHERE university_id=@university_id AND
June 6, 2005 at 3:03 pm
Also check the length of variable that holds dynamic SQL.
June 6, 2005 at 11:40 am
Viewing 15 posts - 376 through 390 (of 429 total)