Viewing 15 posts - 5,431 through 5,445 (of 8,731 total)
After analyzing your query and Eddie's, I keep wondering what are you trying to accomplish. This can certainly be a major problem with cartesian products. Could you post DDL, sample...
December 5, 2014 at 11:29 am
mhildebrand (12/5/2014)
David Burrows (12/5/2014)
SELECTv.Vchvendor, SUM(vgl.vglamount) AS [VGLamount],
STUFF((SELECT ','+ b.vchinvoicenbr
FROMVoucherGLDist a
JOIN Voucher b ON b.VchVoucherNbr = a.VGLVoucher
WHERE b.VchVendor = v.Vchvendor
FOR XML PATH ('')),1,1,'') AS [Invoices]
FROMVoucherGLDist vgl
JOIN Voucher v ON...
December 5, 2014 at 10:57 am
Why cross tab if a simple aggregate works?
SELECT ID,
MAX(Red) AS Red,
MAX(Yellow) AS Yellow,
MAX(Green) AS Green
FROM Sometable
GROUP BY ID
December 5, 2014 at 10:40 am
Are you asking for something like this?
SELECT fg.name AS filegroup, df.name AS filename, df.physical_name
FROM sys.filegroups fg
JOIN sys.database_files df ON fg.data_space_id = df.data_space_id
If not, I feel like there's a language barrier.
December 4, 2014 at 3:49 pm
Data files as .mdf for primary and .ndf for secondary. SQL Server only uses the transaction log and the files are .ldf.
Data files are organized in filegroups, and log files...
December 4, 2014 at 11:51 am
Evil Kraig F (12/4/2014)
GilaMonster (12/4/2014)
Alex Jordan (12/3/2014)
I figured it out. Apparently I can order sub-queries as long as I provide a alias.
Nothing to do with the ORDER. Derived tables always...
December 4, 2014 at 11:28 am
You can find the answer in the following article:
December 4, 2014 at 10:35 am
Could you post the definition of the function Adv_Returntranscationsbytype or what should it do?
December 4, 2014 at 9:46 am
Yes, I made a mistake by not including the 2nd parameter of LEFT function. You should have been able to solve it by yourself.
=UCase(Left(Fields!Event_Type.Value,1)) & LCase(Right(Fields!Event_Type.Value, Len(Fields!Event_Type.Value) - 1))
December 4, 2014 at 9:12 am
shelts (12/4/2014)
Thanks to all who replied, neither scenario appears to work though 🙁
Why not? If you get more details, you could get better answers. 😉
December 4, 2014 at 8:46 am
That's normal, because you're still calculating the days for November. If you understand each part of the formula, you should be able to fix it yourself. To use different months,...
December 4, 2014 at 8:32 am
You just need to change some things and the 4 options are still available to test. 😉
SELECT c.ContactName, e.EmailAddress, MIN( e.EmailID) EmailID
FROM #tblContacts c
INNER JOIN #tblEmails e ON c.ContactID =...
December 3, 2014 at 4:47 pm
I can think on several different ways to accomplish this. I'm not sure which one is the best on your scenario. Could you test and tell us which one and...
December 3, 2014 at 4:19 pm
What do you mean by "doesn't work"? Error? Incorrect results? Detonates atomic bomb?
December 3, 2014 at 3:09 pm
I believe that this should do it. You should test it adequately.
"A_"
+ RIGHT( "0" + (DT_STR, 2, 1252) MONTH(DATEADD("MM", -1, GETDATE())), 2)
+ "01_"
+ RIGHT( "0" + (DT_STR,...
December 3, 2014 at 2:43 pm
Viewing 15 posts - 5,431 through 5,445 (of 8,731 total)