Viewing 15 posts - 1 through 15 (of 15 total)
wschampheleer (2/9/2010)
SELECT [t1].[Id],[t1].[Name]
,[t1].[Designation]
,[t1].[Address]
...
February 9, 2010 at 3:25 am
muralikrishnap (2/9/2010)
You need to use sql functions like stuff and for xml to get values from table 2 as csv.
Thank you Ramesh, this is working fine.
February 9, 2010 at 3:22 am
I want to use WHILE in my SQL Query, I think somewhere it is getting wrong so the rows in record set are getting repeated in the output.
I have 2...
February 9, 2010 at 1:53 am
if the Table2 has structure like as:
Table2
(
Id INT FK(Id) references TAble2,
Value
)
Now, in this table for Id=1,
Id Value
1 Salary
2 Age
3 ...
February 9, 2010 at 12:45 am
It seems this would go as per my requirement, but I wanted that impossible way. 🙂
Thank you
February 4, 2010 at 4:29 am
In #Table1, the columns are declared explicitly taking in mind the total number of columns combinedly from Query1 and Query2.
February 4, 2010 at 4:09 am
Hi,
I tried to insert into #Table1 and I am getting an error as :
The select list for the INSERT statement contains fewer items than the insert list. The number of...
February 4, 2010 at 4:00 am
Definition of bltTssVeh is as:
USE [Mark]
GO
/****** Object: Table [dbo].[bltTssVeh] Script Date: 01/22/2010 17:29:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[bltTssVeh](
[Veh_Id] [int] NULL,
[VehicleNo] [nvarchar](16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TssNo]...
January 22, 2010 at 5:00 am
DECLARE @Driver TABLE(DriverName VARCHAR(64), ArrTime SMALLDATETIME, DepartTime SMALLDATETIME, VehicleNo VARCHAR(16), IsLate DATETIME)
INSERT INTO @Driver(DriverName, VehicleNo, DepartTime, ArrTime, IsLate)
SELECT TOP 10 DrvNameMain AS DriverName, ArrTime = @Time,
DepartTime=@DepTime, vehicleNo AS Vehicle,
(CASE...
January 22, 2010 at 4:46 am
@ Paul's Query -
1. In the table, there are millions of records stored and are keep on increasing frequently.
2. As per based on date search criteria the records has...
January 22, 2010 at 3:03 am
Answers to ur queries:
1. In the table, there are millions of records stored and are keep on increasing frequently.
2. As per based on date search criteria the records has to...
January 19, 2010 at 6:56 am
Thank u Adi for your suggestion.
I think the option you gave is good, using a >=and<= operator instead of BETWEEN is much better to know the boudaries of condition.
Thanks...
January 19, 2010 at 2:23 am
This is part of my query:
(CASE
WHEN (DATEDIFF(second,Actual.ActualDepartTime,Schedule.SchdDepartTime)/60) >=60
THEN Convert(nvarchar(10),(DATEDIFF(second,Actual.ActualDepartTime,Schedule.SchdDepartTime)/60)/60)+' '+'hr'
Else (DATEDIFF(second,Actual.ActualDepartTime,Schedule.SchdDepartTime)/60) +' '+'min.'
END) AS DeptEarly
December 31, 2009 at 3:13 am
Thanks Stewart for your valuable suggestion.
I had thought the same go earlier.
December 30, 2009 at 12:49 am
Date period is variable, it depends on user
December 29, 2009 at 11:40 pm
Viewing 15 posts - 1 through 15 (of 15 total)