Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DYNAMIC SELECT & INSERT QUERY HELP Expand / Collapse
Author
Message
Posted Wednesday, February 2, 2011 6:42 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Saturday, June 29, 2013 2:14 AM
Points: 13, Visits: 46
HI ALL

PLEASE HELP ME

AM HAVING ONE TABLE LIKE

TABLE1
----------------------------------
CA CB CC CD CE CF CG ..... CN
----------------------------------


I THIS TABLE COLUMNS OR DYNAMIC TABLE..

I NEED TO INSERT THE VALUE IN THIS SPECFIC COLUMNS..

NOW AM INSERING THE VAULE MANUALY.

I NEED TO INSERT THE VALUE DYNAMICALLY

HERE I MENTIONED MY SP SAMPLE

INSERT INTO ##cname (

vchar_Business_Group_Description,
vchar_Sub_Biz_Group_Name,
inte_Emp_Id,
Empname,

CA,CB,CC,CD,CE,CF,CG


)
--
SELECT
vchar_Business_Group_Description,
vchar_Sub_Biz_Group_Name,
inte_Emp_Id,
Empname,
SUM(CA) AS TishmanAccounting,
SUM(CB) AS OtherClientsAccounting,
SUM(CC) AS CentroAccounting,

SUM(CD) AS UnderwritingOld,
SUM(CE) AS StructuredFinance,
SUM(CF) AS SterlingAmericanProperties,


FROM
(SELECT QUERY)


PLEASE HELP ME. ITS VERY URGENT WORK FOR ME.....

THANKS IN ADVANCE


Post #1057441
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse