Viewing 15 posts - 1,906 through 1,920 (of 10,144 total)
From some time yesterday through to the present I've been noticing something a little odd. In the workplace, on the commute home last night (the walk, the tube, the train),...
November 17, 2015 at 2:16 am
Brandie Tarvin (11/16/2015)
Lynn Pettis (11/16/2015)
Sorry, got snippy with an OP.50 lashes with a noodle please.
My Patented Wet Noodle <tm> no less. Shame.
EDIT: BTW, I'm teasing you, Lynn.
Oh gosh, how 50...
November 17, 2015 at 1:55 am
Thanks for posting up sample data - it makes this so much easier.
Try this query for starters:
SELECT
Qty = COUNT(DISTINCT serial),
[Type] = modelo,
DateFrom = MIN([date]),
DateTo = MAX([date])...
November 16, 2015 at 8:39 am
MaxJam (11/16/2015)
Thanks all for your help, I have created a clustered primary key on the three columns and added 2 unique indexes on the 2 pairs and tested it....
This is...
November 16, 2015 at 7:50 am
mm7861 (11/16/2015)
The first tab shows the raw data. Asset ID 1 was purchased on 13/11/2015 and sold on 16/11/2015. This is why the only rows that exist are...
November 16, 2015 at 6:07 am
mm7861 (11/16/2015)
I have a scenario where I am dealing with assets. Every business day we get a new asset value. I need a dataset that shows the current asset...
November 16, 2015 at 5:51 am
The first and second examples would violate the unique constraint you already have. Are you looking to replace your existing unique constraint on vhid, or implement the new rules alongside?
November 16, 2015 at 5:09 am
destino (11/16/2015)
It runs in less than 1 second and shouldn't...
November 16, 2015 at 3:30 am
Try this. It won't be far off:
SELECT
MIN(s.created) loginDateTime,
MAX(s.updated) logoutDateTime,
UPPER(s.appName) appName,
CAST(s.created AS DATE) createdDate,
UPPER(s.userName) userName,
x.IDlist
FROM a_Session s
CROSS APPLY (
SELECT IDlist = STUFF(
(SELECT ',' + r.id...
November 13, 2015 at 10:07 am
There's a standard method for this: FOR XML PATH string concatenation. But first, can you run through this derivative of your query and replace the question marks with the correct...
November 13, 2015 at 9:46 am
Here's another way:
SELECT
co.ContactGroupRef,
co.ContactId,
co.RelationshipToLead,
[RelatedContactId] = a.ContactId
FROM #Contact co
OUTER APPLY (
SELECT ContactId
FROM #Contact ci
WHERE ci.ContactGroupRef = co.ContactGroupRef
AND ci.ContactId <> co.ContactId
AND ci.RelationshipToLead = 'Lead Tenant'
) a
November 13, 2015 at 4:56 am
DECLARE
@BaseYrBegin CHAR(8), -- use the correct data type
@sql NVARCHAR(100)
SET @BaseYrBegin = '20140101' -- use an unambiguous date string
SET @sql = 'SELECT datepart(year,''' + @BaseYrBegin + '''' +...
November 13, 2015 at 4:04 am
Ed Wagner (11/12/2015)
Sean Lange (11/12/2015)
Jack Corbett (11/12/2015)
Sean Lange (11/12/2015)
Brandie Tarvin (11/12/2015)
Sean Lange (11/12/2015)
djj (11/12/2015)
Grant Fritchey (11/12/2015)
November 12, 2015 at 9:20 am
ChrisM@Work (11/12/2015)
nexus2vijay (11/12/2015)
I have a table with 2 columns Version and CurrentDateTime
For every insert the Records should be Autoincrement for Version Column and Record Insertdatetime for that Version
1.0 |...
November 12, 2015 at 6:45 am
nexus2vijay (11/12/2015)
I have a table with 2 columns Version and CurrentDateTime
For every insert the Records should be Autoincrement for Version Column and Record Insertdatetime for that Version
1.0 | 2015-11-12...
November 12, 2015 at 6:36 am
Viewing 15 posts - 1,906 through 1,920 (of 10,144 total)