Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Friday, March 23, 2012

How To Change Just Year from a column(DueDate)

Hi
I am getting problem in changing just year from a column name duedate
in order to do m getting all months and day are also changing
help me out

Quote:

Originally Posted by lokaish

Hi
I am getting problem in changing just year from a column name duedate
in order to do m getting all months and day are also changing
help me out


Hey try this...

update tablename set duedate=dateadd(year,2,getdate())

Monday, March 19, 2012

how to change a report's(.rdl) Model

Hi!
I've created a report with Report Builder using a Model. I want to keep the same report, but I have to use another model (this model is almost the same as previous one, except that it has some extra tables).
I tried to change my report's model from Report Manager (Report_Name -> Properties -> Data Sources), but it didn't work.

Any suggestions?

Best regards.

One way I could change it was to open the report in Designer. On the data tab you can change the report model here. If your report was built in designer then you are all set. The problem is when your report was done in builder. Then there is no going back.

If any suggestion on a better way to do while still keeping the report as a report builder version I would love to hear it.

Thanks,

Rahul

|||

You can download the RDL file for a report builder report by looking at the properties for that report in Report Manager and clicking the Edit link. Then you can manually edit the RDL and change out the GUID for the old report model to be the GUID for the new report model. (Create a report with the new report model and then look at the RDL to see the GUID of the new report model.) Then you can click the Update link on the report properties and upload the modified RDL.

The only thing to be aware of is that if you're using a relational report model, the IDs for entities and fields are GUIDs. So if you built the new report model from scratch, the GUIDs for common entities and fields may be different.

|||

That worked great. I guess we still need to keep with our Visual Notepad stills.

Thanks,

Rahul

Wednesday, March 7, 2012

How to calculate the index size ?

Hi:
I need to calculate the total size of all indexes, is the index_size
reported by sp_spaceused 'tablename' is what i need ?
Please help
Thanks
JCVoonThe following is a link to useful sps in what you are looking to do.
Specifically look at:
sp_columns_rowset
sp_MShelpindex
sp_MStablespace
sp_MSindexspace
In SQL Books there is an article called: Estimating the Size of a Table ,
which will give you some ideas
--
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"jcvoon" <jcvoon@.maximas.com.my> wrote in message
news:1147078009.708121.91560@.i40g2000cwc.googlegroups.com...
> Hi:
> I need to calculate the total size of all indexes, is the index_size
> reported by sp_spaceused 'tablename' is what i need ?
> Please help
> Thanks
> JCVoon
>|||Jack Vamvas :
Thanks.
sp_MSindexspace is what i need, in fact the index_size reported by
sp_spaceused 'tablename' is sum of the Size reported by
sp_MSindexspace 'tablename' .
Regards
JCVoon

Sunday, February 19, 2012

how to build a Organogram report

hi

i want to develop a report to show organogram, anyone can help me....

thanks,

Imran.

Check out www.dundas.com - there are some org chart controls there.

cheers,

Andrew

How to browse for folder on SQL Server's machine?

Hi!
I know there is xp_dirtree, xp_subdirs, xp_fixeddrives procedures which
allows me to write a folder select dialog. But i have seen such dialog
somewhere in one of installers. Unfortunately I dont remember in what
installer.
I dont want to reinvent a wheel. So my question is: may be there is method
somewhere in SQL Server or in SQL-DMO or in DTS which implements a folder
selection dialog based on these stored procedures?T-SQL, DMO and DTS do not present the user with GUI objects. They provide
information, and your application must present that information is a dailog.
"Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
message news:op.suvw7dy0n8ihmu@.iw2k.helpmicro.local...
> Hi!
> I know there is xp_dirtree, xp_subdirs, xp_fixeddrives procedures which
> allows me to write a folder select dialog. But i have seen such dialog
> somewhere in one of installers. Unfortunately I dont remember in what
> installer.
> I dont want to reinvent a wheel. So my question is: may be there is method
> somewhere in SQL Server or in SQL-DMO or in DTS which implements a folder
> selection dialog based on these stored procedures?|||Ok, thank you for information. I must ask my question another way: Do you
know any library implementing such a dialog?

> T-SQL, DMO and DTS do not present the user with GUI objects. They provide
> information, and your application must present that information is a
> dailog.
> "Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
> message news:op.suvw7dy0n8ihmu@.iw2k.helpmicro.local...
>|||You have several options depending on what application development tool you
are using. This perhaps more a C# or Visual Basic question than SQL Server.
There is the Win32 API call SHBrowseForFolder
http://support.microsoft.com/defaul...kb;en-us;179497
How to write a managed C# wrapper for the API dialog call:
http://support.microsoft.com/defaul...kb;en-us;306285
Here is a Visual Basic sample:
http://www.vbexplorer.com/VBExplore...file_dialog.asp
I also think there is a method of the File System Object called
GetFolderName
http://msdn.microsoft.com/library/d...objectmodel.asp
"Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
message news:op.suv0e6u4n8ihmu@.iw2k.helpmicro.local...
> Ok, thank you for information. I must ask my question another way: Do you
> know any library implementing such a dialog?
>
>|||As I mentioned in my original posting I can implement such dialog using
xp_dirtree, xp_subdirs, xp_fixeddrives procedures. But SQL Server's
Enterprise Manager already has such dialog. For example if you open
"Attach Database" dialog and then press browse [...] button Enterprise
Manager will show you "Browse For Existing File" dialog. And as you can
see all the path information in that dialog is local to SQL Server's
machine. This is what SHBrowseForFolder cannot do for you because
SHBrowseForFolder always shows paths relative to local machine.
My question is: Is there any way to reuse that Enterprise Manager's
"Browse For Existing File" dialog? Or I am obliged to reinvent it?
On Tue, 02 Aug 2005 19:30:46 +0300, JT <someone@.microsoft.com> wrote:

> You have several options depending on what application development tool
> you
> are using. This perhaps more a C# or Visual Basic question than SQL
> Server.
> There is the Win32 API call SHBrowseForFolder
> http://support.microsoft.com/defaul...kb;en-us;179497
> How to write a managed C# wrapper for the API dialog call:
> http://support.microsoft.com/defaul...kb;en-us;306285
> Here is a Visual Basic sample:
> http://www.vbexplorer.com/VBExplore...file_dialog.asp
> I also think there is a method of the File System Object called
> GetFolderName
> http://msdn.microsoft.com/library/d...objectmodel.asp
>
> "Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
> message news:op.suv0e6u4n8ihmu@.iw2k.helpmicro.local...
>