|
-
May 19th, 2026, 01:23 AM
#1
Thread Starter
PowerPoster
[RESOLVED] I'M using ado , dubt on like statement, is correct?
My sql:
Code:
VALORE = Trim(Me.TCERCA.Text)
SQL = "SELECT ABI_UNICREDIT.ABI, CAB_UNICREDIT.CAB, ABI_UNICREDIT.BANCA, CAB_UNICREDIT.SPORTELLO, CAB_UNICREDIT.INDIRIZZO, CAB_UNICREDIT.COMUNE, CAB_UNICREDIT.CAP, CAB_UNICREDIT.PR, CAB_UNICREDIT.PROVINCIA, ABI_UNICREDIT.ST, ABI_UNICREDIT.STATO, CAB_UNICREDIT.AGG" & _
" FROM CAB_UNICREDIT INNER JOIN ABI_UNICREDIT ON CAB_UNICREDIT.ABI = ABI_UNICREDIT.ABI WHERE CAB_UNICREDIT.BANCA=like *VALORE* AND ABI_UNICREDIT.ST='" & ST & "'"
Last edited by luca90; May 19th, 2026 at 01:37 AM.
-
May 19th, 2026, 01:37 AM
#2
Re: I'M using ado , dubt on like statement, is correct?
Check the help page:
https://learn.microsoft.com/en-us/of...oft-access-sql
Code:
Sub LikeX()
Dim dbs As Database, rst As Recordset
' Modify this line to include the path to Northwind
' on your computer.
Set dbs = OpenDatabase("Northwind.mdb")
' Return a list of employees whose names begin with
' the letters A through D.
Set rst = dbs.OpenRecordset("SELECT LastName," _
& " FirstName FROM Employees" _
& " WHERE LastName Like '[A-D]*';")
' Populate the Recordset.
rst.MoveLast
' Call EnumFields to print the contents of the
' Recordset. Pass the Recordset object and desired
' field width.
EnumFields rst, 15
dbs.Close
End Sub
-
May 19th, 2026, 03:30 AM
#3
Re: [RESOLVED] I'M using ado , dubt on like statement, is correct?
Code:
SELECT
ABI_UNICREDIT.ABI,
CAB_UNICREDIT.CAB,
ABI_UNICREDIT.BANCA,
CAB_UNICREDIT.SPORTELLO,
CAB_UNICREDIT.INDIRIZZO,
CAB_UNICREDIT.COMUNE,
CAB_UNICREDIT.CAP,
CAB_UNICREDIT.PR,
CAB_UNICREDIT.PROVINCIA,
ABI_UNICREDIT.ST,
ABI_UNICREDIT.STATO,
CAB_UNICREDIT.AGG
FROM CAB_UNICREDIT
INNER JOIN ABI_UNICREDIT ON CAB_UNICREDIT.ABI = ABI_UNICREDIT.ABI
WHERE CAB_UNICREDIT.BANCA like '*" & VALORE & "*' AND ABI_UNICREDIT.ST='" & ST & "'"
No further comments.....*facepalm*
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|