Viewing 15 posts - 8,671 through 8,685 (of 9,641 total)
I think this code will do what you need:
[font="Courier New"];WITH cteInvalidRecords AS
(
SELECT
UniqueName,
ParentRef,
MIN(ModifiedUTC) AS ModfiedUTC
FROM
dbo.CmsContent
GROUP BY
UniqueName,
ParentREF
HAVING
COUNT(OID) > 1
...
May 7, 2008 at 7:27 am
You have a typo in your query. Check out the BOLD and CAPITALIZED stuff:
UPDATE dbo.tblClmsRx
SET dbo.tblClmsRx.RxPrescriberLName = LTRIM(RTRIM(dbo.tblPharmacyCLAIMSTemp.LastName))
FROM dbo.tblClmsRx
INNER JOIN dbo.tblPharmacyCLAIMTemp ON (dbo.tblClmsRx.RxClaimNum = dbo.tblPharmacyClaimTemp.RxClaimNum)
Claim is...
May 7, 2008 at 7:15 am
Sreemati,
I rewrote your query using a LEFT OUTER JOIN because I understand them better. The order is get the deceased patients for your practice and then go out and...
May 7, 2008 at 7:10 am
Nomvula,
Based on the information you provided it does not appear that you need 2 tables. You could do the report with 1 table with a group on Batch Number....
May 7, 2008 at 6:25 am
Nice article. I also would be interested in the any difference in restore times. I am not working with VLDB'd or even LDB's so backup time is not...
May 5, 2008 at 7:24 am
You do not have an id column in the inserted table because you do not have an id column in your base table. Your code should be:
[font="Courier New"]CREATE PROC [dbo].[getSelectCertNumber]
AS
DECLARE...
May 2, 2008 at 2:50 pm
There is a multi-part column at database journal called SQL Credit that walks you through the whole process from design to re-factoring.
May 2, 2008 at 2:15 pm
How about this:
[font="Courier New"]SELECT
RTRIM(LTRIM(CAST(CONTACT.ID AS VARCHAR(20))))+'--'+CAST(SALESCONTRACT.CONTRACTID AS VARCHAR(20)),
CONTACT.FNAME +' '+CONTACT.LNAME,
SUM(CASE
WHEN MDTRANS.TRANSDATE > DATEADD(DAY, -10, GETDATE()) AND MDTRANS.AMOUNT > 0, MDTRANS.AMOUNT
WHEN MDTRANS.TRANSDATE <= DATEADD(DAY, -10,...
May 2, 2008 at 2:12 pm
Here's something similar to what I suggested in this thread:
[font="Courier New"]CREATE TABLE #MyTable (GroupCode CHAR(1), Num INT)
GO
INSERT INTO #MyTable
SELECT 'A',1
UNION SELECT 'A',2
UNION SELECT 'A',3
UNION SELECT 'B',1
UNION SELECT 'B',2
UNION SELECT 'B',3
UNION SELECT...
May 2, 2008 at 1:59 pm
I don't know why it would rollback all unless it considered them all being nested within a a larger transaction which then rolled back when you killed one. I...
May 2, 2008 at 12:27 pm
Yeah that would be it. Wrapping in the URL tag adds the http://.
May 2, 2008 at 11:59 am
Tom Garth (5/2/2008)
Everything you ever wanted to know about working with Excel using T-SQL can be found at this link.http://www.simple-talk.com/sql/t-sql-programming/sql-server-excel-workbench/
Will someone PLEASE tell me how to properly post a link!
Tom...
May 2, 2008 at 10:23 am
Todd Engen (5/2/2008)
Don't know about the log, but if that's the DELETE statement it's removing all your current records and leaving the ones older than 6 months.
Great catch Todd. ...
May 2, 2008 at 10:18 am
Viewing 15 posts - 8,671 through 8,685 (of 9,641 total)