Showing posts with label format. Show all posts
Showing posts with label format. Show all posts

Friday, March 30, 2012

problem in inserting a record whose values are of date and time format.

hello,

I am trying to insert date and time into my table.

insert into <table_name> values('12/12/2006','12:23:04');

but it displays error at " ; "

can anyone help me to figure out the problem

Thanks a lot in advance.

Regards,

Sweety

What happens if you remove ";"?

|||

hi,

thx for responding..i figured out the problem and i solved it..

bye

Sweety

Problem in generating Excel worksheets

In the Report Designer, I insert some page breaks after data regions. When
exporting to excel format, the pages are displayed as several worksheets in
the excel. But I found no way to specify the name of worksheet in Report
Designer.Is there any ways to do that?
Thanks.There is no way to specify the name of the worksheet when exporting your
report. When exporting to excel, page breaks after a data region on your
report are interepreted as a new worksheet. I'm not sure if this is on the
wishlist or this capability will be included in RS 2005.
"Johnny Chow" wrote:
> In the Report Designer, I insert some page breaks after data regions. When
> exporting to excel format, the pages are displayed as several worksheets in
> the excel. But I found no way to specify the name of worksheet in Report
> Designer.Is there any ways to do that?
> Thanks.

Wednesday, March 28, 2012

Problem in Export to PDF or Excel

My report contains some Korean wording. When I export to PDF, the Korean
word appear as ?. Then I export the report in Excel format, there is no
problem in the Korean wording. But when I try to print it, the default page
orientation is 'Landscape' and there is default left and right margin no
matter how I adjust the report size in reporting services. Can anybody help
me ?You should be able to fix the orientation to landscape by switching the size
of the page (8.5x11 versus 11x8.5).
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
news:5B32F2DF-371B-4951-85BB-B5F550C64095@.microsoft.com...
> My report contains some Korean wording. When I export to PDF, the Korean
> word appear as ?. Then I export the report in Excel format, there is no
> problem in the Korean wording. But when I try to print it, the default
> page
> orientation is 'Landscape' and there is default left and right margin no
> matter how I adjust the report size in reporting services. Can anybody
> help
> me ?|||But my report be shown in 'Portrait'.
"Jeff A. Stucker" wrote:
> You should be able to fix the orientation to landscape by switching the size
> of the page (8.5x11 versus 11x8.5).
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
> news:5B32F2DF-371B-4951-85BB-B5F550C64095@.microsoft.com...
> > My report contains some Korean wording. When I export to PDF, the Korean
> > word appear as ?. Then I export the report in Excel format, there is no
> > problem in the Korean wording. But when I try to print it, the default
> > page
> > orientation is 'Landscape' and there is default left and right margin no
> > matter how I adjust the report size in reporting services. Can anybody
> > help
> > me ?
>
>|||What is the size of the report (page width, page height)?
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
news:98F66BD1-48F0-43F1-AA23-32CE727DC2F1@.microsoft.com...
> But my report be shown in 'Portrait'.
> "Jeff A. Stucker" wrote:
>> You should be able to fix the orientation to landscape by switching the
>> size
>> of the page (8.5x11 versus 11x8.5).
>> --
>> Cheers,
>> '(' Jeff A. Stucker
>> \
>> Business Intelligence
>> www.criadvantage.com
>> ---
>> "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
>> news:5B32F2DF-371B-4951-85BB-B5F550C64095@.microsoft.com...
>> > My report contains some Korean wording. When I export to PDF, the
>> > Korean
>> > word appear as ?. Then I export the report in Excel format, there is
>> > no
>> > problem in the Korean wording. But when I try to print it, the default
>> > page
>> > orientation is 'Landscape' and there is default left and right margin
>> > no
>> > matter how I adjust the report size in reporting services. Can anybody
>> > help
>> > me ?
>>|||page width = 8.5
page height=11
"Jeff A. Stucker" wrote:
> What is the size of the report (page width, page height)?
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
> news:98F66BD1-48F0-43F1-AA23-32CE727DC2F1@.microsoft.com...
> > But my report be shown in 'Portrait'.
> >
> > "Jeff A. Stucker" wrote:
> >
> >> You should be able to fix the orientation to landscape by switching the
> >> size
> >> of the page (8.5x11 versus 11x8.5).
> >>
> >> --
> >> Cheers,
> >>
> >> '(' Jeff A. Stucker
> >> \
> >>
> >> Business Intelligence
> >> www.criadvantage.com
> >> ---
> >> "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
> >> news:5B32F2DF-371B-4951-85BB-B5F550C64095@.microsoft.com...
> >> > My report contains some Korean wording. When I export to PDF, the
> >> > Korean
> >> > word appear as ?. Then I export the report in Excel format, there is
> >> > no
> >> > problem in the Korean wording. But when I try to print it, the default
> >> > page
> >> > orientation is 'Landscape' and there is default left and right margin
> >> > no
> >> > matter how I adjust the report size in reporting services. Can anybody
> >> > help
> >> > me ?
> >>
> >>
> >>
>
>|||Can anyone help me ?
My question is :
My report contains some Korean wording. When I export to PDF, the Korean
word appear as ?. Then I export the report in Excel format, there is no
problem in the Korean wording. But when I try to print it, the default page
orientation is 'Landscape' and there is default left and right margin no
matter how I adjust the report size in reporting services.
"May Liu" wrote:
> page width = 8.5
> page height=11
> "Jeff A. Stucker" wrote:
> > What is the size of the report (page width, page height)?
> >
> > --
> > Cheers,
> >
> > '(' Jeff A. Stucker
> > \
> >
> > Business Intelligence
> > www.criadvantage.com
> > ---
> > "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
> > news:98F66BD1-48F0-43F1-AA23-32CE727DC2F1@.microsoft.com...
> > > But my report be shown in 'Portrait'.
> > >
> > > "Jeff A. Stucker" wrote:
> > >
> > >> You should be able to fix the orientation to landscape by switching the
> > >> size
> > >> of the page (8.5x11 versus 11x8.5).
> > >>
> > >> --
> > >> Cheers,
> > >>
> > >> '(' Jeff A. Stucker
> > >> \
> > >>
> > >> Business Intelligence
> > >> www.criadvantage.com
> > >> ---
> > >> "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
> > >> news:5B32F2DF-371B-4951-85BB-B5F550C64095@.microsoft.com...
> > >> > My report contains some Korean wording. When I export to PDF, the
> > >> > Korean
> > >> > word appear as ?. Then I export the report in Excel format, there is
> > >> > no
> > >> > problem in the Korean wording. But when I try to print it, the default
> > >> > page
> > >> > orientation is 'Landscape' and there is default left and right margin
> > >> > no
> > >> > matter how I adjust the report size in reporting services. Can anybody
> > >> > help
> > >> > me ?
> > >>
> > >>
> > >>
> >
> >
> >

Wednesday, March 21, 2012

problem getting result set through a stored procedure call using VB.

Problem regarding getting an XML script from a stored procedure that
returns XML string format of a select query on a temporary table
created by the stored procedure itself and values also inserted within
the stored procedure.See if this helps: http://www.sqlxml.org/faqs.aspx?faq=104
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"abc" <er.nehasinghal@.gmail.com> wrote in message
news:1121936278.733465.80930@.g47g2000cwa.googlegroups.com...
Problem regarding getting an XML script from a stored procedure that
returns XML string format of a select query on a temporary table
created by the stored procedure itself and values also inserted within
the stored procedure.sql

problem formatting date

Hi all,
I make an insert of date with VB.Net using the "format" function:
format(Now(), "dd/MM/yyyy hh:mm:ss").
In my dev environment it work fine.
But when I put the page on production server
the format fuction change the tima formatting, change ":" with "."
so it pass hh.mm.ss to the DB crashing the insert.
I used a replace function to restore ":", and it work fine.
Bue any idea?
Why this happen
thanks allThis is a pure VB.NET question, so you probably have better luck asking this
in a VB.NET forum.
However, I strongly encourage you to format the datetime as 'YYYYMMDD hh:mm:
ss'. Check
http://www.karaszi.com/SQLServer/info_datetime.asp for the reason.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Henry Cabot Enaus III" <hceiii@.yahoo.com> wrote in message
news:512ff012.0409010324.126ebd78@.posting.google.com...
> Hi all,
> I make an insert of date with VB.Net using the "format" function:
> format(Now(), "dd/MM/yyyy hh:mm:ss").
> In my dev environment it work fine.
> But when I put the page on production server
> the format fuction change the tima formatting, change ":" with "."
> so it pass hh.mm.ss to the DB crashing the insert.
> I used a replace function to restore ":", and it work fine.
> Bue any idea?
> Why this happen
> thanks all

problem formatting date

Hi all,
I make an insert of date with VB.Net using the "format" function:
format(Now(), "dd/MM/yyyy hh:mm:ss").
In my dev environment it work fine.
But when I put the page on production server
the format fuction change the tima formatting, change ":" with "."
so it pass hh.mm.ss to the DB crashing the insert.
I used a replace function to restore ":", and it work fine.
Bue any idea?
Why this happen
thanks all
This is a pure VB.NET question, so you probably have better luck asking this in a VB.NET forum.
However, I strongly encourage you to format the datetime as 'YYYYMMDD hh:mm:ss'. Check
http://www.karaszi.com/SQLServer/info_datetime.asp for the reason.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Henry Cabot Enaus III" <hceiii@.yahoo.com> wrote in message
news:512ff012.0409010324.126ebd78@.posting.google.c om...
> Hi all,
> I make an insert of date with VB.Net using the "format" function:
> format(Now(), "dd/MM/yyyy hh:mm:ss").
> In my dev environment it work fine.
> But when I put the page on production server
> the format fuction change the tima formatting, change ":" with "."
> so it pass hh.mm.ss to the DB crashing the insert.
> I used a replace function to restore ":", and it work fine.
> Bue any idea?
> Why this happen
> thanks all
sql

problem formatting date

Hi all,
I make an insert of date with VB.Net using the "format" function:
format(Now(), "dd/MM/yyyy hh:mm:ss").
In my dev environment it work fine.
But when I put the page on production server
the format fuction change the tima formatting, change ":" with "."
so it pass hh.mm.ss to the DB crashing the insert.
I used a replace function to restore ":", and it work fine.
Bue any idea?
Why this happen
thanks allThis is a pure VB.NET question, so you probably have better luck asking this in a VB.NET forum.
However, I strongly encourage you to format the datetime as 'YYYYMMDD hh:mm:ss'. Check
http://www.karaszi.com/SQLServer/info_datetime.asp for the reason.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Henry Cabot Enaus III" <hceiii@.yahoo.com> wrote in message
news:512ff012.0409010324.126ebd78@.posting.google.com...
> Hi all,
> I make an insert of date with VB.Net using the "format" function:
> format(Now(), "dd/MM/yyyy hh:mm:ss").
> In my dev environment it work fine.
> But when I put the page on production server
> the format fuction change the tima formatting, change ":" with "."
> so it pass hh.mm.ss to the DB crashing the insert.
> I used a replace function to restore ":", and it work fine.
> Bue any idea?
> Why this happen
> thanks all

Problem formatting currency to different decimal places

I'm trying to format a field value to currency on a SQL report.

I need to allow for 4 decimal places to the right of the decimal if the field value contains those digits. (ie. $6.8484). Most of the time I will not have 4 places to the right of the decimal and would like to format according to the amout of decimal places. For example, If the value is 1 dollar, I don't want to format as $1.0000. I need a way to format the values according to the amount of digits to the right of the decimal. (ie. 1 dollar = $1.00, 3.453 = $3.453, 2.4453 = $2.4453)

Is there an easy way to do this using C2,C3, and C4? Please help.

When you say "SQL report", I suppose you mean you are using SQL Server Reporting Services.

In that case, you can just set the Format property of the textbox where you display the numeric field value to C4.

Note: if the query returns the value as string (instead of a numeric value), you will need to explicitly convert the value into its numeric representation first. You can do this in the query or directly in the report textbox by using the CDbl() function to convert a string to a double, e.g. =CDbl(Fields!SomeString.Value).

-- Robert

|||The C4 format will work for the four decimal place values but how do handle the three and two decimal situations. The report values should not display as $4.4200 if the initial value is $4.42. This also applies to three digit values( $4.421 should not display as $4.4210 on the report).|||I'm not sure if there are any standard functions to determine how many decimal places the value has (if not, you can write a custom function to do it). Suppose we have such a function called GetDecimalPlaces, you can set the format property to =IIF(GetDecimalPlaces(<fieldvalue>) <= 2, C2, GetDecimalPlaces(<fieldValue>) = 3, "C3", "C4").

Tuesday, March 20, 2012

Problem exporting to CSV format

Hi,
When I export my report to csv format and then open the csv file, then I am getting the Data in my report. But in addition to that, I am getting a row that contains comma delimited list of the names of the controls(textboxes) that I have used in my Layout of RDL file for that report. Why does this happen? How do I avoid it?You can try using the NoHeader deviceinfo to suppress the header row http://msdn2.microsoft.com/en-us/library/ms155365.aspx.

Problem exporting report to other format

Hi,

I have successfully created my first report. however when i tried to export the report to other format like excel, it doesn't work. and give me some funny codes

======================================
MIME-Version: 1.0
X-Document-Type: Workbook
Content-Type: multipart/related;boundary="--=_NextPart_01C35DB7.4B204430"
This is a multi-part message in MIME format.
--=_NextPart_01C35DB7.4B204430
Content-Type: text/html;
Content-Transfer-Encoding: base64
Content-Location:file:///c:/Report.htm
77u/PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiIHhtbG5zOm89InVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb2[TRIMMED]=
--=_NextPart_01C35DB7.4B204430
Content-Type: text/html
Content-Transfer-Encoding: base64
Content-Location:file:///c:/Sheet1.htm

77u/PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiIHhtbG5zOm89InVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb2[TRIMMED]==
--=_NextPart_01C35DB7.4B204430
Content-Type: text/css
Content-Transfer-Encoding: base64
Content-Location:file:///c:/stylesheet.css

77u/Lnhscl8zewpwYWRkaW5nLWJvdHRvbTowcHQ7ZGlyZWN0aW9uOkxUUjt0ZXh0LWRlY29yYXRpb246Tm9uZTtmb250LXNpemU6MTBwdDtjb2xvcjp[TRIMMED]
--=_NextPart_01C35DB7.4B204430--
=====================================================

Anything that i need to set?


______________
Post trimmed by moderator SomeNewKid

Hi eeyore21
I run Office 2003 and XP with SRS SP2. So It may differ or not. But what I found was that Office2k3 allows you to right click( which brings up the context menu) and choose export to excel. This is totally diffrent than to select the export format for the Report Server Toolbar. If you want to export a SRS report you must use the SRS Toolbar and not the IE context menu. Context menu does strange things to the SRS formating and the way it gets exported. Sometimes it ( context menu) will work depending on the HTML rendered by SRS it is not to complex|||

Hi l0n3i200n ,
Yup, i used the SRS toolbatr to export to excel, but it doesn't give me the end result.
Another issue that i face is that when i export to pdf, it seems to break the report horizontally to serveral pages, instead of 1 page only.
Is there anywhere i can set this?

|||

Hi

I've had the same problem with PDF files, I read in one of the posts that you should set the Report Margins to the required size, however that didn't work for me. In the end I had to resize the controls to fit on a report(SRS Report Designer Page) set with margins the same as a A4 page. This made things better but didn't solve the problem completely.

|||

Thanks l0n3i200n,
I managed to export to excel file after installing service pack 2 for Reporting server.
I guess we have to make our report fit on a A4 page. :(

|||Good Evening Or Good Morning!
I have just "scrapped" the export capibilities to PDF!
PDF never renders anything useful in Thai, Korean, Laos, or Cambodian!
So I just make everyone and at times do it automatically to a TIFF!
The export to a TIFF never "burps"!
This may be of some help or not and -
Best Regards,

Problem exporting data using Excel destination (wrong format)

Hi there,

I have designed a package that works perfectly well, exporting data to an excel file from an ole db source. The problem is that in the excel destination file, columns of data that originally were numbers, are formatted as text. It would be just annoying if it weren't because I use those figures in a pivot table that operates with them.

Any idea on how to tell Excel that those columns are numbers?

Thx in advance

What is the original data type in the OLE DB source of those columns? If they are strings you may need tu use the Data Conversion transformation. Does the excel file already exists? if so, what are the format of the columns?

I run a quick test loading 100 rows od AdventureWorks.Sales.SalesOrderDetail table into an Excel file and all the data types mapped fine. The only thing is that I used the Excel Destination in BIDS to create the file and the destination tab using the 'Name of the excel sheet' -->New... button; it generated an statement like:

CREATE TABLE `Excel Destination` (
`SalesOrderID` INTEGER,
`SalesOrderDetailID` INTEGER,
`CarrierTrackingNumber` NVARCHAR(25),
`OrderQty` SMALLINT,
`ProductID` INTEGER,
`SpecialOfferID` INTEGER,
`UnitPrice` MONEY,
`UnitPriceDiscount` MONEY,
`LineTotal` NUMERIC (38,6),
`rowguid` UNIQUEIDENTIFIER,
`ModifiedDate` DATETIME
)

I only had to adjust the Numeric data type precision and I worked just fine.

Rafael Salas

|||

Thx for your answer Rafael.

The numeric data from the ole db data source is in four-byte signed int [DT_I4]. I have a data conversion between the ole db data source and the excel destination and I've tried to both leave the numeric fields unchanged and "convert" them into the same type. Regarding the excel file, I use a template pre-formatted that i copy into a new file through a system file task in the control flow. I've tried several formatting in the columns (general, numeric, etc...) to no avail...

I've also tried in the excel destination to create the worksheets in which I export the data through that "new button" and with a command very similar to the one you posted, with type for the numeric columns as INTEGER. If it worked for you I'm really confused then :/, I was beginning to think it could be a bug in excel.

Thx again

|||

Loslor,

I just looked into the details of mi excel destination file and compared how the data types from BIDS got mapped. I found that all my DT_I4, DT_I2, DT_WSTR and Numeric in BDIS have 'general' when I looked into the format of the cells in the Excel file. I also used the data in the excel file to build a pivot table and worked fine. Are you getting the same behavior?

CREATE TABLE `Excel Destination` (
`SalesOrderID` INTEGER, --> mapped from an DT_I4 in the dataflow; loaded in excel as 'General' (when opening the execel file and look a the format of the cell)
`SalesOrderDetailID` INTEGER,

`CarrierTrackingNumber` NVARCHAR(25), --> mapped from an DT_WSTR in the dataflow; loaded in excel as 'General' (when opening the execel file and look a the format of the cell)
`OrderQty` SMALLINT, --> mapped from an DT_I2 in the dataflow; loaded in excel as 'General' (when opening the execel file and look a the format of the cell)
`ProductID` INTEGER,
`SpecialOfferID` INTEGER,
`UnitPrice` MONEY, --> mapped from an DT_CY in the dataflow; loaded in excel as 'Currency' (when opening the execel file and look a the format of the cell)
`UnitPriceDiscount` MONEY,
`LineTotal` NUMERIC (38,6), --> mapped from a Numeric in the dataflow; loaded in excel as 'General' (when opening the execel file and look a the format of the cell)
`rowguid` UNIQUEIDENTIFIER,--> mapped from an DT_DBTIMESTAMP in the dataflow; loaded in excel as 'Date' (when opening the execel file and look a the format of the cell)
`ModifiedDate` DATETIME
)

Rafael Salas

|||

Hi again,

Yes, my excell is doing the same. After exporting the data, all the cells have the format "General", though they are still treated as text. In fact, the numeric columns display a warning saying that "The number in the cell is formatted as text or preceded by apostrophe" (the last thing obviously being not true) and asks me if i want to reformat the cells, wich sounds a bit like a joke to me. The pivot table is still not getting right the data.

Thx Rafael

|||

Then it seems there is an issue in how excel treats the format 'general' in your side. As I told you I was able to generate the Pivot table regardless of the 'general' formating.

Sorry if I didnt hel you

Rafael Salas

|||

I'm beginning to fight in that front since I don't see any problem in the package.

Thx a lot for your time Rafael

Problem exporting data using Excel destination (wrong format)

Hi there,

I have designed a package that works perfectly well, exporting data to an excel file from an ole db source. The problem is that in the excel destination file, columns of data that originally were numbers, are formatted as text. It would be just annoying if it weren't because I use those figures in a pivot table that operates with them.

Any idea on how to tell Excel that those columns are numbers?

Thx in advance

What is the original data type in the OLE DB source of those columns? If they are strings you may need tu use the Data Conversion transformation. Does the excel file already exists? if so, what are the format of the columns?

I run a quick test loading 100 rows od AdventureWorks.Sales.SalesOrderDetail table into an Excel file and all the data types mapped fine. The only thing is that I used the Excel Destination in BIDS to create the file and the destination tab using the 'Name of the excel sheet' -->New... button; it generated an statement like:

CREATE TABLE `Excel Destination` (
`SalesOrderID` INTEGER,
`SalesOrderDetailID` INTEGER,
`CarrierTrackingNumber` NVARCHAR(25),
`OrderQty` SMALLINT,
`ProductID` INTEGER,
`SpecialOfferID` INTEGER,
`UnitPrice` MONEY,
`UnitPriceDiscount` MONEY,
`LineTotal` NUMERIC (38,6),
`rowguid` UNIQUEIDENTIFIER,
`ModifiedDate` DATETIME
)

I only had to adjust the Numeric data type precision and I worked just fine.

Rafael Salas

|||

Thx for your answer Rafael.

The numeric data from the ole db data source is in four-byte signed int [DT_I4]. I have a data conversion between the ole db data source and the excel destination and I've tried to both leave the numeric fields unchanged and "convert" them into the same type. Regarding the excel file, I use a template pre-formatted that i copy into a new file through a system file task in the control flow. I've tried several formatting in the columns (general, numeric, etc...) to no avail...

I've also tried in the excel destination to create the worksheets in which I export the data through that "new button" and with a command very similar to the one you posted, with type for the numeric columns as INTEGER. If it worked for you I'm really confused then :/, I was beginning to think it could be a bug in excel.

Thx again

|||

Loslor,

I just looked into the details of mi excel destination file and compared how the data types from BIDS got mapped. I found that all my DT_I4, DT_I2, DT_WSTR and Numeric in BDIS have 'general' when I looked into the format of the cells in the Excel file. I also used the data in the excel file to build a pivot table and worked fine. Are you getting the same behavior?

CREATE TABLE `Excel Destination` (
`SalesOrderID` INTEGER, --> mapped from an DT_I4 in the dataflow; loaded in excel as 'General' (when opening the execel file and look a the format of the cell)
`SalesOrderDetailID` INTEGER,

`CarrierTrackingNumber` NVARCHAR(25), --> mapped from an DT_WSTR in the dataflow; loaded in excel as 'General' (when opening the execel file and look a the format of the cell)
`OrderQty` SMALLINT, --> mapped from an DT_I2 in the dataflow; loaded in excel as 'General' (when opening the execel file and look a the format of the cell)
`ProductID` INTEGER,
`SpecialOfferID` INTEGER,
`UnitPrice` MONEY, --> mapped from an DT_CY in the dataflow; loaded in excel as 'Currency' (when opening the execel file and look a the format of the cell)
`UnitPriceDiscount` MONEY,
`LineTotal` NUMERIC (38,6), --> mapped from a Numeric in the dataflow; loaded in excel as 'General' (when opening the execel file and look a the format of the cell)
`rowguid` UNIQUEIDENTIFIER,--> mapped from an DT_DBTIMESTAMP in the dataflow; loaded in excel as 'Date' (when opening the execel file and look a the format of the cell)
`ModifiedDate` DATETIME
)

Rafael Salas

|||

Hi again,

Yes, my excell is doing the same. After exporting the data, all the cells have the format "General", though they are still treated as text. In fact, the numeric columns display a warning saying that "The number in the cell is formatted as text or preceded by apostrophe" (the last thing obviously being not true) and asks me if i want to reformat the cells, wich sounds a bit like a joke to me. The pivot table is still not getting right the data.

Thx Rafael

|||

Then it seems there is an issue in how excel treats the format 'general' in your side. As I told you I was able to generate the Pivot table regardless of the 'general' formating.

Sorry if I didnt hel you

Rafael Salas

|||

I'm beginning to fight in that front since I don't see any problem in the package.

Thx a lot for your time Rafael

|||

I'm having the same problem using Excel 2003 in SSIS 2005 and wonder if you discovered the solution. I'd appreciate any tips you may have. Thanks.

Dan

Wednesday, March 7, 2012

Problem creating Job from tsql

This is a multi-part message in MIME format.
--=_NextPart_000_008B_01C43846.EBF4ED60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm attempting to create a job on a client's server using tsql over a = VPN.
* I've created this procedure before using the same tsql and VPN
* The same tsql works presently on my server
* I'm not having any other problems on the server
* We're using NT auth, and my userid is sa
When I try to create a job from query analyzer, I get:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite = (send()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
Any ideas?
Thanks!
Greg
--=_NextPart_000_008B_01C43846.EBF4ED60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

I'm attempting to create a job on a client's = server using tsql over a VPN.

* I've created this procedure before using the same = tsql and VPN
* The same tsql works presently on my = server
* I'm not having any other problems on the = server
* We're using NT auth, and my userid is = sa

When I try to create a job from query analyzer, I get:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send()). Server: = Msg 11, Level 16, State 1, Line 0 General network error. = Check your network documentation.

Connection Broken

Any ideas?

Thanks!
Greg
--=_NextPart_000_008B_01C43846.EBF4ED60--This is a multi-part message in MIME format.
--=_NextPart_000_000D_01C438DD.3B28E440
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Seems that 'sp_add_jobstep' is generating the error. Anyone have a =similar experience?
--
Greg C
"Greg C" <uce@.ftc.com> wrote in message =news:QAxoc.88432$Dn1.44627@.fe2.texas.rr.com...
I'm attempting to create a job on a client's server using tsql over a =VPN.
* I've created this procedure before using the same tsql and VPN
* The same tsql works presently on my server
* I'm not having any other problems on the server
* We're using NT auth, and my userid is sa
When I try to create a job from query analyzer, I get:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite =(send()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
Any ideas?
Thanks!
Greg
--=_NextPart_000_000D_01C438DD.3B28E440
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Seems that 'sp_add_jobstep' is generating the =error. Anyone have a similar experience?
-- Greg C
"Greg C" =wrote in message news:QAxoc.88432$Dn1=.44627@.fe2.texas.rr.com...

I'm attempting to create a job on a client's =server using tsql over a VPN.

* I've created this procedure before using the =same tsql and VPN
* The same tsql works presently on my =server
* I'm not having any other problems on the server
* We're using NT auth, and my userid is =sa

When I try to create a job from query analyzer, I get:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send()). =Server: Msg 11, Level 16, State 1, Line 0 General network =error. Check your network documentation.

Connection Broken

Any ideas?

Thanks!
Greg

--=_NextPart_000_000D_01C438DD.3B28E440--

Saturday, February 25, 2012

Problem converting UTC dates in dts

Can anyone help me convert UTC dates in a dts package? I have a db I need to transform, but all the dates are in utc format. Is there a function I can use in an ActiveX transformation script to convert, say, 38166, to a valid datetime value? There seems to be almost no documentation in using utc in SQL.How is that a UTC time?

http://www.dxing.com/utcgmt.htm|||I'll try...but for the record i dont think 38166 is a valid UTC date.
Please correct me if i'm wrong.

here is what i thougght UTC date looked like:

2004-07-01T16:15:30

SQL server CAST and CONVERT will handle this for you, by default.|||But your example does somewhat resemble a Julian date...|||But your example does somewhat resemble a Julian date...
1938?

or 2038?

But yeah it looks more julian..|||My vote is for 2008, since the Unix epoch is based on 1970.

-PatP|||I'll go with thta...(since I wrote a udf for that one once)...god damn toolbox...got to clean this damn thing out...

Wait a minute...|||i bet there'll be a party or 2 ~3:15 on Jan 19 2038

the end of the world as we know it.

:D|||you've got a julian date converting UDF?

Oooooo...i've wanted to do that but never had a project that required it.

Care to share??
:)|||I wrote one ages ago for military style Julian dates, and just posted it a day or two ago. Check here (http://www.dbforums.com/t1003180.html) for details.

-PatP|||thanks much.

sorry for the thread hijack chunky,
did you get a decent answer for the original post?

perhaps you could post an example of the date string you are dealing with, if not?

Monday, February 20, 2012

Problem converting military time from CHAR column

Hi all,

I have a time column in CHAR(4) format. The contents are stored as 'military time':

1800

1830

2130

I tried using various functions, but was not able to convert to standard time.

I need to take an existing datetime column, strip the time (00:00:00:000), convert the time column to standard and concatonate together to get the following result:

2006-05-31 06:30 PM

Any help would greatly be appreciated.

Thanks.

- gshaf

Your military time conversion wont work because you dont have a colon separating your hours and minutes.

Try this statement:
PRINT CONVERT(varchar(20), CONVERT(varchar(20), GetDate(), 101) + CONVERT(smalldatetime, '21:30'), 0)

Try this one instead, this will add a zero to your hour:


IF LEFT(RIGHT(CONVERT(datetime, '21:30', 109), 7), 1) = '1'
BEGIN
PRINT LEFT(CONVERT(varchar(20), GetDate(), 20), 10) + LTRIM(RIGHT(CONVERT(datetime, '21:30', 109), 7))
END
ELSE
BEGIN
PRINT LEFT(CONVERT(varchar(20), GetDate(), 20), 10) + ' ' + '0' + LTRIM(RIGHT(CONVERT(datetime, '21:30', 109), 7))
END

Which prints out
2006-05-31 09:30PM

Your time column is going to need that colon. Otherwise your military times will not be output properly.

|||

Worked! Just needed to correct the formatting.

Thanks so much Elliot!

- gshaf

Problem converting decimal values

Hi. I I'm importing a text file with lot's of decimal values with this format xx.xx. The problem is that my locale is Portugal and the points are being striped off and are not being considered as decimal separators (for example I have values like 0.04 and in the sql server database i see 4). I have tried to change the locale but i receive a message saying that the locale is not installed in my system.

Any help on this ? tnks in advance
Anyone ? It's a very urgent problem, my deadline is approaching and this problem remains. Do i have to replace the points by dot's ? It's the only solution ?
|||I don't know anything about locales, but I guess if I had this problem I'd read the amounts in as strings and then use a Derived Column component to do the necessary string manipulations and data conversion. Hopefully you don't have a lot of them or you have a convenient asynchronous component (like a Union) where you can drop out the string artifacts. Otherwise, you can do the transformation/conversion and drop the artifacts at the same time using an asynchronous script.
|||

What locale have you tried to use? Where did you set it? English (United States) should be available on your machine.

Thanks.

|||First of all tnks for your answers. Well the problem was indeed very simple, i was setting English as the locale and not English (United States), that's what i call a stupid error ;-). Anyway thank you very much for the help