Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Another IntelliSense script
Eric Selje
¿ªÔÆÌåÓýHere's another IntelliSense script that I hope saves you some time.? I've written about 2 dozen SQL-Insert statements in the last few days before this idea finally hit me.When you type "sqlins" this script will create a properly formatted INSERT INTO [tablename] (fieldnames*) VALUES (xFieldNames*) from the currently selected alias.? To implement this, go to your IntelliSense manager, go to the Custom tab, and type "fieldlist" into the Replace field (not the quotes).? Select [script] from the drop down menu, and then click on the Script button and paste this in: LPARAMETER oFoxCode LOCAL nFields, X, cReturn, cInto, cValues cInto = "" cValues = "" * Create SQL Insert command from all fields nFields = AFIELDS(aFieldNames) FOR X = 1 TO nFields ??? cInto = cInto +? IIF(EMPTY(cInto), "", ", ") + LOWER(aFieldNames[X,1]) ??? cValues = cValues + IIF(EMPTY(cValues), "", ", ") + LOWER(aFieldNames[X,2]) + PROPER(aFieldNames[X,1]) NEXT cReturn = [INSERT INTO ] + PROPER(alias()) + " ("+cInto+") ;"+CHR(13)+CHR(9)+"VALUES (~" + cValues + ")" oFoxCode.valueType = 'V' RETURN cReturn Then go back to the Intellisense manager, type sqlins into the Replace field, change the type back to [command], and click Add.? Then click Edit, and put {fieldlist} into the cmd field.? Save it, go out of IntelliSense manager, select a table, and try typing sqlins into either the command window or an editing window. Enjoy, Eric |
HawkRidge
¿ªÔÆÌåÓýPerhaps somewhat off-topic, but I just ordered SUSE 9.1
- this includes the new 2.6 kernel.? The media is not finished yet, but
should ship within a month or so.? I'll make the CD's available as soon as
I get them...
?
Walk In Beauty, Cliff Smith ? |
to navigate to use esc to dismiss