Viewing 15 posts - 556 through 570 (of 1,347 total)
>>There is as such no criteria in our case to decide which one to delete or which one to keep
That makes no sense from a business point of view.
Why...
February 21, 2006 at 10:44 am
>>HR just know
It is difficult, if not impossible, to code a solution for a business problem where "people just know stuff".
You need to dig up the business rules/requirements before writing a...
February 20, 2006 at 10:29 am
>>Can I use a variable for the table name? If so, what is its delcaration type?
No, you need to build SQL in a string and execute it dynamically. Search the...
February 20, 2006 at 10:16 am
>>MIS supervisor
I have 1 of those too, who believed the same thing, because the highly paid "suits" who were consulted to build our 1st datamart said they'd had "problems"...
February 20, 2006 at 8:41 am
>>Should'nt the SQL code been written in procedures, and then DTS tasks to execute each procedure?? Please comment.
I would also say yes, for the reasons already mentioned, but also for...
February 20, 2006 at 8:29 am
You don't need to join to the base tables, just compare inserted & deleted:
Create Trigger tbl_pts_positions_Update_01_Tr
On tbl_pts_positions After Update
As
Begin
Insert Into tbl_pts_positions_history
(
PoID,fname,lname,city,state,jobcode,
descr,temp_ends,Eff_Date,Comments,Trans_Time
)
Select d.*,...
February 17, 2006 at 3:54 pm
I don't think it needs to be that complex:
Select Calldate, Project,
Sum(
Case
-- Add hours if Project ends in 5 or if at requested @Site
...
February 17, 2006 at 2:53 pm
What are you expecting this DISTINCT to do ?
>>select distinct(users.country), iso.a2 as cc
You can't DISTINCT just 1 column in the resultset, if that is the intent of the parentheses.
February 17, 2006 at 2:19 pm
Right, but this highlights my comment on requirements statement not matching sample data:
>>group by Calldate,Project
If you GROUP BY Project, and there is more than 1 Project at a site that...
February 17, 2006 at 1:09 pm
Your sample output does not match your stated requirements:
If site parameter of 2 is passed.
I need to see the following results:
Calldate Project TotalHours
20060217 EAUD5 2.5
20060217 EACQ5 5
20060217 EACQ6...
February 17, 2006 at 12:59 pm
SELECT 'I have a CASE in my WHERE'
WHERE (
CASE
WHEN 'Apples' = 'Oranges' Then 0
ELSE 1
END ) = 1
February 17, 2006 at 12:37 pm
Why not start small ? get 1 subset working, then add additional IF conditions ?
CREATE PROCEDURE [dbo].[get_phy_list] (
@DateFrom datetime,
@DateTo datetime,
@mName varchar(50) =null
)
AS
BEGIN
declare @moduleName datetime
if @mName is null
February 17, 2006 at 10:21 am
It also needs to be pointed out that many of your joins are incorrect syntax. You have multiple INNER JOINs that are missing their ON () join column list.
And of...
February 17, 2006 at 10:17 am
You are missing a BEGIN keyword:
CREATE PROCEDURE [dbo].[get_phy_list]
@DateFrom datetime,
@DateTo datetime,
@mName varchar(50) =null
AS
BEGIN
February 17, 2006 at 10:14 am
Viewing 15 posts - 556 through 570 (of 1,347 total)