Click here to Skip to main content
15,889,874 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This SQL code is giving me an error:

select b.* from from exlltala as a,Ghasht as b where 

b.field3 like %(substring (codposti ,6,1)%))
Posted
Updated 2-Jan-11 23:53pm
v2
Comments
Slacker007 3-Jan-11 5:54am    
Please do not use text speak here in the forums. Thank you.

Remove multiple from from Query.

I can see a complete mess with your query.

Could you please tell us your scenarion IMO what you want from your Sql Tables.

I can see whole query have many errors.
 
Share this answer
 
Hi,

Try the following query...

select b.* from exlltala as a,Ghasht as b where
b.field3 like '%'+substring ('codposti',6,1)+'%'


Mistakes:

* Two times using 'from' keyword
* single quote missing in 'Char' value.
* Single quote missing using like operator.(Ex: like '%a%')


Cheers :)
 
Share this answer
 
Try this,
SQL
select b.* from exlltala as a,Ghasht as b where
b.field3 like '%'+substring (codposti,6,1)+'%'
 
Share this answer
 
Beside the double FROM you really should relate the two tables. See BOL join
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900