Viewing 15 posts - 1,141 through 1,155 (of 3,957 total)
T.Ashish (11/11/2013)
May be he want to learn about sub-queries.
Good point! In that case, I suggest to check here:
November 12, 2013 at 2:28 am
Consider using OPENROWSET. The exact query you'd need depends on some factors like what version of Excel workbook you are using.
November 12, 2013 at 2:24 am
Odd problem. If you didn't say "this table is huge" to throw me off the scent, I'd say it looks like homework.
WITH SampleData (FormKey,Flag1,Flag2,Flag3) AS
(
SELECT...
November 12, 2013 at 2:21 am
PL is probably correct in the way this should be handled from a theoretical perspective.
On the other hand, this may work but also may not be particularly performant.
DECLARE @T1 TABLE...
November 11, 2013 at 8:40 pm
SqlServerNinja (11/11/2013)
Store :
YEAR MONTH StoreName
2013 10 ABC
2013 10 DEF
2013...
November 11, 2013 at 7:11 pm
I think that you'll probably be able to get a better answer if you provide some additional information:
- DDL (CREATE TABLE) for your source table
- INSERT statement(s) to populate the...
November 11, 2013 at 5:25 pm
Nadrek (11/11/2013)
As the above posters have said, it's essentially a two-step process:
1) Find the <uniqueish row identifier>, MAX(VersionNum) GROUP BY <uniqueish row identifier>
2) JOIN back to the main table.
I certainly...
November 11, 2013 at 5:16 pm
Possibly what you are looking for is something like this:
DECLARE @Inventory TABLE
(
InventoryId bigint IDENTITY
,TransactionDate datetime
,InwardId int
...
November 10, 2013 at 7:33 pm
Any time I see something like "Coding required as Subquery NOT as Join" it tells me for sure this is homework.
You'll find that few on this forum are willing to...
November 10, 2013 at 6:08 pm
I am not sure if this is what you're trying to do or not but I don't think you need a FULL JOIN for this:
CREATE TABLE #D(
[ProdDate] [smalldatetime] NULL,
[Productions] [varchar](20)...
November 10, 2013 at 6:02 pm
kwoznica (11/9/2013)
both of your suggestions work very well. thanks for the reply. I can't believe I missed your suggestion Piet. I was playing with a similar query...
November 10, 2013 at 5:22 pm
With 146 points it would seem you've been around long enough to know we need some help from you to help you, namely in the form of DDL and sample...
November 7, 2013 at 9:55 pm
Phil Parkin (11/7/2013)
Also, I might suggest changing the name of your column.
:w00t:
Reminds me of a report one of my ex co-workers used to run every month.
It was a pay...
November 7, 2013 at 9:10 pm
mickyT (11/7/2013)
Thanks ... inspired by others (Jeff) of course:-)
Of course. I'd say mine too, but in this particular case since they both work, I'd go with Micky's (advice to...
November 7, 2013 at 6:43 pm
mickyT (11/7/2013)
Just realized that I was reading the dates the wrong way.Will edit my previous to fix
Other than the dates being wrong in your sample table, it still works because...
November 7, 2013 at 6:34 pm
Viewing 15 posts - 1,141 through 1,155 (of 3,957 total)