[Date Prev] [Date Next] [Prev in Thread] [Next in Thread] [Date Index] [Thread Index]

Re: Data Import Processing.



Fred,
 I got a chance to try this.
However this is no built in function NZ or Nz SQL Error 552.
As soon as I get my SQL Manager Studio client back I can look into this further. 

Thank you,
--- 
John J. Reiser 
Remedy Developer/Administrator 
Senior Software Development Analyst 
Lockheed Martin - MS2 
The star that burns twice as bright burns half as long. 
Pay close attention and be illuminated by its brilliance. - paraphrased by me 


-----Original Message-----
From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Grooms, Frederick W
Sent: Tuesday, September 11, 2012 5:21 PM
To: arslist@ARSLIST.ORG
Subject: EXTERNAL: Re: Data Import Processing.

Sounds like a good use for an SQL set fields to me

Use the Set fields to fill in the missing data fields into your Pre-Import form   
   SELECT  Nz('$Field1$', Field1), Nz('$Field2$', Field2), Nz('$Field3$', Field3) from SQL_FORM_VIEW WHERE xxxxx=yyyyy

Nz is the MS-SQL function for Non-Null so if the new data has a value it will be kept otherwise the original value will be pulled in.

Then just a regular single push will work as all fields have data.

Fred

-----Original Message-----
From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Reiser, John J
Sent: Tuesday, September 11, 2012 4:05 PM
To: arslist@ARSLIST.ORG
Subject: Data Import Processing.

Hello Listers,
 ARS 7.6.03 Build 001
MS SQL 2005
Windows Server 2003 VM

I'm working with a group that needs constant data imports to an asset form in ARSystem.
To handle this we built a "Pre-Import" form.
Everything gets imported to the Pre-Import form which has filters firing on merge to see if the asset exists in the ARSystem form. If it exists certain data is copied to the Pre-import form and used to determine if the asset record should be updated. If it doesn't exist we just push the Pre-import record through as a new asset.

Now others want to use this process and they have many more fields to import but not all of the fields will have data every time.

My dilemma is this, when a record is loaded to the Pre-import form AND it exists in the asset form, blank fields in the import form clear out the asset field when merged. 
The only way I can think to overcome this is to have a filter per field to check for $NULL$ and then don't do a filter PUSH on merge for that field.
I'm working on multiple projects at once right now and I just can't wrap my head around this one.
I don't want to create 40+ filters for this task.

Thank you,
---
John J. Reiser
Remedy Developer/Administrator
Senior Software Development Analyst
Lockheed Martin - MS2
The star that burns twice as bright burns half as long. 
Pay close attention and be illuminated by its brilliance. - paraphrased by me 

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"