Run SQL queries in MS Excel

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น • 7

  • @enricomendiola9952
    @enricomendiola9952 4 หลายเดือนก่อน

    Great video. Can you please also show how to use join in the native query?

  • @googleplususer3009
    @googleplususer3009 6 หลายเดือนก่อน

    Nice video - except that there is no "Close and load to..." option (greyed out), and before that there no "View native query" in the Navigation pull down ....
    Is there now now way of writing queries in SQL in MS Excel ?????
    I can do complex things in SQL ... with the new Power Query I can't even figure out how to get a HAVING clause, let alone make a query which lists all records from one excel table with a duplicate key value (in column A). I can do that in SQL though ..... if SQL was available

  • @gagansingh3481
    @gagansingh3481 11 หลายเดือนก่อน

    Please share the vba code

    • @RealOfficeWiz
      @RealOfficeWiz  11 หลายเดือนก่อน

      Hi Gagan , Use the below code and remember to change your query table name in it .
      Private Sub Worksheet_Change(ByVal Target As Range)

      Dim tbl As ListObject
      Set tbl = Me.ListObjects("Your Query Tabel Name Here")
      If Not Intersect(Target, tbl.Range) Is Nothing Then
      ActiveWorkbook.RefreshAll
      End If
      End Sub

    • @gagansingh3481
      @gagansingh3481 11 หลายเดือนก่อน

      ​@@RealOfficeWiz- thank you so much

    • @gagansingh3481
      @gagansingh3481 11 หลายเดือนก่อน

      @@RealOfficeWiz - which query table i have to mention or I have apply vba code to the entire worksheet or i have to select the query box table ... my table from sql server is tblemployee

    • @RealOfficeWiz
      @RealOfficeWiz  11 หลายเดือนก่อน

      You need to apply vba only on the sheet where your second table is,in which you write sql queries. Same table name you need to mention in the vba code. :)