Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Copper Elite Contributor
Posts: 41
Registered: ‎03-09-2009
Accepted Solution

Proper SQL Command - Help Appreciated

Hey Everyone,

 

So once again proving my limitations in the SQL universe I have fallen and can't bet back up.  I would like to accomplish what I know are 2 easy to issue commands, but darn if I don't know how.  (That SQL course is looking better and better all the time...)  Anyway, I digress.

 

Our Business Partner created (I believe) a table called "Account Extension".  Under that table, there is a sub table called "Userinfo".   (Please see attached image for more "clarity").

 

What I want to do is -

 

1) Count how many records exist for UserID=U6UJ9A000018, and once I know and confirm this number,

2) Replace all of the U6UJ9A000018 with UserID=U6UJ9A00002M, and

3) Ensure that the change get's replicated out to the field.

 

I know what I don't know, and this is one of them.  In an older dBase time, not an issue.  But I'm showing my age here...

 

Thanks for any assistance.

 

Regards,

 

Joe

Bronze Super Contributor
Posts: 153
Registered: ‎04-08-2009

Re: Proper SQL Command - Help Appreciated

SELECT COUNT (*) FROM ACCOUNTEXTENSION

 

UPDATE ACCOUNTEXTENSION SET USERID = 'U6UJ9A00002M' WHERE USERID = 'U6UJ9A000018'

 

Run the update statement in the ExecuteSQL function in the Administrator application set it to send the command to all remotes.

Copper Elite Contributor
Posts: 41
Registered: ‎03-09-2009

Re: Proper SQL Command - Help Appreciated

Hi Dan,

 

Thanks for the assist!!  It helped out quite a bit.

 

Have a great week.

 

Joe