Viewing 15 posts - 2,056 through 2,070 (of 3,957 total)
murgatroid (1/30/2013)
January 30, 2013 at 5:56 pm
srienstr (1/30/2013)
I would ordinarily add an "Else 0" prior to the End in those case statements rather than the isnull function. Is there a performance difference, or just personal preference?
Actually,...
January 30, 2013 at 5:54 pm
Does this look like it's close?
;WITH Tally (n) AS (
SELECT 0 UNION ALL
SELECT TOP (
...
January 30, 2013 at 5:49 pm
Abu,
I think my code will handle the sample you provided in your text, albeit it doesn't join the 3 parts into a comma delimited string (but that's easy).
On the other...
January 30, 2013 at 5:23 pm
Has the world just come to an end and no one told me?
Overnight for me in Bangkok and I received not a single notification from SSC, not even from The...
January 30, 2013 at 5:18 pm
That's assuming you use domain creds to log into SQL Server (domain authentication), otherwise it returns the SQL Server login.
January 30, 2013 at 2:10 am
If you're going back one month or 2 months to find 100 records, why do you even care about a date range?
;WITH Tally ([Date]) AS (
SELECT...
January 30, 2013 at 2:04 am
Not exactly clever nor pretty but this might get you close:
with cteOriginal (CompanyName, CompName1, CompName2, CompName3)
as
(
select 'A V H S L ALQUILER Y VENTA DE HOGARES', NULL, NULL, NULL union...
January 30, 2013 at 1:31 am
Mvs2k11 (1/29/2013)
Yes you are correct the other strings contains different time zone.
If you'd like me to take a shot at implementing my suggestion, can you provide some additional sample data...
January 29, 2013 at 6:19 pm
You can probably make a change something like this:
SELECT [Day], MaleGuests=ISNULL(SUM(CASE Gender WHEN 'M' THEN 1 END), 0)
, FemaleGuests=ISNULL(SUM(CASE Gender WHEN 'F' THEN 1 END), 0)
January 29, 2013 at 5:26 pm
I suggestion you make these changes:
SELECT
Institution_Number,
Attached_Account_Number,
[1]=MAX([1]),
[2]=MAX([2]),
[3]=MAX([3])
... (at the end add the following):
GROUP BY Institution_Number, Attached_Account_Number
January 29, 2013 at 2:21 am
Are you passing into the SP any parameters that are then used in the WHERE clause of the query?
If your answer is YES, then you may want to Google "SQL...
January 29, 2013 at 12:49 am
Lynn Pettis (1/28/2013)
Hoping this is late enough not to be useful with your interview but soon enough to help you learn something
Why does this bring to mind the vision of...
January 29, 2013 at 12:47 am
Two ways I know of to do this:
1. In an UPDATE trigger, you can query UPDATE() function (http://msdn.microsoft.com/en-us/library/ms187326.aspx) to tell you if the column was SET by the UPDATE statement....
January 29, 2013 at 12:01 am
Is something like this close enough for you?
DECLARE @Expenses TABLE
([S.no] INT
,[Travel Expense] MONEY
,[Stay Expense] MONEY
...
January 28, 2013 at 11:50 pm
Viewing 15 posts - 2,056 through 2,070 (of 3,957 total)