Viewing 15 posts - 751 through 765 (of 1,229 total)
bitbucket-25253 (12/19/2011)
LutzM Posted Today @ 9:07 AM
Hmmm.... interesting....
Based on the (almost public available) age of the two fellows you're somewhat between 14 and 16 years old. Hard to believe that...
December 19, 2011 at 8:53 am
It works, but the day of week and time calculations don't have to be run multiple times. Apply is handy for this sort of thing:
SELECT
d.aRow,
d.aDate,
x.[Dayname],
x.TheTime,
Weekend = CASE...
December 19, 2011 at 6:24 am
pespes009 (12/19/2011)
I think the problem is with the join on the
JOIN VR_DataLoad.prdrmkt.dbo.tbl_asset_instance ai
not that at all
Please...
December 19, 2011 at 3:34 am
You will need to work outside of the stored procedure, checking each query separately, in order to get this working. Can you do this? Here's the first part. You don't...
December 19, 2011 at 3:23 am
pespes009 (12/19/2011)
Which column please highlight ...Many thanks
The one which is referred to in the second query:
isNull(#a.DisposalType, '''') AS DisposalRoute,
December 19, 2011 at 3:11 am
The second column here isn't named:
INSERT #a
SELECT
currA.numAsset_instance_id,
CASE WHEN isnull(vcca.numAsset_instance_id, 0) > 0 THEN ''Retail''
WHEN isnull(vcaa.numAsset_instance_id, 0) > 0 THEN ''Auction''
ELSE ''Unassigned''
END
FROM VR_DataLoad.prdrmkt.dbo.v_current_asset_instance currA
December 19, 2011 at 2:50 am
CASE resolves a value or column:
SELECT aValue = CASE WHEN 1 = 1 THEN 10 ELSE 20 END
Your query fails because CASE is resolving a statement.
Try this:
;WITH MyTable AS (SELECT...
December 19, 2011 at 2:37 am
pespes009 (12/19/2011)
When i run this stored proc it falls over with the multi-part idenfier.......
Easy to check if this is the case
SELECT TOP 10 * FROM VR_DataLoad.prdrmkt.dbo.v_current_asset_instance
SELECT TOP 10 *...
December 19, 2011 at 2:19 am
Hi Sami
Can you change your data samples to DDL please? CTREATE TABLE and INSERTs. If you're not sure how to do it, read the link in my sig (please read...
December 19, 2011 at 1:52 am
Please don't cross post, it fragments replies and wastes time.
Replies to http://www.sqlservercentral.com/Forums/FindPost1223667.aspx
December 19, 2011 at 1:45 am
Hi
Can you set up your sample data for easy consumption, like this:
CREATE TABLE #Sampledata (LEVEL1 datatype, LEVEL2 datatype, LEVEL3 datatype, LEVEL datatype, ID datatype, datatype, DESC datatype, CUSTNO datatype,...
December 19, 2011 at 1:40 am
John Mitchell-245523 (12/16/2011)
December 16, 2011 at 5:10 am
GSquared (12/15/2011)
It does use SMTP. But so does Database Mail. SMTP is simply the mail transfer method ("Simple Mail Transfer Protocol"...
December 15, 2011 at 3:45 pm
GilaMonster (12/14/2011)
btw, if I've understood you properly
DELETE FROM ContactGroupMember
WHERE NOT EXISTS (SELECT 1 FROM #FinalResults AS FR WHERE ContactGroupMember.ContactGroupId = FR.ContactGroupID AND ContactGroupMember.ContactId = fr.OwnerID)
This will generate different results to...
December 15, 2011 at 5:08 am
Folks may be a little reluctant to help with this because it looks - forgive me if I'm wrong - as if someone fairly new to TSQL has gone a...
December 14, 2011 at 11:25 am
Viewing 15 posts - 751 through 765 (of 1,229 total)