Hi,

I'm pretty new to the whole SQL thing, and i'm basically self teaching using manuals, online help and the fact i pick things up quickly.

I'm having a bit of trouble picking data up from 2 tables and i think i'm just beign really thick.

This is what i'm trying...

select product_id, product_description, price_list_id from product, price_list_product
where product_description like '%CLO%'

But it's returning an error, any help?

Thanks,

Your missing your join from.

SELECT product.product_id, product.product_description, price.price_list_id from product join price on product.joiningfield = price.joiningfield where product.product_description like '%CLO%'

you need a way to reference the other table in your query. also you will want to research joins and decide what one will best work for you.

Google on "TSQL JOIN" YOU WILL GET ENOUGH TUTORIAL. KEEP IN MIND WHEN YOU JOIN TABLES YOU HAVE TO MAKE A RELATION AMONG TABLES. THIS IS THE COMMON PHENOMENA.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.