Click here to Skip to main content
15,885,141 members
Home / Discussions / Database
   

Database

 
GeneralRe: Can't Insert data into Access Table from Python Pin
Victor Nijegorodov6-Dec-18 1:09
Victor Nijegorodov6-Dec-18 1:09 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan6-Dec-18 1:21
mveRichard MacCutchan6-Dec-18 1:21 
GeneralRe: Can't Insert data into Access Table from Python Pin
Peter R. Fletcher6-Dec-18 2:11
Peter R. Fletcher6-Dec-18 2:11 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan6-Dec-18 3:16
mveRichard MacCutchan6-Dec-18 3:16 
GeneralRe: Can't Insert data into Access Table from Python Pin
Peter R. Fletcher6-Dec-18 4:37
Peter R. Fletcher6-Dec-18 4:37 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan6-Dec-18 5:11
mveRichard MacCutchan6-Dec-18 5:11 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan8-Dec-18 4:46
mveRichard MacCutchan8-Dec-18 4:46 
GeneralRe: Can't Insert data into Access Table from Python Pin
Peter R. Fletcher8-Dec-18 5:04
Peter R. Fletcher8-Dec-18 5:04 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan8-Dec-18 5:58
mveRichard MacCutchan8-Dec-18 5:58 
GeneralRe: Can't Insert data into Access Table from Python Pin
Peter R. Fletcher8-Dec-18 7:36
Peter R. Fletcher8-Dec-18 7:36 
GeneralRe: Can't Insert data into Access Table from Python Pin
Mycroft Holmes8-Dec-18 11:52
professionalMycroft Holmes8-Dec-18 11:52 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan8-Dec-18 21:09
mveRichard MacCutchan8-Dec-18 21:09 
QuestionError reading data from SQL Server ? Pin
Member 24584673-Dec-18 22:25
Member 24584673-Dec-18 22:25 
AnswerRe: Error reading data from SQL Server ? Pin
ZurdoDev4-Dec-18 2:22
professionalZurdoDev4-Dec-18 2:22 
AnswerRe: Error reading data from SQL Server ? Pin
Eddy Vluggen4-Dec-18 2:55
professionalEddy Vluggen4-Dec-18 2:55 
GeneralRe: Error reading data from SQL Server ? Pin
Member 24584674-Dec-18 17:15
Member 24584674-Dec-18 17:15 
GeneralRe: Error reading data from SQL Server ? Pin
Eddy Vluggen5-Dec-18 1:44
professionalEddy Vluggen5-Dec-18 1:44 
GeneralRe: Error reading data from SQL Server ? Pin
Member 24584679-Dec-18 21:28
Member 24584679-Dec-18 21:28 
GeneralRe: Error reading data from SQL Server ? Pin
Eddy Vluggen9-Dec-18 23:27
professionalEddy Vluggen9-Dec-18 23:27 
SuggestionRe: Error reading data from SQL Server ? Pin
CHill6011-Dec-18 5:18
mveCHill6011-Dec-18 5:18 
QuestionAn error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown Pin
simpledeveloper30-Nov-18 13:06
simpledeveloper30-Nov-18 13:06 
Hi,

I am getting the following error when I am trying to run a SQL Query with larger Data, any help how can I run the select statement.
SELECT     
	CASE WHEN PTT.POSTransactionTypeCode = 'A' THEN 'A' 
		WHEN PTT.POSTransactionTypeCode = 'C' THEN 'C'
		WHEN PTT.POSTransactionTypeCode = 'R' THEN 'R'
		WHEN PTT.POSTransactionTypeCode = 'I' THEN 'C' 
	END AS TransactionType, 
	CASE WHEN PTT.POSTransactionTypeCode = 'A' THEN 'A'
		WHEN PTT.POSTransactionTypeCode = 'C' THEN 'A'
		WHEN PTT.POSTransactionTypeCode = 'R' THEN 'A'
		WHEN PTT.POSTransactionTypeCode = 'I' THEN 'I' 
	END AS ProviderStatus, 
-- right format. uncomment when the PIN numbers are fixed.
'00000' + C.ProviderNbr + SPACE(1) AS ContractNbr,
-- right format. uncomment when sending the provider numbers that were added wrongly.
--'000000' + C.ContractNbr AS ContractNbr,
	'01' AS Other, 
	'000000' AS PIN, 
	UPPER(LEFT(C.ProviderName, 28)) AS ContractName,
	'PROGRAM DIRECTOR' + SPACE(8) AS ContractAddressAttention,
	UPPER(LEFT(A.StreetAddress1, 24)) AS Address1, 
	UPPER(LEFT(A.StreetAddress2, 24)) AS Address2,
	UPPER(LEFT(A.City, 17)) AS City,
	UPPER(S.PK_Geographic_Location_Code) AS State,
	LEFT(A.Zip1, 9) AS ZipCd,
	SPACE(12) AS ErrorCode2,
	SPACE(8) AS Filler
FROM         
	POSPINTransaction AS E INNER JOIN
	Provider AS C ON E.FKProviderId = C.PKProviderId INNER JOIN
	ProviderDate AS PD ON dbo.Udf_GetPKProviderDate(C.PKProviderId) = PD.PKContractDate INNER JOIN
	ProviderAddress AS PA ON PA.FKProviderId=C.PKProviderId INNER JOIN
	[Address] AS A ON A.PKAddressId = PA.FKAddressId INNER JOIN
	--ParentTypeLKP AS PT ON A.FKParentType = PT.PKParentType AND PT.ParentTypeCd = 'usrContract' INNER JOIN
	[State] AS S ON A.FK_State = S.PKStateId INNER JOIN
	POSTransactionTypeLKP PTT ON E.FKPOSTransactionTypeId=PTT.PKPOSTransactionTypeId
WHERE     
	(PA.IsCurrentAddress = 1) AND (E.TransactionSentDate IS NULL) AND (E.TransactionReceivedDate IS NULL) AND (E.FKPOSTransactionTypeId IN (SELECT PKPOSTransactionTypeId FROM POSTransactionTypeLKP WHERE POSTransactionTypeCode IN ('A', 'C', 'R'))) OR
	(PA.IsCurrentAddress = 1) AND (E.TransactionSentDate IS NULL) AND (E.TransactionReceivedDate IS NULL) AND (E.FKPOSTransactionTypeId = (SELECT Top 1 PKPOSTransactionTypeId FROM POSTransactionTypeLKP WHERE POSTransactionTypeCode = 'I')) AND (PD.EffectiveDateTo IS NULL) OR
	(PA.IsCurrentAddress = 1) AND (E.TransactionSentDate IS NULL) AND (E.TransactionReceivedDate IS NULL) AND (PD.EffectiveDateTo <= GETDATE())
UNION
SELECT     
	CASE WHEN PTT.POSTransactionTypeCode = 'A' THEN 'A' 
		WHEN PTT.POSTransactionTypeCode = 'C' THEN 'C' 
		WHEN PTT.POSTransactionTypeCode = 'R' THEN 'R' 
		WHEN PTT.POSTransactionTypeCode= 'I' THEN 'C' 
	END AS TransactionType, 
	CASE WHEN PTT.POSTransactionTypeCode = 'A' THEN 'A' 
		WHEN PTT.POSTransactionTypeCode = 'C' THEN 'A' 
		WHEN PTT.POSTransactionTypeCode = 'R' THEN 'A' 
		WHEN PTT.POSTransactionTypeCode = 'I' THEN 'I' 
	END AS ProviderStatus, SP.NPINumber AS ContractNbr,
	'01' AS Other,
	'000000' AS PIN,
	UPPER(LEFT(SP.FirstName, 28)) AS ContractName,
	'PROGRAM DIRECTOR' + SPACE(8) AS ContractAddressAttention,
	UPPER(LEFT(ADDR.StreetAddress1, 24)) AS Address1, 
	UPPER(LEFT(ADDR.StreetAddress2, 24)) AS Address2,
	UPPER(LEFT(ADDR.City, 17)) AS City,
	UPPER(ST.PK_Geographic_Location_Code) AS State,
	LEFT(ADDR.Zip1, 9) AS ZipCd,
	SPACE(12) AS ErrorCode2,
	SPACE(8) AS Filler
FROM         
	POSPINTransaction AS EDS INNER JOIN
	NPIAssociation NA ON NA.FKParentId=EDS.FKProviderId AND NA.FKParentTypeLKPId = (SELECT Min(PKParentTypeLKPId) FROM ParentTypeLKP WHERE ParentCode='PRV') INNER JOIN 
	NPI AS SP ON SP.PKNPIId = NA.FKNPIId LEFT OUTER JOIN
	POSTransactionError AS EDSERR ON EDSERR.FKPOSPINTransactionId = EDS.PKPOSPINTransactionId LEFT OUTER JOIN
	POSTransactionErrorLKP AS EDSERRCD ON EDSERRCD.PKPOSTransactionErrorLKPId = EDSERR.FKPOSTransactionErrorLKPId LEFT OUTER JOIN
	NPIAddress AS NPIADDR ON NPIADDR.FKNPIId = SP.PKNPIId AND NPIADDR.IsCurrentAddress = 1 INNER JOIN
	[Address] AS ADDR ON ADDR.PKAddressId=NPIADDR.FKAddressId INNER JOIN
	[State] AS ST ON ADDR.FK_State = ST.PKStateId INNER JOIN
	County AS CO ON CO.PKCountyId = ADDR.FK_County INNER JOIN
	POSTransactionTypeLKP PTT ON EDS.FKPOSTransactionTypeId=PTT.PKPOSTransactionTypeId
WHERE     
	(EDS.TransactionSentDate IS NULL) AND (EDS.TransactionReceivedDate IS NULL) AND 
	(EDS.FKPOSTransactionTypeId IN (SELECT PKPOSTransactionTypeId FROM POSTransactionTypeLKP WHERE POSTransactionTypeCode IN ('A', 'C', 'R')) 
	OR	EDS.FKPOSTransactionTypeId = (SELECT Top 1 PKPOSTransactionTypeId FROM POSTransactionTypeLKP WHERE POSTransactionTypeCode = 'I'))

Let me know if I can refine the script or any other advice is also welcome please thanks in advance friends.
AnswerRe: An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown Pin
Richard MacCutchan30-Nov-18 22:29
mveRichard MacCutchan30-Nov-18 22:29 
AnswerRe: An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown Pin
ZurdoDev4-Dec-18 2:23
professionalZurdoDev4-Dec-18 2:23 
QuestionI am not able to Generate Scripts for a larger table Pin
simpledeveloper30-Nov-18 13:02
simpledeveloper30-Nov-18 13:02 
AnswerRe: I am not able to Generate Scripts for a larger table Pin
ZurdoDev4-Dec-18 2:24
professionalZurdoDev4-Dec-18 2:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.