Click here to Skip to main content
15,892,927 members
Home / Discussions / Database
   

Database

 
Questionerror? Pin
suni_dotnet5-Mar-09 11:27
suni_dotnet5-Mar-09 11:27 
AnswerRe: error? Pin
Blue_Boy5-Mar-09 13:04
Blue_Boy5-Mar-09 13:04 
GeneralRe: error? Pin
suni_dotnet5-Mar-09 13:24
suni_dotnet5-Mar-09 13:24 
GeneralRe: error? Pin
Blue_Boy5-Mar-09 13:43
Blue_Boy5-Mar-09 13:43 
GeneralRe: error? Pin
suni_dotnet5-Mar-09 13:48
suni_dotnet5-Mar-09 13:48 
GeneralRe: error? Pin
Blue_Boy5-Mar-09 13:50
Blue_Boy5-Mar-09 13:50 
GeneralRe: error? Pin
suni_dotnet5-Mar-09 13:56
suni_dotnet5-Mar-09 13:56 
GeneralRe: error? Pin
Blue_Boy5-Mar-09 14:21
Blue_Boy5-Mar-09 14:21 
CREATE TABLE [dbo].[HouseKeeping]<br />
(<br />
	[RoomID] [int] NULL,<br />
	[DateWhenFilled] [varchar](50) NULL,<br />
	[DateWhenFree] [varchar](50) NULL,<br />
	[TimeForHouseKeeping] [varchar](50) NULL<br />
)<br />
____________________________________________________<br />
<br />
CREATE TABLE [dbo].[PresidentialSuite]<br />
(<br />
	[RoomID] [int] NULL,<br />
	[DateWhenFilled] [varchar](50) NULL,<br />
	[DateWhenFree] [varchar](50) NULL,<br />
	[TimeForHouseKeeping] [varchar](50) NULL,<br />
	[Avaliable] [varchar](50) NULL<br />
)<br />
_____________________________________________________<br />
<br />
Insert Into PresidentialSuite Values(1,'2009.03.06','2009.03.06','20','yes')<br />
Insert Into PresidentialSuite Values(2,'2009.03.06','2009.03.06','20','no')<br />
Insert Into PresidentialSuite Values(3,'2009.03.06','2009.03.06','20','no')<br />
<br />
INSERT INTO HouseKeeping<br />
SELECT RoomID, DateWhenFilled, DateWhenFree, TimeForHouseKeeping<br />
FROM PresidentialSuite WHERE avaliable='no'<br />
SELECT * FROM HouseKeeping 


The last select statement should return you two inserted rows in table HouseKeeping.
Hope this will hel you.


I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.


GeneralRe: error? Pin
suni_dotnet5-Mar-09 15:39
suni_dotnet5-Mar-09 15:39 
GeneralRe: error? Pin
Blue_Boy5-Mar-09 15:46
Blue_Boy5-Mar-09 15:46 
Questionregister password Pin
cyannaz5-Mar-09 6:42
cyannaz5-Mar-09 6:42 
QuestionRe: register password Pin
cyannaz5-Mar-09 16:11
cyannaz5-Mar-09 16:11 
Questionsp execute problem Pin
Dilum5-Mar-09 6:20
Dilum5-Mar-09 6:20 
AnswerRe: sp execute problem Pin
Rami Said Abd Alhalim9-Mar-09 22:03
Rami Said Abd Alhalim9-Mar-09 22:03 
QuestionFilling a table with select statement Pin
Muammar©5-Mar-09 1:59
Muammar©5-Mar-09 1:59 
AnswerRe: Filling a table with select statement Pin
Blue_Boy5-Mar-09 2:27
Blue_Boy5-Mar-09 2:27 
GeneralRe: Filling a table with select statement Pin
Muammar©6-Mar-09 4:37
Muammar©6-Mar-09 4:37 
QuestionMultipart Problem on the Following Query Pin
Vimalsoft(Pty) Ltd4-Mar-09 23:25
professionalVimalsoft(Pty) Ltd4-Mar-09 23:25 
AnswerRe: Multipart Problem on the Following Query Pin
Vimalsoft(Pty) Ltd4-Mar-09 23:56
professionalVimalsoft(Pty) Ltd4-Mar-09 23:56 
QuestionPrivileges in Oracle Pin
Muammar©4-Mar-09 21:29
Muammar©4-Mar-09 21:29 
Question2 Oracle Question Pin
E_Gold4-Mar-09 19:19
E_Gold4-Mar-09 19:19 
QuestionMS-ACCESS Query Problem Pin
M Riaz Bashir4-Mar-09 19:14
M Riaz Bashir4-Mar-09 19:14 
AnswerRe: MS-ACCESS Query Problem Pin
Rupesh Kumar Swami4-Mar-09 20:32
Rupesh Kumar Swami4-Mar-09 20:32 
GeneralRe: MS-ACCESS Query Problem Pin
ChandraRam4-Mar-09 20:57
ChandraRam4-Mar-09 20:57 
QuestionGlobalization Pin
icanmakeiteasy4-Mar-09 18:42
icanmakeiteasy4-Mar-09 18:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.