VBA SQL Strings - Tutorial for Beginner

  Рет қаралды 57,254

codekabinett.com/en

codekabinett.com/en

Күн бұрын

Пікірлер: 47
@kamal265
@kamal265 2 жыл бұрын
God bless you dear sir, lots of respect from India 🙏🇮🇳
@rogermckee4249
@rogermckee4249 4 жыл бұрын
After days of watching other tutorials this gave me my eureka moment and solved my multiple apostrophe problems. Danke Sehr ,ein tolles Tutorial
@radiusbecka1799
@radiusbecka1799 3 жыл бұрын
Thank you this helped so much. All I wanted was the Syntax to pass a vba variable to a sql command and I finally found it.
@JANtheDane
@JANtheDane 6 жыл бұрын
Thank you so much. I have seen a lot of really excellent MS Access programming videos. However, this particular video is the most useful ever! I have encountered more confusion from strings and quotation marks than anything else in this programming language. Thank you for making this clear.
@ashishtrivedi8253
@ashishtrivedi8253 2 жыл бұрын
Great help in understanding how to put different values in SQL query in VBA which i was looking for from long time and this is completely cleared my confusion. Thx a ton.
@davegoodo3603
@davegoodo3603 7 жыл бұрын
I've been looking all over for a video like this. Excellent video. Cleared up a lot of confusion on this topic, thanks.
@Souhila-yi8qk
@Souhila-yi8qk 5 ай бұрын
Thank you for the interesting Video. It helped me how to put a String variable inside a query.
@LordBransty
@LordBransty 5 жыл бұрын
Superb video. Thank you very much. Wish there were more teachers like you. !!!
@royzra
@royzra Жыл бұрын
Excellent narration on basics . Thank you very much....
@arabicgrammereasytolearnqu6333
@arabicgrammereasytolearnqu6333 2 жыл бұрын
I like and say that u r the best programer Thanks
@sarojray2779
@sarojray2779 2 жыл бұрын
Love❤️ you my friend, it sorted my critical issues. Thank you so much genius...
@vikrantchouhan9908
@vikrantchouhan9908 4 жыл бұрын
Awesome! It resolved the issues that I was struggling with.
@petegarner1059
@petegarner1059 3 жыл бұрын
Really good explanations and code development. Thank you.
@雅楽川圭典
@雅楽川圭典 5 жыл бұрын
Thank you very much sir! This is extremely helpful for my interview next week!
@danter399
@danter399 4 жыл бұрын
Love this video, thanks you very much. Now I understand why my slq structure in vba didn't run haha. Kind regards
@santosozhang1985
@santosozhang1985 2 жыл бұрын
Excellent Teaching, very helpful. Thank You.
@nithiyashreeg7507
@nithiyashreeg7507 4 жыл бұрын
Excellent ..!Its extremely helpful
@caleblear3671
@caleblear3671 5 жыл бұрын
You do a great job in this tutorial. Thanks so much!
@kebincui
@kebincui 4 ай бұрын
excellent video. Thanks
@midhunraj6261
@midhunraj6261 6 жыл бұрын
Great tutorial and good explanation...
@charlesbuckle5345
@charlesbuckle5345 2 жыл бұрын
Excellent video, thank you.
@NoL1mit985
@NoL1mit985 6 жыл бұрын
Du hast mir den Arsch gerettet mit dem Video, saubere Arbeit. Ich bin fast durchgedreht und alt geworden, aber jetzt geht mein Programm und das alles wegen einem "'"
@adnanelaiwah3599
@adnanelaiwah3599 5 жыл бұрын
Very useful , simple Thank you
@SavedbyGraceCT
@SavedbyGraceCT 8 ай бұрын
Thank you so much!
@sharif7351
@sharif7351 2 жыл бұрын
Wonderful!
@XxLenasXx
@XxLenasXx 4 жыл бұрын
Awesome video....again.
@patrickwheeler7107
@patrickwheeler7107 3 жыл бұрын
Great tutorial
@arabicgrammereasytolearnqu6333
@arabicgrammereasytolearnqu6333 2 жыл бұрын
U r genius
@micron001
@micron001 3 жыл бұрын
Well done vid. I'd give it 99.5 out of 100. Would have been perfect if the problem of words with apostrophes was covered (e.g. O'Brien).
@oliveroshea5765
@oliveroshea5765 2 жыл бұрын
Just add an extra apostrophe/quote , so that it looks like O’’Brien. (That is 2 single quotes) SQL will then adjust it. This is certainly the case for SQL Server. Access might not even need it
@goodyearspokane
@goodyearspokane 4 жыл бұрын
Thanks for the video. What is your solution if you have a very long query? Currently I just have my long query as an Access query and use DoCmd.OpenQuery but I would much rather have less Access queries and have the SQL in VBA
@codekabinettcomen
@codekabinettcomen 4 жыл бұрын
Although I'm not entirely sure about the core issue, I love your question. There's no quick and simple answer. I'm thinking about doing a video on that topic...
@automationguide3498
@automationguide3498 7 жыл бұрын
Thank You !!
@raselbiswas4083
@raselbiswas4083 6 жыл бұрын
Hi There, I like your lecture a lot. But I have a question to you regarding ShowDataSheet function. Do you write this or it is a defined function in VBA? I use the the same data table and same query as well. But it says ShowDataSheet function is not defined. Can you please clarify us in this regard. It would be appreciated. Thanks in Advance.
@raselbiswas4083
@raselbiswas4083 6 жыл бұрын
Dear Sir, Thanks a lot. I get of it!
@codekabinettcomen
@codekabinettcomen 6 жыл бұрын
Thank you very much for your feedback! The ShowDataSheet function is a custom function. Watch my latest video, there it is explained in detail. -> kzbin.info/www/bejne/iZDdXoWdadtmrck
@raselbiswas4083
@raselbiswas4083 6 жыл бұрын
Dear Sir, I have a question regarding Runtime Error 3141: Sometimes my program does not work, it shows Runtime Error 3141. As for example, Dim sqlString As String sqlString = "SELECT target_table420.TraderID, target_table420.Side, Sum([target_table420].[EQuantity]*[target_table420].[EPrice]) AS AskAmount," & _ "FROM target_table420" & _ "GROUP BY target_table420.TraderID, target_table420.Side" & _ "HAVING (target_table420.Side=""Ask"");" DoCmd.RunSQL (sqlString)
@codekabinettcomen
@codekabinettcomen 6 жыл бұрын
Two issues are apparent with your code. 1.) there is a surplus comma before FROM, 2.) RunSQL is meant for DML (Action Queries), it will not work with Select-Queries.
@Joker1SH
@Joker1SH 4 жыл бұрын
Klasse - TOP
@willhan6808
@willhan6808 6 жыл бұрын
Can someone simply let me know which library is this ShowDataSheet Method located? I cannot call this function even with DAO, Access library activated.
@codekabinettcomen
@codekabinettcomen 6 жыл бұрын
The ShowDataSheet method is a custom method I wrote. Look at the info text of this video. There's a download link to the sample file containing that method.
@willhan6808
@willhan6808 6 жыл бұрын
Thanks that helps!
@ahmadharb4503
@ahmadharb4503 6 жыл бұрын
I was trying to make a vba in excel using sql commands to export data to access, your method worked, but for some cases where i had field name ending with a question mark for example, "explicit?" while debugging excel could read the variable that contains "explicit?" but did not print it in access. ... so in other words it worked for all normal text but not for text ending with a question mark, although access accepts a question mark at the end of a field name so what can I do here? thank you For j = 2 To RowTable MyString = Worksheets("Sheet1").Cells(j, 1) MyFeild = Worksheets("Sheet1").Cells(j, 2) MyFeildType = Worksheets("Sheet1").Cells(j, 3) If MyFeildType = "COUNTER" Or MyFeildType = "Text(128) " Or MyFeildType = "INTEGER" Then Else: Worksheets("Sheet1").Cells(j, 3) = "Text(128)" End If On Error Resume Next MyDatabase.Execute "CREATE Table " & MyString & " " _ & "(" & MyFeild & " " & MyFeildType & " CONSTRAINT MyFieldConstraint " _ & "PRIMARY KEY);" MyDatabase.Execute "ALTER TABLE " & MyString & " " _ & "ADD COLUMN " & MyFeild & " " & MyFeildType & ";" Next j
@codekabinettcomen
@codekabinettcomen 6 жыл бұрын
Ahmad, thank you for bringing this up. I should have mentioned and shown this in the video. If your column or table names include special characters or spaces, you should enclose the name in square brackets. E.g.: [explicit?] Here is your last statement adapted for this scenario: MyDatabase.Execute "ALTER TABLE [" & MyString & "] " _ & "ADD COLUMN [" & MyFeild & "] " & MyFeildType & ";" Nevertheless, I recommend NOT to use special characters in table or column names.
@ahmadharb4503
@ahmadharb4503 6 жыл бұрын
It worked! thank you a lot for this video and for your comment :)
Windows API in VBA - Strings (Part 1)
30:44
codekabinett.com/en
Рет қаралды 3,2 М.
Query Performance Tuning - Basic, Universal Rules
32:59
codekabinett.com/en
Рет қаралды 2,9 М.
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 14 МЛН
哈哈大家为了进去也是想尽办法!#火影忍者 #佐助 #家庭
00:33
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 66 МЛН
UNION Queries in SQL and Access
31:06
codekabinett.com/en
Рет қаралды 4,8 М.
How to use ADO and VBA to Read from a Database
10:31
Excel Macro Mastery
Рет қаралды 43 М.
SQL Tutorial for Beginners [Full Course]
3:10:19
Programming with Mosh
Рет қаралды 11 МЛН
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 79 М.
Windows API in VBA - First Steps
17:47
codekabinett.com/en
Рет қаралды 9 М.
How to use ADO and VBA to Read from Worksheets
12:15
Excel Macro Mastery
Рет қаралды 76 М.
Learn SQL In 60 Minutes
56:24
Web Dev Simplified
Рет қаралды 2,1 МЛН
Python in Excel vs. VBA - What You Should Learn in 2024!
10:05
David Langer
Рет қаралды 47 М.
Using the Soundex Algorithm in Microsoft Access
25:55
codekabinett.com/en
Рет қаралды 1,9 М.
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 14 МЛН