Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
geissap
Starting Member
2 Posts |
Posted - 2012-06-14 : 15:38:45
|
| I'm wondering if there is an easy way to create a form that would output a SQL script into a text file. We often have to add users using a SQL script. We have the script written out and it just sits in text file as a template to use and then we essentially go in and add everything we need to add our user. I'm wondering if there's a form that I could create where we could just enter in our two ID's, last name and first name, check boxes for what facilities the users need access to and it would just automatically generate the script. Anyone have recommendations on what to use to do this? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
geissap
Starting Member
2 Posts |
Posted - 2012-06-14 : 16:28:19
|
| INSERT INTO VGN_PRVDR (PRVDR_SER_ID,PRVDR_ID,PRVDR_FAC_ID,PRVDR_LST_NM,PRVDR_FRST_NM,PRVDR_PRMY_SPCTLY,PRVDR_INSRT_TS)values (1234567,'12345','010','KENNEDY','JOHN',NULL,CURRENT_TIMESTAMP);That's the basic script. So essentially when we add a user they usually are added to multiple facilities (Which is represented by the "010" in the script above. So essentially I'd now have to copy and paste that line 5 or 6 times and just change the facility code. I'd ideally like a form where I could just enter in the SER ID, PRVDR ID, LAST NAME, FIRST NAME and then click the check boxes of what facilities that user needs to be added to and BAM! It'd just write all the lines of code to a text file. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|
|