No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Create Procedure `SelectProduct` (IN prod VARCHAR(70)) BEGIN SET @sql = null; SELECT GROUP_CONCAT(DISTINCT CONCAT( 'max(case when Attribute = ''',Attribute,'" Then p.Attributevalue end) as `',Attribute,'`' ) INTO @sql FROM tblAttribute; SET @sql = CONCAT('Select pr.product, ',@sql,' from tblproduct tblproduct pr LEFT JOIN tblproductattribute p using(productid) left join tblattribute a using (attributeid) … |
|
Hi,i have this tblProductAttribute with ProductAttributeID|ProductID|AttributeID|AttributeValue| 1|1|Blue 2|2|medium (AttributeID 1 = Color,2= size) i want to get result from select query like this ProductName|Color|Size sampleproduct|Blue|Medium inshort i need to get row data to be the column name please help me.thanks :-) |
|
please do help me to use prepared statement to load the result in datagridview. Please give me some examples.thanks in dvance :D |