Showing posts with label date. Show all posts
Showing posts with label date. Show all posts

Tuesday, March 27, 2012

Changing Column size/type with Derived Column

I have a number of date columns that are parsed as DT_WSTR (6) and I have written a Derived Column converting them into DT_DATE via this (found on the forums) type expression:
(DT_DATE)(SUBSTRING(Date,6,2) + "-" + SUBSTRING(Date,8,2) + "-" + SUBSTRING(Date,1,5))
But I really want to replace the current column, not create a new one. If I use "replace" the data is forced to be a DT_WSTR (6), and I get a truncation error at run-time.
Simeon
Simeon,
You're stuck with it I'm afraid. You can't change the type of a column in the derived column component. Its not a ahrdship to add it as a new column though, jsut don't use the existing one that's all!

-Jamie|||Could you change the source to return a larger column. This would solve your problem.|||Cheers Jamie,
That's what I thought, I was just hoping there was a way to keep it "clean".
On a related thought, I am finding that each time I alter any component near the top of a data flow, I end up needing to delete and re-add most the down stream components due to fields mismatching. Is this why people appear to be building there packages via code?
Simeon.
|||This does depend on the component, some just need double clicking on and the meta data should correct it self, others require you to select the mapped columns. The latter is generally when you change the names of components and inputs.

You shouldn't have to delete components though, I find that surprising.|||

SimonSa wrote:

Could you change the source to return a larger column. This would solve your problem.


That might work, but the derived column sets the type to DT_WSTR, so I'm not sure that putting a entry that is cast to DT_DATE would not upset it also.
|||

I was finding this while I was developing my source component. I had it wired to Raw Files (then later Trash Destinations) with Data Viewers to inspect the data. Running the package (after reloading BI) would give errors, so I found it easier to delete the source and it four outputs, and re-wire.
But going forward I'll try double clicking, and checking the mappings.

Simeon
|||Do you need to cast it to a date? If you do then you will have to have a new column, and the derived column is the best solution|||I would suggest your source component is recreating outputs when it shouldn't. Thus the metadata the downstream components are based on is no longer valid.|||

SimonSa wrote:

I would suggest your source component is recreating outputs when it shouldn't. Thus the metadata the downstream components are based on is no longer valid.


It was. I was slowly adding support for different data types, then adding support for foreign keys. The source component is like a flat file parser, but it handles files that have different rows (with different columns) that have relationships based on order. So really n tables with the foreign keys implied by what a row follows.
I was (for simplicity) developing support incrementally, with the relations setup by a function. The next step is to put that information into a configuration file.
|||A column is identified by it's lineage Id. Deleteing a column and adding it back, even with the same name and same data type properties will cause it to change lineage Id. This means downstream components that have referenced that column (by lineage Id) are now invalid. Opening the UI should bring up the mapping dialog, and one of the options is Map by Name. This normally solves most issues.

A well behaved component will not recreate the output buffer columns each time, but rather detect invalid columns, and remove, add new columns if required, and fix any columns in can detect on both sides, or leave alone matching columns. This can be a pain, as it is lots more code, but try the samples such as the ADO Source for some good template code.

Thursday, March 22, 2012

Changing a Text To a Date

I have a field in a table that contains date data in the following format:
20040301
what is the best, low impact method for converting this to a useable date
field?
Sorry, wrong group...
"Atley" <atley_1@.homtmail.com> wrote in message
news:euhlpsnEEHA.3788@.TK2MSFTNGP10.phx.gbl...
> I have a field in a table that contains date data in the following
format:
> 20040301
> what is the best, low impact method for converting this to a useable date
> field?
>

Tuesday, March 20, 2012

Changind date formats

Hi.

I had a VB program that was using an SQL Server 6.5 DB. Date format
was dd/mm/yyyy. Now the DB was changed to an SQL Server 7 and the date
format is yyyy/mm/dd.

How can I do for changing date formats in the new DB to the old
format?

Im searching for a database level solution, not server level.

thanksOKI (albertooc2003@.hotmail.com) writes:
> I had a VB program that was using an SQL Server 6.5 DB. Date format
> was dd/mm/yyyy. Now the DB was changed to an SQL Server 7 and the date
> format is yyyy/mm/dd.
> How can I do for changing date formats in the new DB to the old
> format?
> Im searching for a database level solution, not server level.

There are not really any date formats in databases in SQL Server. Dates
are stored as binary values, and ideally you program should communicate
with SQL Server using these binary values, and all conversions be
carried out the client, respecting the users regional settings.

If there is a need to control format in SQL Server code, you can use
the convert function, look it up in Books Online under Cast and Convert
for the full details. For instance, if you say:

SELECT convert(char(8), datecol, 112)

You get a datetime value on the form YYYYMMDD. If you say:

SELECT convert(datetime, @.stringval, 121)

@.stringval is interpreted according to format 121, which if memory
serves is YYYY-MM-DD HH:MM:SS.mmm.

If you just say:

SELECT @.dateval = @.stringval

there is an implicit conversion, which is carried out according to the
current datetime and language settings for the connection. There are
only one format i SQL7 that is always interpreted in the same way and
that is YYYYMMDD.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

changes to sp's

If I create a new sp in EM I have the date of creation; however, if I modify
it, it retains the original date. Is there any way of finding out the most
recent modification date of an sp inside sql server 2000?
Thanks for any help.
Bernie Yaeger> Is there any way of finding out the most recent modification date of an sp
> inside sql server 2000?
No.
You should be using a source control softwware for that.
Roji. P. Thomas
Net Asset Management
http://toponewithties.blogspot.com
"Bernie Yaeger" <berniey@.optonline.net> wrote in message
news:u05XzeFrFHA.2996@.tk2msftngp13.phx.gbl...
> If I create a new sp in EM I have the date of creation; however, if I
> modify it, it retains the original date. Is there any way of finding out
> the most recent modification date of an sp inside sql server 2000?
> Thanks for any help.
> Bernie Yaeger
>|||you can explore the sql server transaction logs
how ever its not an easy thing to do
you can however use the lumigent log explorer
or apex sql log
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"Bernie Yaeger" wrote:

> If I create a new sp in EM I have the date of creation; however, if I modi
fy
> it, it retains the original date. Is there any way of finding out the mos
t
> recent modification date of an sp inside sql server 2000?
> Thanks for any help.
> Bernie Yaeger
>
>|||If you are deciplined about the use of comments in the SP header, then that
is easy to tell what has been done. If you checking your scripts into Visual
Source Safe, then you can generate scripts from the current database to a
local folder and do a fiel comparison against what is in the VSS project.
Also, you can use a file comparison tool like like WinMerge to perform the
file comparisons against folders that contain different versions of scripts.
You can configure to list only scripts and individual lines that are
different.
http://groups.google.com/group/micr...f9cfe0c46abfa76
"Bernie Yaeger" <berniey@.optonline.net> wrote in message
news:u05XzeFrFHA.2996@.tk2msftngp13.phx.gbl...
> If I create a new sp in EM I have the date of creation; however, if I
> modify it, it retains the original date. Is there any way of finding out
> the most recent modification date of an sp inside sql server 2000?
> Thanks for any help.
> Bernie Yaeger
>

Monday, March 19, 2012

Changed fields

In our applications we have a table named ChgMstr (Change
Log) that logs changes made to each record. It includes
the Field Name, Date & Time, the user making the change,
and the Before and After values of the field.
I am trying to setup an Update trigger that will loop
through the Deleted and Inserted fields, find which fields
have changed, and then either INSERT directly into the
ChgMstr table or call a Stored Procedure to do it.
However, I cannot find a way (even with Dynamic SQL) to
build a SELECT string that can be EXECuted. When I do, I
get "Invalid Object" messages for both Deleted and
Inserted. It appears that once the EXEC statement is sent
that Deleted and Inserted go out of scope.
Anyone got any ideas. I can provide the contents of the
trigger, if needed.Bryan,
The inserted and deleted tables will not be available to a stored
procedure. You could copy their contents into a temporary table for use by
the stored procedure, but it seems to me unlikely that you need a stored
procedure just to insert into your ChgMstr table. Can you do something like
this:
insert into ChgMster
select N'ColumnA', getdate(), suser_sname(), d.ColumnA, i.ColumnA
from inserted i, deleted d
where i.primaryKey = d.primaryKey
union all
select N'ColumnB', getdate(), suser_sname(), d.ColumnB, i.ColumnB
from inserted i, deleted d
where i.primaryKey = d.primaryKey
This assumes that the primary key column is not modified. If it is, unless
you have another unique constraint on columns that don't change, the
question of what the original and final values of that column are is not
discernable from the inserted and deleted tables in some multi-row updates,
such as
update T set
pk = case when 1 then 11 when 4 then 12 when 8 then 13 end
from T
where pk in (1, 4, 8)
Then the inserted table will contain rows with pk 11, 12, and 13, and the
deleted table will contain rows with pk 1, 4, and 8, but there is no way to
say which of 1, 4, and 8 because which of 11, 12, 13 by looking at the
inserted and deleted tables.
SK
"Bryan A. Jackson" <bjackson@.focuscmc.com> wrote in message
news:ae5701c40cee$28616dc0$a001280a@.phx.gbl...
> In our applications we have a table named ChgMstr (Change
> Log) that logs changes made to each record. It includes
> the Field Name, Date & Time, the user making the change,
> and the Before and After values of the field.
> I am trying to setup an Update trigger that will loop
> through the Deleted and Inserted fields, find which fields
> have changed, and then either INSERT directly into the
> ChgMstr table or call a Stored Procedure to do it.
> However, I cannot find a way (even with Dynamic SQL) to
> build a SELECT string that can be EXECuted. When I do, I
> get "Invalid Object" messages for both Deleted and
> Inserted. It appears that once the EXEC statement is sent
> that Deleted and Inserted go out of scope.
> Anyone got any ideas. I can provide the contents of the
> trigger, if needed.|||1. Forgive my ignorance, but what does the 'N' in select
N'Column A' do?
2. Will I have to do a union for each field in the table?
I'm looking for a generic way to do this so the trigger
does not need to be changed each time fields are added or
deleted.
Thanks,
Bryan

>--Original Message--
>Bryan,
> The inserted and deleted tables will not be available
to a stored
>procedure. You could copy their contents into a
temporary table for use by
>the stored procedure, but it seems to me unlikely that
you need a stored
>procedure just to insert into your ChgMstr table. Can
you do something like
>this:
>insert into ChgMster
>select N'ColumnA', getdate(), suser_sname(), d.ColumnA,
i.ColumnA
>from inserted i, deleted d
>where i.primaryKey = d.primaryKey
>union all
>select N'ColumnB', getdate(), suser_sname(), d.ColumnB,
i.ColumnB
>from inserted i, deleted d
>where i.primaryKey = d.primaryKey
>This assumes that the primary key column is not
modified. If it is, unless
>you have another unique constraint on columns that don't
change, the
>question of what the original and final values of that
column are is not
>discernable from the inserted and deleted tables in some
multi-row updates,
>such as
>update T set
> pk = case when 1 then 11 when 4 then 12 when 8 then 13
end
>from T
>where pk in (1, 4, 8)
>Then the inserted table will contain rows with pk 11, 12,
and 13, and the
>deleted table will contain rows with pk 1, 4, and 8, but
there is no way to
>say which of 1, 4, and 8 because which of 11, 12, 13 by
looking at the
>inserted and deleted tables.
>SK
>"Bryan A. Jackson" <bjackson@.focuscmc.com> wrote in
message
>news:ae5701c40cee$28616dc0$a001280a@.phx.gbl...
(Change
fields
I
sent
>
>.
>|||Bryan,
The N just signifies that the string is Unicode. Object names in SQL
Server are in Unicode, but it won't hurt to leave this out if the name
only uses ASCII.
I generally don't think it's a great idea to write generic code that
doesn't "know" the table structure. You could generate the code for
triggers like this automatically with something like this:
select 'insert into ChgMster' oneLine, 0 ORDINAL_POSITION
union all
select 'select
'+q_column_name+',
'+' getdate(),
suser_sname(),
d.'+q_column_name+',
'+' i.'+q_column_name+'
from inserted i, deleted d
where i.primaryKey = d.primaryKey
and i.'+q_column_name+'<>d.'+q_column_name+
case when ORDINAL_POSITION = (
select max(ORDINAL_POSITION)
from Northwind.INFORMATION_SCHEMA.Columns
where TABLE_NAME = 'Orders'
) then '' else '
union all'
end, ORDINAL_POSITION
from (
select quotename(COLUMN_NAME) as q_column_name, ORDINAL_POSITION
FROM Northwind.INFORMATION_SCHEMA.Columns
where TABLE_NAME = 'Orders'
) C
order by ORDINAL_POSITION
There are also third-party products to do this kind of logging.
SK
Bryan A. Jackson wrote:
>1. Forgive my ignorance, but what does the 'N' in select
>N'Column A' do?
>2. Will I have to do a union for each field in the table?
>I'm looking for a generic way to do this so the trigger
>does not need to be changed each time fields are added or
>deleted.
>Thanks,
>Bryan
>
>
>to a stored
>
>temporary table for use by
>
>you need a stored
>
>you do something like
>
>i.ColumnA
>
>i.ColumnB
>
>modified. If it is, unless
>
>change, the
>
>column are is not
>
>multi-row updates,
>
>end
>
>and 13, and the
>
>there is no way to
>
>looking at the
>
>message
>
>(Change
>
>fields
>
>I
>
>sent
>

Thursday, March 8, 2012

Change the server date and time

Hi,
can you tell me, how to change the server date and time using queries.
Please advise me.
rgds,
SouraThats not a recommended thing... in any scenario.
Why do you want to do that?
Thanks,
Sree
"SouRa" wrote:
> Hi,
> can you tell me, how to change the server date and time using queries.
> Please advise me.
> rgds,
> Soura

Change the server date and time

Hi,
can you tell me, how to change the server date and time using queries.
Please advise me.
rgds,
SouraThats not a recommended thing... in any scenario.
Why do you want to do that?
Thanks,
Sree
"SouRa" wrote:

> Hi,
> can you tell me, how to change the server date and time using queries.
> Please advise me.
> rgds,
> Soura

Change the server date and time

Hi,
can you tell me, how to change the server date and time using queries.
Please advise me.
rgds,
Soura
Thats not a recommended thing... in any scenario.
Why do you want to do that?
Thanks,
Sree
"SouRa" wrote:

> Hi,
> can you tell me, how to change the server date and time using queries.
> Please advise me.
> rgds,
> Soura

Wednesday, March 7, 2012

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

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 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

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
--
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
>

Change System Date in SQL Server

Hi
How do I change the date forward, say from April 2004 to August 2004,
so the SQL server will pick up the August 2004 date instead.
I try to do it changing the System Date in CMOS & Windows but when SQL
server services starts, SQL change the date back to April 2004 instead
of August 2004. Seems like the SQL server is pretty smart that it
controls the date of the Server.
Anybody have some idea? Thanks a bunch for any input.
SLSL,
To the best of my knowledge, SQL Server gets the date strictly from Windows,
and does not have any automatic mechanism to reset the Windows date.
I'm going to guess that you have Windows configured to automatically
synchronize with an Internet time server, and that is resetting the Windows
(and therefore the SQL Server) clock.
Chief Tenaya
"sl" <slai@.sceptre.com> wrote in message
news:9f6f5fe0.0404081722.5406fb01@.posting.google.com...
> Hi
> How do I change the date forward, say from April 2004 to August 2004,
> so the SQL server will pick up the August 2004 date instead.
> I try to do it changing the System Date in CMOS & Windows but when SQL
> server services starts, SQL change the date back to April 2004 instead
> of August 2004. Seems like the SQL server is pretty smart that it
> controls the date of the Server.
> Anybody have some idea? Thanks a bunch for any input.
> SL|||Hi Chief
Thanks a lot! The time-server ring a bell in me now. I think it is the
PDC server that is resetting the date when the SQL services starts. I
don't have a Time Server.
I'll check it. Thanks so much! Really appreciates your input.
SL
"Tenaya" <ct@.ct.ct> wrote in message news:<OiZfvadHEHA.2836@.TK2MSFTNGP11.phx.gbl>...
> SL,
> To the best of my knowledge, SQL Server gets the date strictly from Windows,
> and does not have any automatic mechanism to reset the Windows date.
> I'm going to guess that you have Windows configured to automatically
> synchronize with an Internet time server, and that is resetting the Windows
> (and therefore the SQL Server) clock.
> Chief Tenaya
>
> "sl" <slai@.sceptre.com> wrote in message
> news:9f6f5fe0.0404081722.5406fb01@.posting.google.com...
> > Hi
> >
> > How do I change the date forward, say from April 2004 to August 2004,
> > so the SQL server will pick up the August 2004 date instead.
> >
> > I try to do it changing the System Date in CMOS & Windows but when SQL
> > server services starts, SQL change the date back to April 2004 instead
> > of August 2004. Seems like the SQL server is pretty smart that it
> > controls the date of the Server.
> >
> > Anybody have some idea? Thanks a bunch for any input.
> >
> > SL

Change System Date in SQL Server

Hi
How do I change the date forward, say from April 2004 to August 2004,
so the SQL server will pick up the August 2004 date instead.
I try to do it changing the System Date in CMOS & Windows but when SQL
server services starts, SQL change the date back to April 2004 instead
of August 2004. Seems like the SQL server is pretty smart that it
controls the date of the Server.
Anybody have some idea? Thanks a bunch for any input.
SL
SL,
To the best of my knowledge, SQL Server gets the date strictly from Windows,
and does not have any automatic mechanism to reset the Windows date.
I'm going to guess that you have Windows configured to automatically
synchronize with an Internet time server, and that is resetting the Windows
(and therefore the SQL Server) clock.
Chief Tenaya
"sl" <slai@.sceptre.com> wrote in message
news:9f6f5fe0.0404081722.5406fb01@.posting.google.c om...
> Hi
> How do I change the date forward, say from April 2004 to August 2004,
> so the SQL server will pick up the August 2004 date instead.
> I try to do it changing the System Date in CMOS & Windows but when SQL
> server services starts, SQL change the date back to April 2004 instead
> of August 2004. Seems like the SQL server is pretty smart that it
> controls the date of the Server.
> Anybody have some idea? Thanks a bunch for any input.
> SL
|||Hi Chief
Thanks a lot! The time-server ring a bell in me now. I think it is the
PDC server that is resetting the date when the SQL services starts. I
don't have a Time Server.
I'll check it. Thanks so much! Really appreciates your input.
SL
"Tenaya" <ct@.ct.ct> wrote in message news:<OiZfvadHEHA.2836@.TK2MSFTNGP11.phx.gbl>...
> SL,
> To the best of my knowledge, SQL Server gets the date strictly from Windows,
> and does not have any automatic mechanism to reset the Windows date.
> I'm going to guess that you have Windows configured to automatically
> synchronize with an Internet time server, and that is resetting the Windows
> (and therefore the SQL Server) clock.
> Chief Tenaya
>
> "sl" <slai@.sceptre.com> wrote in message
> news:9f6f5fe0.0404081722.5406fb01@.posting.google.c om...

Change System Date in SQL Server

Hi
How do I change the date forward, say from April 2004 to August 2004,
so the SQL server will pick up the August 2004 date instead.
I try to do it changing the System Date in CMOS & Windows but when SQL
server services starts, SQL change the date back to April 2004 instead
of August 2004. Seems like the SQL server is pretty smart that it
controls the date of the Server.
Anybody have some idea? Thanks a bunch for any input.
SLSL,
To the best of my knowledge, SQL Server gets the date strictly from Windows,
and does not have any automatic mechanism to reset the Windows date.
I'm going to guess that you have Windows configured to automatically
synchronize with an Internet time server, and that is resetting the Windows
(and therefore the SQL Server) clock.
Chief Tenaya
"sl" <slai@.sceptre.com> wrote in message
news:9f6f5fe0.0404081722.5406fb01@.posting.google.com...
> Hi
> How do I change the date forward, say from April 2004 to August 2004,
> so the SQL server will pick up the August 2004 date instead.
> I try to do it changing the System Date in CMOS & Windows but when SQL
> server services starts, SQL change the date back to April 2004 instead
> of August 2004. Seems like the SQL server is pretty smart that it
> controls the date of the Server.
> Anybody have some idea? Thanks a bunch for any input.
> SL|||Hi Chief
Thanks a lot! The time-server ring a bell in me now. I think it is the
PDC server that is resetting the date when the SQL services starts. I
don't have a Time Server.
I'll check it. Thanks so much! Really appreciates your input.
SL
"Tenaya" <ct@.ct.ct> wrote in message news:<OiZfvadHEHA.2836@.TK2MSFTNGP11.phx.gbl>...[color=
darkred]
> SL,
> To the best of my knowledge, SQL Server gets the date strictly from Window
s,
> and does not have any automatic mechanism to reset the Windows date.
> I'm going to guess that you have Windows configured to automatically
> synchronize with an Internet time server, and that is resetting the Window
s
> (and therefore the SQL Server) clock.
> Chief Tenaya
>
> "sl" <slai@.sceptre.com> wrote in message
> news:9f6f5fe0.0404081722.5406fb01@.posting.google.com...

Friday, February 10, 2012

Change name of exported csv file

Hi guys,
I have created a report with Reporting Services 2005 that gets executed according to a schedule I have created, every working date and the output gets exported to a csv file. My problem is that I want the exported file to have the running date append to it, e.g. report "Myrep" gets exported as "Myrep.csv" but I want to have it as "Myrep070607.csv"

Thanks in advanceHi
pzou
Welcome to TSDN.

You have reached the right place for knowledge shairing.

Here you will find a vast resource of related topics and code.

Feel free to post more doubts/questions in the forum.

But before that give a try from your side and if possible try to post what/how you have approached to solve the problem.

It will help Experts in the forum in solving/underestanding your problem in a better way.|||Is it in ms.net

please clarify.