Viewing 12 posts - 1 through 12 (of 12 total)
Ethics is diseased.
Code of Ethics? Interesting topic. Does the U.S. government follow code of ethics? Shouldn't have used certain damned weapons against Iraq civilians, as Italian news agencies reported. If...
November 22, 2005 at 9:30 am
Same machine or two? SQL Server version and service pack? OS version? Was the package done by MS DTS designer or developped otherwise? These info may help narrow down the...
November 10, 2005 at 3:42 pm
-- try following
UPDATE A
SET ProductTotal = SUM(B.Productamt), DiscountTotal = SUM(B.DiscountAmt), TaxTotal = SUM(B.TaxAmount)
FROM POSumTable A INNER JOIN ItemTable B ON A.PONo = B.PONo
WHERE A.PONo= 23
October 3, 2005 at 11:48 am
Use ISNULL or CASE to replace those NULL values with 0 or '' (empty string) in your aggregate functions.
May 7, 2004 at 1:01 pm
As a general rule, table key should be unique. You may want to consider two tables instead of one. One for Client, the other for Client Data.
May 5, 2004 at 11:40 am
-- first query
SELECT SD.Grade, LC.LocationDesc AS 'SchoolName', COUNT(TD.TeacherID) AS 'TeacherCount'
FROM teacher_data_Main TD INNER JOIN tblLocation LC ON TD.SchoolNum = LC.Location2
INNER JOIN student_data_main SD ON TD.TeacherID = SD.TeacherID
WHERE...
March 30, 2004 at 9:46 am
'0700' seems 7AM to me. If yes, DATEPART(hh, @start_date_time) >= 7 may answer Q1. With regard to Q2, if you'd like to retrieve 'hh00' out of a datetime field,...
March 11, 2004 at 9:48 am
March 9, 2004 at 9:56 am
Try following data.
create table Punches(FEmpId int, FTime datetime, FType varchar(3))
insert into Punches(FEmpId, FTime, FType)
select 210, '2004-03-03 08:59:00.000', 'IN'
union all
select 210, '2004-03-03 09:30:00.000', 'IN'
union all
select...
March 9, 2004 at 9:04 am
I mis-understood the question backward. Try following.
SELECT U.FEmpId, U.FTimeIn, U.FTimeOut, U.Hours
FROM (
SELECT A.FEmpId, A.FTime AS 'FTimeIn',
(SELECT TOP 1 case when B.FType = 'IN' THEN...
March 8, 2004 at 10:52 am
SELECT FEmpID, In AS 'FTime', 'IN' AS 'FType'
FROM TableTimeSheet
-- WHERE ...
UNION ALL
SELECT FEmpID, Out AS 'FTime', 'OUT' AS 'FType'
March 5, 2004 at 11:39 am
Viewing 12 posts - 1 through 12 (of 12 total)