Thursday, March 22, 2012
Changing a db logical file name
--=_NextPart_000_0017_01C3D93B.E53A31C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Good day all,
Does anyone have any ideas on how I can change the Logical File Name = from 'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't = visible, I'm referring to the Logical name in the File name file on the = General Tab when viewing a database's properties in EM. We're running = SQL 7.
-- Any and all contributions are greatly appreciated ...
Regards TJ
--=_NextPart_000_0017_01C3D93B.E53A31C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Good day all,
Does anyone have any ideas on how I can change the Logical File Name = from 'IA_Dev_Data' to 'BDOpp_Data' for a database? If the graphic isn't = visible, I'm referring to the Logical name in the File name file on the General Tab = when viewing a database's properties in EM. We're running SQL 7.
-- Any and all contributions are = greatly appreciated ...Regards TJ
--=_NextPart_000_0017_01C3D93B.E53A31C0--Hi TJ,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From your information, you are running SQL 7 and want to change the logical
file name of a database, right?
Based on my experience, it is possible to change the physical file name by
using sp_detach_db and sp_attatch_db. But for logical file name, there is
no way to change that now.
In SQL Server 2000, it could be possible, which is described in the
following article:
http://support.microsoft.com/?id=814576
Hope this helps! If you still have questions on this issue, please feel
free to post new message here and I am ready to help!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Thanks so much Baisong. Have a good one!
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:YR7WMSb2DHA.2900@.cpmsftngxa07.phx.gbl...
> Hi TJ,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
> your issue.
> From your information, you are running SQL 7 and want to change the
logical
> file name of a database, right?
> Based on my experience, it is possible to change the physical file name by
> using sp_detach_db and sp_attatch_db. But for logical file name, there is
> no way to change that now.
> In SQL Server 2000, it could be possible, which is described in the
> following article:
> http://support.microsoft.com/?id=814576
> Hope this helps! If you still have questions on this issue, please feel
> free to post new message here and I am ready to help!
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>
>
Wednesday, March 7, 2012
Change the DATETIME format to DD/MM/YYYY by using CONVERT command.
DOB(datetime) .I want to retrieve just the MM/DD/YYYY part by using
the CONVERT command.And also I need to change the MM/DD/YYYY to DD/MM/
YYYY format by using the CONVERT command by SQL query.What is the
solution ?
Thank you.
Amritendu Paul
hi Paul,
amripaul@.gmail.com wrote:
> I have a database table named EMP and I have a column named
> DOB(datetime) .I want to retrieve just the MM/DD/YYYY part by using
> the CONVERT command.And also I need to change the MM/DD/YYYY to DD/MM/
> YYYY format by using the CONVERT command by SQL query.What is the
> solution ?
> Thank you.
> Amritendu Paul
please have a look at CONVERT function in BOL:
SET NOCOUNT ON;
SELECT CONVERT(varchar(10), GETDATE(), 103) AS [my formatted date];
--<--
my formatted date
11/06/2007
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
-- remove DMO to reply
Change the date format of a smalldatetime column.
Hello people.
Please, is there any way to change the date format of a smalldatetime column of a table in SQL Server Express?
What I mean is that the default date format for a column which type is smalldatetime is "MM/dd/yyyy" but I'm developing a localized application and the date format that I would like to use is "dd/MM/yyyy", so I would like to know is if there any way to change this.
I know that I could write some code in my application in order to do the conversion, but I would like to avoid this because I'm using the databinding property of the control and if I have to write a piece of code in order to do the conversion, I will loose this functionality.
I'm currently using WindowsXP SP2, SQL Server Express 2005, SQL Server Management Studio Express and VB.Net 2005 Express Edition. All applications including the OS are USA English version. The application that I'm writing is being localized to PT-BR (Brazilian Portuguese).
Any help and suggestions are very welcomed.
Thanks a lot for all your time and attention.
Rodrigo.
Hi,
SQL Server just stores a generic format , it is displayed on a user based setting. The formatting should be always done at the client side, just make sure that you have an appropiate machanism for formatting in place and that you application can handle the datetime type coming from SQL Server.
"Datetime values are stored internally by SQL Server as two four-byte integers, where the first four bytes store the number of days before or after the base date, January 1, 1900, and the other four bytes store the time of day represented as the number of milliseconds after midnight. Datetime stores date and time data from January 1, 1753, through December 31, 9999, to an accuracy of 1/300th of a second (equivalent to 3.33 milliseconds, or 0.00333 seconds), and values are rounded to increments of .000, .003, or .007 seconds." http://msdn2.microsoft.com/en-us/library/aa175784(SQL.80).aspx
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Tanks a lot for your answer Jens.
It solved my problem. I was making a mistake because I was handling that data that came from SQL Server as a string. Everything is working ok now that I'm using the data as a numeric value.
Cheers,
Rodrigo.
Change the date format in a report
1. I have a date displayed in a report 1040801 and would like it to display
8/1/04. How and where do I do this? I have tried the expression builder,
but it does not like what I am entering.
2. What is the expression to do this?
Thanks for your helpYou can format this in multiple ways. The following is a couple of
suggestions: 1) In the format property of the textbox you can enter the
format string like MM/dd/yy, or 2) using the expression builder you can do
something like this =Fields!YourDate.Value.ToShortDateString()
"Susan R" wrote:
> HI,
> 1. I have a date displayed in a report 1040801 and would like it to display
> 8/1/04. How and where do I do this? I have tried the expression builder,
> but it does not like what I am entering.
> 2. What is the expression to do this?
> Thanks for your help
Saturday, February 25, 2012
Change Text to a date
currently the text field is shown as this yyyymmdd
I need to display it in a date format as mm/dd/yyyy
I have tried just using the date format, but it is not recognized as a date.
Any suggestions how to write an expression to manipulate the field? I know
how to do it in Access & excel either of the folowing works:
=Mid([promise_dt],5,2) & "/" & Right([promise_dt],2) & "/" &
Left([promise_dt],4)
=(DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))
any suggestions would be great.
thanks
--
Jeanne Conde, MCPJeanne:
Try to use SQL standard command:
declare @.InputStringDate varchar(10)
set @.InputStringDate ='20060314'
select convert(datetime, @.InputStringDate)
select convert(varchar,convert(datetime, @.InputStringDate),101)
Good luck!!
Waikiki Frog
Jeanne Conde wrote:
>I have a text field that I need to display in a data format
>currently the text field is shown as this yyyymmdd
>I need to display it in a date format as mm/dd/yyyy
>I have tried just using the date format, but it is not recognized as a date.
>Any suggestions how to write an expression to manipulate the field? I know
>how to do it in Access & excel either of the folowing works:
>=Mid([promise_dt],5,2) & "/" & Right([promise_dt],2) & "/" &
>Left([promise_dt],4)
>=(DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))
>any suggestions would be great.
>thanks
>
--
Message posted via http://www.sqlmonster.com|||Thanks.
i will give it a try
--
Jeanne Conde, MCP
"WaikikiFrog via SQLMonster.com" wrote:
> Jeanne:
> Try to use SQL standard command:
> declare @.InputStringDate varchar(10)
> set @.InputStringDate ='20060314'
> select convert(datetime, @.InputStringDate)
> select convert(varchar,convert(datetime, @.InputStringDate),101)
> Good luck!!
> Waikiki Frog
>
> Jeanne Conde wrote:
> >I have a text field that I need to display in a data format
> >currently the text field is shown as this yyyymmdd
> >
> >I need to display it in a date format as mm/dd/yyyy
> >I have tried just using the date format, but it is not recognized as a date.
> >Any suggestions how to write an expression to manipulate the field? I know
> >how to do it in Access & excel either of the folowing works:
> >=Mid([promise_dt],5,2) & "/" & Right([promise_dt],2) & "/" &
> >Left([promise_dt],4)
> >=(DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))
> >
> >any suggestions would be great.
> >thanks
> >
> --
> Message posted via http://www.sqlmonster.com
>