Viewing 15 posts - 76 through 90 (of 151 total)
Following seems to work but the TEST_TABLE1 and TEST_TABLE2 are on the same server and same database, not sure how do I do it within different servers and database:
MERGE INTO...
October 13, 2015 at 2:58 pm
Thanks Eric, makes sense, I did not make any difference, I tried both.
October 8, 2015 at 1:53 pm
You have been great help Michael
October 8, 2015 at 10:41 am
For the this year Funded, approved, etc the following where statement should work correct?
WHERE c2.DateContractFunded >= dateadd(yy, 0, DATEADD(yy, DATEDIFF(yy, 0, getdate()), 0))
October 8, 2015 at 9:20 am
Also for future reference, whenever I am doing a count, the following way of doing it with JOINS is it the best way and should be used no matter what?
October 8, 2015 at 8:54 am
Thanks Michael, I really appreciate your help. I had figured it out right after I posted yesterday what was missing, I normally don't do in line statements. this was a...
October 8, 2015 at 8:47 am
I tried putting the following directly in the select statement but it didn't worked either and gave me the error, when I run the statement independently it works fine 🙁
(SELECT...
October 7, 2015 at 3:53 pm
Thanks again Michael,
Yes you are absolutely right we have to use the group by clause and also I am stressed out too.
On the select statement I added:
,FundedLastYear_Count
I am still getting...
October 7, 2015 at 3:23 pm
that's he old code which is actually giving out expected results:
,(Select Count(C2.AppID) From Channels c left join Applications a on c.ChannelID = a.SourceID left join Contracts2 c2 on a.AppID...
October 7, 2015 at 2:49 pm
Thank you Michael, you solved one problem with the self joins, the major concern is the count statements:
I need distinct because there are some repetitive values.
when I changed the code...
October 7, 2015 at 2:30 pm
I know it totally makes no sense at all.
this is something I have inherited:
OLD CODE:
Select Distinct
OldDealerID
,NameLong
,NameShort
,Channels.MailingState
,NameFirst
,NameLast
,Phone
,FaxPhone
,Name
,ChannelContacts.Address
,ChannelContacts.City
,ChannelContacts.Zip
,Channels.MailingStreet as 'Physical Address'
,Channels.MailingCity as 'Physical City'
,ChannelContacts.EMailAddress
,(select NameShort from Channels c where c.channelID =...
October 7, 2015 at 2:07 pm
Thank you guys, where do I drag and drop the Catalog folder?
October 7, 2015 at 1:55 pm
Here is the whole query, everything seems fine except for the count statements & Facilitator column in the select statement(although the facilitator column is giving me somehow the expected results)
Can...
October 7, 2015 at 1:47 pm
Also,
I have the following select statement and it is working fine, I cant understand the logic behind it and not sure why is it even working as I haven't aliased...
October 7, 2015 at 1:43 pm
Viewing 15 posts - 76 through 90 (of 151 total)