Viewing 15 posts - 1,291 through 1,305 (of 2,007 total)
SameerKKhan (11/24/2011)
EmployeeMaster(EmpCode,EmpName,MobileNo)
Sample Date EmployeeMaster(1,SameerKhan,4512541321)
ClassMaster(ClassId,ClassName,EmpCode)
Sample Data ClassMaster(1,ClassA,1)
Here EmployeeCode in ClassMaster is the EmpCode from EmployeeMaster.
Attendance(StudentID,Class,Status)
sample data Attendance(445,ClassA,Absent)
Here Class will come from ClassMaster
Now suppose...
November 24, 2011 at 7:46 am
James123 (11/24/2011)
November 24, 2011 at 7:11 am
James123 (11/24/2011)
You're right, I could check the ROW_NUMBER() but I only actually need to know...
November 24, 2011 at 6:59 am
James123 (11/24/2011)
CREATIONDATE | ...
November 24, 2011 at 5:53 am
James123 (11/24/2011)
I have a document history table which records all of the documents created on all cases. I currently return the date of the most-recently created document and a case...
November 24, 2011 at 4:56 am
Hello and welcome to SSC!
The main reason that you are not getting any replies for your question, it that we don't have enough information from you to answer!
For starters, it...
November 24, 2011 at 4:16 am
eseosaoregie (11/24/2011)
oh ok thanks. and the dateadd function. what is it doing?
Sorry, didn't see that part of your question.
@MyToMonth/100 <-- as both of these are INT, this essentially removes the...
November 24, 2011 at 3:53 am
eseosaoregie (11/24/2011)
November 24, 2011 at 3:40 am
Look up UNION.
--First, let's setup your sample data
DECLARE @TABLE AS TABLE (Date1 DATETIME, Date2 DATETIME)
INSERT INTO @TABLE
SELECT '2011-11-01 00:00:00.000', '2011-11-01 00:00:00.000'
UNION ALL SELECT '2011-11-01 00:00:00.000', '2011-11-02 00:00:00.000'
UNION ALL SELECT '2011-11-02...
November 24, 2011 at 1:53 am
Plenty of ways to do this.
DECLARE @table1 AS TABLE (nm CHAR(2), INT, address CHAR(3), abc CHAR(2), efg INT, xxx CHAR(1))
INSERT INTO @table1
SELECT 'aa', 1, 'bks', 'hj', 2, 'e'
UNION ALL...
November 23, 2011 at 9:18 am
SQLSeTTeR (11/23/2011)
Thank you everyone! When I run the query, I am getting the following:Msg 214, Level 16, State 2, Procedure sp_executesql, Line 1
Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.
Sorry,...
November 23, 2011 at 8:28 am
SQLSeTTeR (11/23/2011)
DECLARE @user SYSNAME
DECLARE @sql NVARCHAR(300)
DECLARE cur_Users CURSOR FOR
SELECT name
FROM sysusers
WHERE islogin =...
November 23, 2011 at 8:06 am
stephen.staple (11/23/2011)
First I defined a function:
create FUNCTION [dbo].[fn_GetTopMatch1](@LoginID AS int)
RETURNS TABLE
AS
RETURN
--
SELECT ...
November 23, 2011 at 7:40 am
November 23, 2011 at 1:42 am
stephen.staple (11/22/2011)
Come on you useless bunch of bum bandits. Answer the freaking question.
The main reason that you were not getting any replies for your question, it that we don't have...
November 22, 2011 at 8:18 am
Viewing 15 posts - 1,291 through 1,305 (of 2,007 total)