|
|
WHERE & AS
Hi,
Is it possible to create a field name and then use it in a where
statement?
SELECT
CONCAT(`Product Index`.`Product_Headings`,' ',COALESCE(`Product
Index`.`Sub_Product_Headings`,''))
AS `product_name`
FROM `product index`
WHERE product_name LIKE '%Alar%'
This statement errors with Unknown column 'product_name' in 'where
clause'
Not sure if it can be done.
Thanks
A
|
|
0
|
|
|
|
Reply
|
spidercc21 (71)
|
4/5/2007 12:04:52 PM |
|
"UKuser" <spidercc21@yahoo.co.uk> wrote in message
news:1175774692.363948.261850@y80g2000hsf.googlegroups.com...
> Hi,
>
> Is it possible to create a field name and then use it in a where
> statement?
>
> SELECT
> CONCAT(`Product Index`.`Product_Headings`,' ',COALESCE(`Product
> Index`.`Sub_Product_Headings`,''))
> AS `product_name`
> FROM `product index`
> WHERE product_name LIKE '%Alar%'
>
> This statement errors with Unknown column 'product_name' in 'where
> clause'
>
> Not sure if it can be done.
>
> Thanks
>
> A
>
Yup (or so I am led to believe)
SELECT
CONCAT(`Product Index`.`Product_Headings`,'
',COALESCE(`ProductIndex`.`Sub_Product_Headings`,''))
AS `product_name`
FROM `product index`
HAVING product_name LIKE '%Alar%'
Hope it works...
|
|
0
|
|
|
|
Reply
|
Sean
|
4/5/2007 12:56:22 PM
|
|
On 5 Apr, 13:56, "Sean" <sean.anderson@[nospam]oakleafgroup.biz>
wrote:
> "UKuser" <spiderc...@yahoo.co.uk> wrote in message
>
> news:1175774692.363948.261850@y80g2000hsf.googlegroups.com...
>
>
>
> > Hi,
>
> > Is it possible to create a field name and then use it in a where
> > statement?
>
> > SELECT
> > CONCAT(`Product Index`.`Product_Headings`,' ',COALESCE(`Product
> > Index`.`Sub_Product_Headings`,''))
> > AS `product_name`
> > FROM `product index`
> > WHERE product_name LIKE '%Alar%'
>
> > This statement errors with Unknown column 'product_name' in 'where
> > clause'
>
> > Not sure if it can be done.
>
> > Thanks
>
> > A
>
> Yup (or so I am led to believe)
>
> SELECT
> CONCAT(`Product Index`.`Product_Headings`,'
> ',COALESCE(`ProductIndex`.`Sub_Product_Headings`,''))
> AS `product_name`
> FROM `product index`
> HAVING product_name LIKE '%Alar%'
>
> Hope it works...
Superb - thanks indeed!
A
|
|
0
|
|
|
|
Reply
|
UKuser
|
4/5/2007 1:08:46 PM
|
|
|
2 Replies
140 Views
(page loaded in 0.041 seconds)
Similiar Articles: Combine two figures, whereas one figure contains sublots - comp ...Hi, I'd like to combine two figures to one figure as the following: I have two figures, one "normal" figure 1 and figure 2 containing several su... difference between sun cluster "/dev/did" and "/dev/global ...I have a sun cluster where I am seeing that "/dev/did" is populated where as "/dev/global" is not. Is this normal (or) abnormal? Also should oracle RAC use "/dev/did ... samples per symbol Vs sampling rate - Can they be used ...> > I think that samples per symbol is used in systems where the signal is > processed at baseband whereas, sampling rate is used for systems where > processing is done at ... ntpq -p show refid as .INIT. even my NTP Servers are synchronized ...hi, We are configured NTP in Multiple servers and all the servers are getting snchronized properly.We are having primary and Secondary NTP servers, where as primary ... raidctl with s10u8 fails to create a valid VTOC and disk label ...Where as on the s10u8 format it left them zero'd out. Though I suppose if the raidctl command "yacked" up the RAID, then format would fail too. document.body.style.fontsize is not working - comp.lang.javascript ...Whereas, > <a href="#" onclick="document.body.style.fontSize='50%';return false;">link</a> this works fine. how are you calling onclick? Getting image coordinates on mouse cursor position - comp.soft-sys ...> > Go in to the Matlab interactive documentation and search for CurrentPoint Thanx 4 ur help Sir but current point only works when mouse is clicked whereas i want its ... Dimension text display in sketches - comp.cad.solidworks ...Can I change the size dim. text is displayed when editing sketches in a part? In 2006, text is too hard to read, whereas in 2005 I could read it (sam... Porter algorithm and stemming - comp.lang.rubyFor instance, trying to stem pétrolifère => petrolifer whereas I'm expecting petrol or pétrol Has anyone encountered the issue and/or know a good working stemming ... Linear Regression without a constant term - comp.soft-sys.matlab ...... that regstats automatically appends a column of 1s to the X matrix (corresponding to the 0th regression coefficient being the intercept in the usual formulation), whereas ... Whereas | Define Whereas at Dictionary.comconjunction 1. while on the contrary: One arrived promptly, whereas the others hung back. 2. it being the case that, or considering that (used especially in formal ... Whereas - Definition and More from the Free Merriam-Webster DictionaryDefinition of WHEREAS. 1. a: while on the contrary b: although. 2: in view of the fact that : since —used especially to introduce a preamble . See whereas defined ... 7/27/2012 8:15:56 AM
|
|
|
|
|
|
|
|
|