Showing posts with label tia. Show all posts
Showing posts with label tia. Show all posts

Thursday, February 16, 2012

Adding data from Subreport with data from Main Report

How can I create an expression that Adds values from a main report to values
from a subreport?
TIA
DeanOn Jul 9, 4:07 pm, "Dean" <deanl...@.hotmail.com.nospam> wrote:
> How can I create an expression that Adds values from a main report to values
> from a subreport?
> TIA
> Dean
The main way to do this is to create a new report dataset that
utilizes the data from both the main report and the subreport. Another
way (though limited) of doing it is to create an expression similar to
the following that aggregates the subreport's dataset w/the main one:
=Sum(Fields!SomeFieldName.Value, "SubReportDataSetName") + Fields!
FieldName.Value
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Monday, February 13, 2012

adding column using t-sql

How can I add a column to the begining of the table using
t-sql? I know the syntax, but it adds it as the last
column on the table.
TIA,
VicHi,
No, you cant do that. Using TSQL statements (ALTER table) you cant insert a
column inbetween or first. It
always add the new column in the end.
Using Enterprise manager we can insert columns inbetween, but enterprise
manager does this in the below way
1. Export data out
2. Drop the table
3. Create the new table with new column added
4. Loads back the data.
This will not be a good mechanism if your data volume in your table is high.
Thanks
Hari
SQL Server MVP
"Vic" <vduran@.specpro-inc.com> wrote in message
news:080601c53f17$3e349bc0$a501280a@.phx.gbl...
> How can I add a column to the begining of the table using
> t-sql? I know the syntax, but it adds it as the last
> column on the table.
> TIA,
> Vic|||> This will not be a good mechanism if your data volume in your table is
high.
Also, you should not rely on column order. In a relation, column and row
order is not defined. You should always specify column names in your DML
statements.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com