How To Get YYYYMMDD Formate
Jul 3, 2007
Hello,
I use
CAST( PYBTHC as varchar(2))+CAST( PYBTHY as varchar(2))+CAST( PYBTHM as varchar(2))+CAST( PYBTHD as varchar(2)) to get a string like 199232. How to get 19920302? What function I can use to pad '0' left when it less than 10>
Thanks
View 7 Replies
Dec 4, 2007
hi,
i need a report formate mention below
the formate should reach 100% as given below
can anybody help me out
i using SQL Reporting Service 2000
Profit and Loss Satement for "California" region
For the fiscal year 2007
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Total
Revenue
Gross Sales
$11,737
$12,655
$11,783
$13,606
$11,787
$13,003
$11,599
$14,932
$12,862
$13,078
$15,285
$16,839
$159,168
Cost of Goods Sold
$0
$0
$0
$0
$0
$0
$0
$0
$0
$0
$0
$0
$0
Total Revenue
$11,737
$12,655
$11,783
$13,606
$11,787
$13,003
$11,599
$14,932
$12,862
$13,078
$15,285
$16,839
$159,168
Net Sales
$11,737
$12,655
$11,783
$13,606
$11,787
$13,003
$11,599
$14,932
$12,862
$13,078
$15,285
$16,839
$159,168
Total Net Sales
$11,737
$12,655
$11,783
$13,606
$11,787
$13,003
$11,599
$14,932
$12,862
$13,078
$15,285
$16,839
$159,168
Expenses
General & Administration
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$14,381
Information System
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$24,709
Marketing
$2,891
$2,891
$2,891
$2,891
$2,891
$2,891
$2,911
$2,911
$2,911
$2,911
$2,911
$2,911
$34,813
Lease
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$13,285
Total Expenses
$7,256
$7,256
$7,256
$7,256
$7,256
$7,256
$7,276
$7,276
$7,276
$7,276
$7,276
$7,276
$87,188
Gross Profit
$4,482
$5,399
$4,528
$6,350
$4,532
$5,748
$4,324
$7,657
$5,587
$5,802
$8,009
$9,563
$71,980
Gross Profit Margin
38.18%
42.66%
38.42%
46.67%
38.45%
44.20%
37.28%
51.28%
43.44%
44.37%
52.40%
56.79%
$5
Expenses / Sales
61.82%
57.34%
61.58%
53.33%
61.55%
55.80%
62.72%
48.72%
56.56%
55.63%
47.60%
43.21%
$7
View 3 Replies
View Related
Apr 19, 2006
Hello,
I have an Excel spreadsheet that contains 100,000 + rows of data. Two of the columns in the spreadsheet are date fields that are sent over in the yyyymmdd format (no separators such as "-" or "/"). I tried converting these fields into dates using the Data Conversion task in SSIS. This doesn't work as it appears that SSIS cannot map a string in the format of yyyymmdd to a valid date. In lieu of this, I have added a Script Component to my transformation which can take the string and convert it to a date value using some Substring() calls on the source yyyymmdd string.
A few questions for the group ...
1. Is this there a more efficient or "better" way of performing this transformation?
2. I can also use OLE DB Command task in my transformation and make a call that might do something like this: select convert(datetime, convert(varchar(10), [@yyyymmddValue])) but how would this perform related to the Script Component task? My guess is that this would be slower since the transformation would make a database call for every record.
3. Are there any plans for the SQL team to make these types of conversions easier to implement in the future? It seems to me that this is a pretty common scenario for integrating date data.
Thanks!
Brian
View 19 Replies
View Related