• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

problem with SQL sintax

Hi,

I have the following SQL:

SELECT bbbpintura.pint, bbbpintura.serial, bbbpintura.parte, bbbpintura.lijador, bbbpintura.fecha
FROM CEDRO.dbo.bbbpintura bbbpintura
WHERE (bbbpintura.serial Like '%'?'%')

I'm triying to obtain in excel the list of rows from bbbpintura table wich serial field starts by the value in cell B1.

When I'm doing the parameter in the microsoft query I have the error: incorrect sintax near '@P1' and the query does not works.

could you help me to fix this please.?

Thank you for your time,
Roberto.
0
Pabilio
Asked:
Pabilio
  • 2
1 Solution
 
Lee SavidgeCommented:
I suspect your where clause is wrong.

Try this:

WHERE (bbbpintura.serial Like '%' + ? + '%')
0
 
tring_tringCommented:
Try
WHERE ((bbbpintura.serial Like  '%\''?\''%')
0
 
PabilioAuthor Commented:
thank you very much...
this solved the problem
regards,
roberto.
0
 
Lee SavidgeCommented:
No problem :)
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now