Formatting an SQL Insert Statement - Nifty Access

Formatting an SQL Insert Statement - Nifty Access

Nifty Access - Microsoft

1 десятилетие назад

2,089 Просмотров

00:10 how to format the SQL Insert Statement correctly
00:25 this is a "poorly" formatted SQL Statement
01:18 you can save yourself a lot of headaches with SQL Statements by using this technique
01:38 don't put everything in one function separate things out in to separate entities
02:05 here I demonstrate the insert file function the little Known "fantastic" time saving feature of MS Access
02:50 here I insert my ready-made template function,it's for handling an insert into routine
03:00 set up the parameters, this isn't as difficult as it looks because you already got them in the SQL Statement you just have to format them nicely
04:40 it's not a good idea to use reserved words for the names of any of your controls. Here "Date" is a reserved word and I point out it shouldn't be used
05:55 I entered the first 7, but I needed some more and with this layout it's just a simple case of copying the set and pasting it back in again. In other words it's a simple repeatable process with no fiddling about...
07:55 now here comes the very useful bit, instead of faffing about trying to format the "VALUES" part of the insert into SQL Statement, to take into account whether the past through Value is a Date, text, integer, you don't do it in the values statement you do it separately! Again this keeps everything simple, everything is a repeating pattern and divided.
08:37 Chr(35) is The "Hash" --- #
08:44 Chr(34) is The "Double Quote" --- "
08:50 look at the SQL Statement, identify components that are "Text" Variables, and then format them correctly for text entries suitable for the SQL Statement
09:40 and use the same process on variables that are likely to be dates.
10:14 what about long? integer? -- the number formats? Well they are the "Defaults" so they don't need any delimiters
10:50 I often complained about "MS Access" giving me help, here is an instance where changing one of the values changes the rest automatically, which was useful. Thank you Microsoft!

Date: ---------------- Views:
2015_01_15 ------ 184
2015_01_26 ------ 199
2015_09_28 ------ 807
2015_12_03 ------ 994
2017_10_03 ---- 1834
2019_09_07 ---- 1901

More Info about this Video See "Nifty Access" HERE:-
https://www.niftyaccess.com/insert-into-sql-statement/

Microsoft "Nifty Access" website HERE:-
http://www.niftyaccess.com/

Join my MS Access Hints And Tips on Facebook:-
https://www.facebook.com/groups/MS.Access.Hints.And.Tips

Get the Latest MS Access YouTube's HERE:-
https://www.youtube.com/user/UncleGizmo?sub_confirmation=1

Get Free Stuff and Get Nifty Access News!
http://www.niftyaccess.com/newsletter-request-1/
Ссылки и html тэги не поддерживаются


Комментарии: