Rent.pieca Cake 4 U

Jun 7, 1999

ppl,
I'm a student who really needs help with SQL.The problem is i have three tables, member,rent and tape.when a person rents a tape,an entry will be made to the rent table.How do i make sure that the data (category,director,etc) is according(or the same) to the tape_id in the tape table?pleassseeee help.

View 1 Replies


ADVERTISEMENT

T-SQL (SS2K8) :: Assigning BatchID To Cake Making Process

Apr 10, 2014

Observe below records of table Bakery . When cake is order it flows from

BaseMaking----------> Decoration------------> Delivered/Reject .

If cake is Rejected , again process has to start from BaseMaking ..

I need assign BatchID when it flows from BaseMaking to Delivered/Reject And For Analysis I need to exclude BatchID which are rejected..

Expected OutPut..

SQL Script

Create table dbo.Bakery ( CakeID int,EmployeeID Int ,ActionName varchar(20) ,LogTime datetime )
Insert into dbo.Bakery( CakeId, EmployeeID,ActionName,LogTime)Values
(1,1,'BaseMaking','2014-04-10 09:30:00.000' )
, (1,1,'Decoration','2014-04-10 10:30:00.000' )
, (2,2,'BaseMaking','2014-04-10 09:40:00.000' )
, (2,1,'Decoration','2014-04-10 10:43:00.000' )
, (2,3,'Reject','2014-04-10 10:50:00.000' )
, (2,2,'BaseMaking','2014-04-10 11:00:00.000' )
,( 2,1,'Decoration','2014-04-10 12:00:00.000' )
,( 2,3,'Delivered','2014-04-10 12:30:00.000' )

View 9 Replies View Related

SQL Server 2008 :: Join Two Tables - Compare Amounts (Rent)

Jun 20, 2015

Refer to my query thread on msdn SQL site, how I can achieve the result.

[URL] .....

View 0 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved