Viewing 15 posts - 76 through 90 (of 1,048 total)
Just a Hit and Trial....
;WITH CTE AS
(
SELECT Top 1 Amount+VATAmount as Total
FROM FAAccKitty WITH(NOLOCK) Where FAAccKitty.PlaceID=FAAccWinners.PlaceID AND FAAccKitty.TransType='PZ')))
FROM FAAccWinners
INNER JOIN Reservations WITH(NOLOCK) ON (Reservations.PlaceID = FAAccWinners.PlaceID)
INNER JOIN Visitor...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 31, 2013 at 12:28 am
What error you get?
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 31, 2013 at 12:24 am
Hi,
If you post table structure with some dummy data and desired output it will be easy for us to help you....
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 31, 2013 at 12:24 am
raghuldrag (12/30/2013)
My table looks like here
create table estr
(
custo int,
company varchar(20),
inv_no int
inv_create_date datetime
)
insert into estr(custo,company,inv_no,inv_create_date) values('10','XXX','PKIN/01/13-14','2013-03-01')
insert into estr(custo,company,inv_no,inv_create_date) values('20','XX1','PKIN/03/13-14','2013-04-01')
insert into estr(custo,company,inv_no,inv_create_date) values('20','XX1','PKIN/05/13-14','2013-04-10')
insert into estr(custo,company,inv_no,inv_create_date) values('30','XXT','PKIN/15/13-14','2013-05-11')
create table cust
(
company varchar(20),
inv_no...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 30, 2013 at 11:39 pm
HI,
I am posting a solution with some dummy data, hope it will help you
DECLARE @table table (ID int identity(1,1), WorkDate datetime)
INSERT INTO @table
values
('2013-12-26 20:10:05.207'),('2013-12-27 18:10:05.207'),('2013-12-30 16:10:05.207')
SELECT DATEADD(D,-1,WorkDate) FROM @table
output:
WorkDate
2013-12-25...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 30, 2013 at 5:44 am
It will be good if you post table structure with some sample data and desired output...
Plesse follow link in my signature...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 29, 2013 at 6:41 am
As Christian suggested, it can easily be done using CTE
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 29, 2013 at 5:44 am
Please do not post duplicate post in different forums it will save other people time too..
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 29, 2013 at 5:43 am
I am not able to understand your requirement...
We will be able to help you if you post the table structure with some sample data and expected output
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 29, 2013 at 5:41 am
GilaMonster (12/26/2013)
kapil_kk (12/24/2013)
GilaMonster (12/24/2013)
kapil_kk (12/24/2013)
Should I drop unique constraint and make non clustered index only or add more column in unique constraint instead of creating another nonclustered index?
If the index...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 27, 2013 at 3:00 am
Thanks for the question Thava 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 25, 2013 at 11:09 pm
GilaMonster (12/24/2013)
kapil_kk (12/24/2013)
Should I drop unique constraint and make non clustered index only or add more column in unique constraint instead of creating another nonclustered index?
If the index is there...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 24, 2013 at 11:27 pm
ALZDBA (12/24/2013)
what columns do you expect to get used ?
Provide indexes for those columns and...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 24, 2013 at 5:47 am
you can check for foreign key constraints using this query-
UPDATE
SET A.deleted = 1
FROM tblParent A
LEFT JOIN tblChild B ON A.PID = B.PID
WHERE B.PID IS NULL
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 22, 2013 at 5:36 am
Can you please provide us some more information...
Expected output from given input data?
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
December 22, 2013 at 5:33 am
Viewing 15 posts - 76 through 90 (of 1,048 total)