I recieve a text file with a field that has a text format of 20010910. I import this data into sql server 7.0 utilizing the import wizard. (The wizard will not convert the data to datetime format) I need to know how to convert this data into date format of 2001/09/10. How do I do this in sql.
Thank You,
David A. FullertonYou can add a string column to your table and CONVERT in a post-importing execution or use Visual Basic CDATE in Transformation tab in DTS just before click OK in usual IMPORT... dialog|||CDATE will not work in this example. However, I agree with Cesar's recommendations. In this case, since using vbscript will be more complicated than using cdate you can try the following after the data is loaded:
select convert(varchar(10), cast('20010920' as datetime), 111)|||Thank You That worked..Have a great day!|||Happy to help and good luck.
Showing posts with label wizard. Show all posts
Showing posts with label wizard. Show all posts
Thursday, March 29, 2012
Wednesday, March 7, 2012
Data-Driven Subscription - Empty Field List on Step 4
I am attempting to create a data-driven subscription. I step through the
wizard, paste in the query, validate and click next. When I get to the screen
to map the fields from the database table to the fields in the subscription
(to, cc, reply-to, etc).
There are no fields in the drop-down. I have tried numerous different
queries, that I know work when I run them in a report, but don't seem to want
to populate the field list. The source database is Teradata, if that makes a
difference.
There is no error, and I can't seem to find any log entries, so I am not
sure where to turn. Any Ideas?
SteveUPDATED: I have confirmed that, in fact the data-driven subscription will
pull fields from SQL Server, so the issue seems to be with the Teradata
connection.
Any help?
"Steve Muise" wrote:
> I am attempting to create a data-driven subscription. I step through the
> wizard, paste in the query, validate and click next. When I get to the screen
> to map the fields from the database table to the fields in the subscription
> (to, cc, reply-to, etc).
> There are no fields in the drop-down. I have tried numerous different
> queries, that I know work when I run them in a report, but don't seem to want
> to populate the field list. The source database is Teradata, if that makes a
> difference.
> There is no error, and I can't seem to find any log entries, so I am not
> sure where to turn. Any Ideas?
> Steve
wizard, paste in the query, validate and click next. When I get to the screen
to map the fields from the database table to the fields in the subscription
(to, cc, reply-to, etc).
There are no fields in the drop-down. I have tried numerous different
queries, that I know work when I run them in a report, but don't seem to want
to populate the field list. The source database is Teradata, if that makes a
difference.
There is no error, and I can't seem to find any log entries, so I am not
sure where to turn. Any Ideas?
SteveUPDATED: I have confirmed that, in fact the data-driven subscription will
pull fields from SQL Server, so the issue seems to be with the Teradata
connection.
Any help?
"Steve Muise" wrote:
> I am attempting to create a data-driven subscription. I step through the
> wizard, paste in the query, validate and click next. When I get to the screen
> to map the fields from the database table to the fields in the subscription
> (to, cc, reply-to, etc).
> There are no fields in the drop-down. I have tried numerous different
> queries, that I know work when I run them in a report, but don't seem to want
> to populate the field list. The source database is Teradata, if that makes a
> difference.
> There is no error, and I can't seem to find any log entries, so I am not
> sure where to turn. Any Ideas?
> Steve
Friday, February 24, 2012
databases disappeared but MDF, LDF still there...
I have been using SQL Server 2000 but not am not an expert on it. I recently
copied databases into a new server using Database Copy Wizard. The previous
databases were copied with no problems. The last one however, still copied
ok but the databases on the "source" server disappeared! I tried
"re-copying" same databases back into the source server but I am getting a
'name conflict' error. From my research, this meant the mdf and ldf files
are still there. Note that I "copied" and NOT "moved" these databases. Can
you please tell me how I can restore these databases? I also tried
re-creating the missing database so I can export data back into it but I got
"Error 5170: Cannot create file 'e:\data\MSSQL\...\.MDF' because it already
exists. etc" Thank you for helping.
_________________
Freedom is nothing else but a chance to be better. (Albert Camus)
One of the reason could be, the source and the destination database file
names could be same.
When you are using copy database wizard, try to modify destination file name
to something else and then try to copy.
Hopefully, it should work.
Thanks
GYK
copied databases into a new server using Database Copy Wizard. The previous
databases were copied with no problems. The last one however, still copied
ok but the databases on the "source" server disappeared! I tried
"re-copying" same databases back into the source server but I am getting a
'name conflict' error. From my research, this meant the mdf and ldf files
are still there. Note that I "copied" and NOT "moved" these databases. Can
you please tell me how I can restore these databases? I also tried
re-creating the missing database so I can export data back into it but I got
"Error 5170: Cannot create file 'e:\data\MSSQL\...\.MDF' because it already
exists. etc" Thank you for helping.
_________________
Freedom is nothing else but a chance to be better. (Albert Camus)
One of the reason could be, the source and the destination database file
names could be same.
When you are using copy database wizard, try to modify destination file name
to something else and then try to copy.
Hopefully, it should work.
Thanks
GYK
databases disappeared but MDF, LDF still there...
I have been using SQL Server 2000 but not am not an expert on it. I recently
copied databases into a new server using Database Copy Wizard. The previous
databases were copied with no problems. The last one however, still copied
ok but the databases on the "source" server disappeared! I tried
"re-copying" same databases back into the source server but I am getting a
'name conflict' error. From my research, this meant the mdf and ldf files
are still there. Note that I "copied" and NOT "moved" these databases. Can
you please tell me how I can restore these databases? I also tried
re-creating the missing database so I can export data back into it but I got
"Error 5170: Cannot create file 'e:\data\MSSQL\...\.MDF' because it already
exists. etc" Thank you for helping.
--
_________________
Freedom is nothing else but a chance to be better. (Albert Camus)One of the reason could be, the source and the destination database file
names could be same.
When you are using copy database wizard, try to modify destination file name
to something else and then try to copy.
Hopefully, it should work.
Thanks
GYK
copied databases into a new server using Database Copy Wizard. The previous
databases were copied with no problems. The last one however, still copied
ok but the databases on the "source" server disappeared! I tried
"re-copying" same databases back into the source server but I am getting a
'name conflict' error. From my research, this meant the mdf and ldf files
are still there. Note that I "copied" and NOT "moved" these databases. Can
you please tell me how I can restore these databases? I also tried
re-creating the missing database so I can export data back into it but I got
"Error 5170: Cannot create file 'e:\data\MSSQL\...\.MDF' because it already
exists. etc" Thank you for helping.
--
_________________
Freedom is nothing else but a chance to be better. (Albert Camus)One of the reason could be, the source and the destination database file
names could be same.
When you are using copy database wizard, try to modify destination file name
to something else and then try to copy.
Hopefully, it should work.
Thanks
GYK
DATABASEPROPERTYEX is not a recognized function name?
Hi, I just made a report with the wizard when I swith to preview I got that
message and I cant see my report.
Thanks in advance
--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 3.
MIEMBRO ACTIVO DE ALIANZADEV
http://spaces.msn.com/members/extremed/You are accessing a SQL Server 7.0 or older, correct? Just install SP1 of RS
2000 on report server and report designer machines and it will work.
The workaround for RS 2000 _without_ SP1 is as follows: Go to the "Data
Options" tab of the "Dataset" dialog in report designer. On the Data Options
tab you will see that all settings contain "Auto" (and report server would
therefore try to auto-detect the collation settings from the database
server). Replace the Auto-settings with the following settings (e.g. if your
SQL 7.0 database collation is "SQL_Latin1_General_CP1_CI_AS"):
Collation = Latin1_General
Case sensitivity = false
Kanatype sensitivity = false
Width sensitivity = false
Accent sensitivity = true
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Luis Esteban Valencia" <luisvalen@.haceb.com> wrote in message
news:uCrElYQGFHA.4088@.TK2MSFTNGP09.phx.gbl...
> Hi, I just made a report with the wizard when I swith to preview I got
> that
> message and I cant see my report.
> Thanks in advance
> --
> LUIS ESTEBAN VALENCIA
> MICROSOFT DCE 3.
> MIEMBRO ACTIVO DE ALIANZADEV
> http://spaces.msn.com/members/extremed/
>
message and I cant see my report.
Thanks in advance
--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 3.
MIEMBRO ACTIVO DE ALIANZADEV
http://spaces.msn.com/members/extremed/You are accessing a SQL Server 7.0 or older, correct? Just install SP1 of RS
2000 on report server and report designer machines and it will work.
The workaround for RS 2000 _without_ SP1 is as follows: Go to the "Data
Options" tab of the "Dataset" dialog in report designer. On the Data Options
tab you will see that all settings contain "Auto" (and report server would
therefore try to auto-detect the collation settings from the database
server). Replace the Auto-settings with the following settings (e.g. if your
SQL 7.0 database collation is "SQL_Latin1_General_CP1_CI_AS"):
Collation = Latin1_General
Case sensitivity = false
Kanatype sensitivity = false
Width sensitivity = false
Accent sensitivity = true
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Luis Esteban Valencia" <luisvalen@.haceb.com> wrote in message
news:uCrElYQGFHA.4088@.TK2MSFTNGP09.phx.gbl...
> Hi, I just made a report with the wizard when I swith to preview I got
> that
> message and I cant see my report.
> Thanks in advance
> --
> LUIS ESTEBAN VALENCIA
> MICROSOFT DCE 3.
> MIEMBRO ACTIVO DE ALIANZADEV
> http://spaces.msn.com/members/extremed/
>
Subscribe to:
Posts (Atom)