Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





How To Combine Date And Time Before Import Data?


I have extracted the data from Point of Sales. it has two columns one for date and one for time in the database.
I need to combine both column into single column with the format "mm/dd/yyyy hh:mm:ss" before i import the data into the SQL server for my BI project.

Example: Data extract from Point of Sales
FDATEFTIME
20060114063616
20060115070743
20060116071020

How can i combine those two when i import into SQL server like below:
FDATE
01/14/2006 06:36:16
01/15/2006 07:07:43
01/16/2006 07:10:20

million thanks.




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Combine 2 Columns To Get Date Time
adate atime
08-21-2007 11:09
08-20-2007 16:49
08-03-2007 00:39

I would like to combine adate with atime to get adatetime

View Replies !   View Related
Combine Separate Date && Time Fields Into One Datetime Field?
Good morning.I am importing an XLS file into one of my tables. The fields are:Date Id Time IO12/22/2006 2 12:48:45 PM 912/22/2006 16 5:40:55 AM 112/22/2006 16 12:03:59 PM 2When I do the import, I get the following:Date Id Time IO12/22/2006 12:00:00AM 2 12/30/1899 12:48:45 PM 212/22/2006 12:00:00AM 16 12/30/1899 5:40:55 AM 112/22/2006 12:00:00AM 16 12/30/1899 12:03:59 PM 2Here are my doubts:1. Would it be better to combine the Date & Time fields into onecolumn? If so, how?2. What issues or problems might I have when I program SQL reports, ifI leave the fields as they are?Any comments or suggestions will be very much welcomed.Cheers mates.

View Replies !   View Related
Combine Separate Date && Time Fields Into One Datetime Field?
Good morning.

I am importing an XLS file into one of my tables. The fields are:

Date Id Time IO







12/22/2006
2
12:48:45 PM
9


12/22/2006
16
5:40:55 AM
1


12/22/2006
16
12:03:59 PM
2


When I do the import, I get the following:

Date Id Time IO
12/22/2006 12:00:00AM 2 12/30/1899 12:48:45 PM 2
12/22/2006 12:00:00AM 16 12/30/1899 5:40:55 AM 1
12/22/2006 12:00:00AM 16 12/30/1899 12:03:59 PM 2

Here are my doubts:

1. Is it be better to combine the Date & Time fields into one column? Advantages/Disadvantages?
2. If I don't combine them, should I use varchar or datetime data type?
2. What issues or problems might I have when I program SQL reports, if I leave the fields as they are?

Any comments or suggestions will be very much welcomed.

Cheers mates.

View Replies !   View Related
How Do I Convert A Unix Date/Time Field To A Date When The The SQL DB Stores That Data As Char 11?
Hi there. 
I'm trying to extract data from my SQL server & everything in the script I've got is working (extracting correct data) except for one field - which is for the most part it's off by +2 days (on a few occasions - I see it off by just +1 day or even +3, but it's usually the +2 days). 

I'm told that it's due to the conversion formula - but - since SQL is not my native language, I'm at a bit of a loss.

The DB table has the date field stored as a type: CHAR (as opposed to 'DATE')
Can anyone out there help?

Please advise.  Thanks.

Best.
K7

View Replies !   View Related
Conversion Of Oracle Date Time To Sql Server Date Time In SSIS
This is driving me nuts..

 

I'm trying to extract some data from a table in oracle. The oracle table stores date and time seperately in 2 different columns. I need to merge these two columns and import to sql server database.

 

I'm struggling with this for a quite a while and I'm not able to get it working.

 

I tried the oracle query something like this,

SELECT
(TO_CHAR(ASOFDATE,'YYYYMMDD')||' '||TO_CHAR(ASOFTIME,'HH24:MM : SS')||':000') AS ASOFDATE

FROM TBLA

this gives me an output of 20070511  23:06:30:000

 

the space in MM : SS is intentional here, since without that space it appread as smiley  

 

I'm trying to map this to datetime field in sql server 2005. It keeps failing with this error

The value could not be converted because of a potential loss of data

 

I'm struck with error for hours now.   Any pointers would be helpful.

 

Thanks

View Replies !   View Related
DTS Import Error For Flat File Time Data Into SQL 2000 Datetime Field
The DTS Import Data tool (SQL 2000 sp4) imports time field data from a text file into a table field (with datetime Data Type) using a base date (or zero integer date) of 12/30/1899 rather than the expected value 1/1/1900. Is this a known issue or an error on my part?

My results:

I created the following table structure:

CREATE TABLE [Test] (

[Date] [datetime] NOT NULL ,

[Time] [datetime] NOT NULL ,

[Price] [smallmoney] NOT NULL ,

[Size] [smallint] NOT NULL ,

[DatePlusTime] AS ([Date] + [Time])

) ON [PRIMARY]

GO

I imported the following text file with the DTS Import tool:

Date, Time, Price, Size

12/21/2005, 07:52:27, 1.1926, 1

12/21/2005, 07:52:41, 1.1928, 1

12/21/2005, 07:52:49, 1.1927, 1

Using EM Console Open Table I got the following display:

Date, Time, Price, Size, DatePlusTime

12/21/2005, 7:52:27 AM, 1.1926, 1, 12/19/2005 7:52:27 AM

12/21/2005, 7:52:41 AM, 1.1928, 1, 12/19/2005 7:52:41 AM

12/21/2005, 7:52:49 AM, 1.1927, 1, 12/19/2005 7:52:49 AM

The Time field displayed here would indicate a zero-base date (zero integer) value of 1/1/1900 for the date portion of the data stored in the datetime data type field. However, the DatePlusTime field shows this to be incorrect since Date + Time do not properly combine to the same date. Rather they combine to a date two days earlier.

Using Query Analyzer I got the following display:

Date, Time, Price, Size, DatePlusTime

2005-12-21 00:00:00.000, 1899-12-30 07:52:27.000, 1.1926, 1, 2005-12-19 07:52:27.000

2005-12-21 00:00:00.000, 1899-12-30 07:52:41.000, 1.1928, 1, 2005-12-19 07:52:41.000

2005-12-21 00:00:00.000, 1899-12-30 07:52:49.000, 1.1927, 1, 2005-12-19 07:52:49.000

Sure enough, DTS has converted the text time fields to a datetime value with what appears to be a €“2 integer value (date of 12/30/1899) rather than a 0 integer (date of 1/1/1900). This accounts for the DatePlusTime formula (Date+Time) yielding a date two days earlier than the date field.

As a work-around I could always copy date and time into character fields and use VB to create a proper datetime value for each record. However, I am wondering if there is a more direct fix that I am missing. Would this be a bug with a patch that I missed or is this just an anomaly (known or undiscovered) that I have to live with?

View Replies !   View Related
Data Selection Not Happening For A Date Because Of Time Format
hello all,

i am making a query which select the data again a particuler date.

I insert values in the table for with current date(Today's date) and the records is inserted with the date format(2006-07-14 16:12:09),now when i run the query  after 2 or 3 minutes to select the records inserted today, my query returns no results.

I think it is because of the the time (14:16 in this case) that after 2 minutes, the query looks for the records inserted at (2006-07-14 18:12 or 2006-07-14 19:12) and does not get the result.

Is there a method to not consider the time(14:16) when running the query but the query fetches the records including the records inserted at this time(14:16) no matter at what time I run the query today?

Please anyone help me!

Thanks in advance!

View Replies !   View Related
Combine And Convert A Date?
how do I convert DATEPART(year, GETDATE()) - 1 into a string so I can combine with
'10/1/' to form '10/1/2006'
 

select  '10/1/' + DATEPART(year, GETDATE()) - 1 AS StartDate

View Replies !   View Related
Tricky Schema Question - Dimension Can Split And Combine Over Time
Hi all,I'm working on the schema for a database that must represent data about stock& bond funds over time. My connundrum is that, for any of several dimensionfields, including the fund name itself, the dimension may be represented indifferent ways over time, and may split or combine from one period to thenext.When querying from the database for an arbitrary time period, I need the datato be rolled up to the smallest extent possible so that apples can be comparedto apples. For instance, if the North America region becomes 2 regions, USAand Canada, and I query a time period that spans the period in which thissplit occurred, I should roll up USA and Canada and for records in the periodthat has both, and I should call the result something like "(NorthAmerica)(USA/Canada)" in the output. The client specifies that the dimensionoutput must represent all dimensions that went into the input.Of course, I have to account for more complex possibilities as well, e.g.Fund-A splits into Fund-B and Fund-C, then Fund-C merges into Fund-D producing(Fund-A/Fund-D)(Fund-B/Fund-C/Fund-D)(Fund-B/Fund-D)I can think of several ways to handle this issue, and they're allextraordinarily complex and ugly. Any suggestions?Thanks,- Steve Jorgensen

View Replies !   View Related
How To Convert A Date (date/time) To A Julian Date
In SQL Server 2000:

How do I convert a Julian date to a Gregorian date?

How do I convert a Gregorian date to Julian?

Examples please.

Many thanks in advance.

Gary Andrews

View Replies !   View Related
Import Flat Text File String Date To Database Date
I asked this question below, but the answer was that the conversion will take place automatically, but I can't get that to happen. I have a flat file with an 8 position field that I identify as string (and I also tried date) that is yyyymmdd and it needs to go into the database field that is datetime format. IS there something I am doing wrong with the definition of it, or do I need to add some kind of conversion, and if so, what and how would that be done. I'm a dts Sql2000 expert, but the SSIS thing is driving me crazy. I have a ton of dts' to convert and the migration tool doesn't work because there are a lot of active X scripts in them. thanks for your help. Boston Rose

View Replies !   View Related
Sharepoint Integration With Erroneous Date Format In Date Time Picker
Dear Expert!
 
A server with SQL 2005 sp2, Reporting Services and Sharepoint services (ver 3.0) (in integrated mode) gives an odd error. When viewing a Reporting Services report with a Date Time Picker, the date chosen is wrong. The preferred setting is Danish with the date format dd-mm-yyyy. The date picker shows the months in Danish but when selecting a date, and clicking on the Apply-button, the date reformats to US (mm-dd-yyyy).
 
Example:
When choosing 5th of September 2007 and clicking apply, it shows in the picker, 9th of May 2007.
When choosing 26th of September 2007 and clicking apply, it shows, again in US format, the RIGHT date but adds a timestamp €œ12:00 AM€? in the end, making further enquiries to fail.
 
The report itself receives the right date and shows correctly. The only case it fails is, when the time  stamp appears.
 
The server is a 32-bit one with 4 GB RAM. A testserver with identical collation on the Reportserver database cannot recreate the error. The site containing the reports has been set to Danish in the regional settings. To Reinstall is not an option.
 
The test report has no database connection whatsoever.
 
When setting the site to US, the timestamp won€™t appear at all.
 
The server has been restarted and the installation procedure was of the simple kind. No special tweaks at all.
 
Any advice would be greatly appreciated.
 
Kind Regards
 
Johan Rastenberger

View Replies !   View Related
How To Find Out Date/time When Row Was Updated Last Time
Hello,
we need to track date/time of last update for each record in a table.

As we understand it, we can't use field type Timestamp as this type does
not use dates/times.

Is there any SQL function available which we can bind to a column or
do we really have to use triggers?

Greetings from Mannheim, Germany
Ricardo

View Replies !   View Related
How To Find Out Date/time When Row Was Updated Last Time
Hello,
we need to track date/time of last update for each record in a table.

As we understand it, we can't use field type Timestamp as this type does
not use dates/times.

Is there any SQL function available which we can bind to a column or
do we really have to use triggers?

Greetings from Mannheim, Germany
Ricardo

View Replies !   View Related
Add Time To Datetime Value And Split Into Date And Time
Hi

 

i have the following situation. in my database i have a datetime field (dd/mm/yy hh:mms) and i also have a field timezone.

the timezone field has values in minutes that i should add to my datetime field so i have the actual time.

afterwards i split the datetime into date and time.

the last part i can accomplish (CONVERT (varchar, datetime, 103) as DATEVALUE and CONVERT (varchar, DATETIME, 108) as TIMEVALUE).

 

could anybody tell me how i can add the timezone value (in minutes) to my datetime value ?

i do all the calculations in my datasource (sql).

 

Thanks

V.

View Replies !   View Related
Putting Date Or Date && Time In A Column Thats Going To Be Heavily Used?
Hello,
 
We have a bunch of Audit tables that contain almost exact copies of the operations tables.  The audit tables also include:
 
AuditID - the audit action (insert, modify - old, modify - new, deleted)
AuditDate - date and time of action
AuditUser - User who did it...
 
At the end of the day I need to know for any given record what it looked like at the beginning of the day and what it looks like at the end of the day.  There could have been numerous changes to the record throughout the day, those records I am not interested in.  Only the first record and the last record of a give day.
 
I am going to be doing a lot of MIN(AuditDate) and MAX(AuditDATE) and .. WHERE AuditDate BETWEEN '10/1/2007 00:00:00' AND '10/1/2007 11:59:59' ...
 
Question: Whats better for performance:
 
1. Separating out the date and time and doing a clusterd index on the date.
 
2. Keeping date and time in the same column and just use a normal index.
 
3. Better ideas?
 
Thanks,
Bradley

View Replies !   View Related
Problem With Current Date For Date & Time Field
I have a table named "shift" and I need to setup my query to return only data where the field "startime" = today. The problem I am running into is the starttime field it laid out like "2005-12-29 14:00:00" with different time values. I need to ruturn everything that has todays date regardless of the time value. I tried using GetDate() but that is returning data for other days as well or just data before or after the current time. Does anyone have any suggestions? This is driving me crazy! Thanks, Garrett

View Replies !   View Related
How To Combine OLAP Data With Relational Data
Can anyone point me in the right direction please. I have built a cube with sales data, by week, product and branch. I want to create a report which has the last 5 weeks sales, with the current stock from the main relational database. I can't seem to find any method of doing this. Am I just thick?

View Replies !   View Related
Combine Data In Single Row
SELECT *
FROM dbo.empBenefits q
WHERE (StartDate IN
(SELECT TOP 2 STARTDATE
FROM EMPBENEFITS
WHERE EMPBENEFITS.employeeno = q.employeeno AND Benefitcode = 'HON'
ORDER BY startdate ASC))


I have this select statement working however I need to combine 2 records in a single row in a single table. The unique key is Employee No.

View Replies !   View Related
Combine Data Into One Row, Add Columns
Hey guys,

I realize I've posted something like this before, but i'm confused how to do something new, what I am trying to do is combine rows of data when certain columns equal one another.

For example, I have to sets of data who have in common the columns ctp_code and a mod_code (they are the same) however they have two other columns called billing_amt and amount_owed that need to be added together (literally taking the data and doing the math, so 100.00 + 100.00 = 200.00)


Code:

id ctp_code mod_code billing_amt amount_owed
1 1 1 100.00 100.00
2 1 1 100.00 100.00



My results should be this:


Code:

id ctp_code mod_code billing_amt amount_owed
1 1 1 200.00 200.00



Any help, thoughts?

View Replies !   View Related
Getting Data And Combine Two Column
I have a table Table, there are two set of Number and store in Tel1 and Tel2

I want to get all the number of each reacod that start with '1' on each record, the number I need that may in Tel1 or Tel2, I want to get the result like 'Result' table  how can I do it ?

THX

TableA
+----+-------+-------+
| ID | Tel1  |Tel2   |
+----+-------+-------+
| 1  | 12223 | 92269 |
| 2  | 12269 | 97789 |
| 3  | 96636 | 13369 |
| 4  | 12259 | 97781 |
| 5  | 92889 | 12263 |
+----+-------+-------+


Result
+----+-------+
| ID | Tel   |
+----+-------+
| 1  | 12223 |
| 2  | 12269 |
| 3  | 13369 |
| 4  | 12259 |
| 5  | 12263 |
+----+-------+

View Replies !   View Related
Formatting Date SQL Date To Remove Time
Hi,I need a way of changing the following SQL statement so that the dates are without the hh:mm:ss tt:"Select DISTINCT([StartDate]) From [Events]"How can this be done?Thanks,Curt.

View Replies !   View Related
Date Time Format For Date Parameter
 

Hello,
 
I am using the calender parameter and I need to convert my data date format to the one that matched that is returned on selecting a date from this calender. Can you show me what this format is.
 
how can I convert my existing date format to this format. The existing date format is 2007-07-26 21:27:13.000
 
thank you
Kiran

View Replies !   View Related
Getting Time From Date/time Column
How can I obtain just the time portion from a date/time column?
My data contains "2008-05-19 09:30:00.000"
Actually, all I want/need is the hh:mm part of it.

Thanks,
Walt

View Replies !   View Related
Need To Combine String Data From Multiple Columns Into One Column
When quering a table with given criteria, For ex:

select notes, jobid, caller from contact where status in (6) and jobid = 173
 I am getting this:
 
 


This job will be posted to Monster for 2 weeks.        173           906
Waiting for full budget approval                                  173           906
TUrns out we're uppin                                                    173          906
 
What should I do so that these three columns for the same jobid from the same caller appears in only one column, either separated by a comma or semicolon?
 
Please HELP!!!!!

View Replies !   View Related
SQL Server Import And Export Wizard Fails To Import Data From A View To A Table
A view named "Viw_Labour_Cost_By_Service_Order_No" has been created and can be run successfully on the server.
I want to import the data which draws from the view to a table using SQL Server Import and Export Wizard.
However, when I run the wizard on the server, it gives me the following error message and stop on the step Setting Source Connection
 

Operation stopped...

- Initializing Data Flow Task (Success)

- Initializing Connections (Success)

- Setting SQL Command (Success)
- Setting Source Connection (Error)
Messages
Error 0xc020801c: Source - Viw_Labour_Cost_By_Service_Order_No [1]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "SourceConnectionOLEDB" failed with error code 0xC0014019.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.
 (SQL Server Import and Export Wizard)
 
Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)
 

- Setting Destination Connection (Stopped)

- Validating (Stopped)

- Prepare for Execute (Stopped)

- Pre-execute (Stopped)

- Executing (Stopped)

- Copying to [NAV_CSG].[dbo].[Report_Labour_Cost_By_Service_Order_No] (Stopped)

- Post-execute (Stopped)
 
Does anyone encounter this problem before and know what is happening?
 
Thanks for kindly reply.
 
Best regards,
Calvin Lam 

View Replies !   View Related
Import Data From MS Access Databases To SQL Server 2000 Using The DTS Import/Export
I am attempting to import data from Microsoft Access databases to SQL Server 2000 using the DTS Import/Export Wizard. I have a few errors.

Error at Destination for Row number 1. Errors encountered so far in this task: 1.
Insert error column 152 ('ViewMentalTime', DBTYPE_DBTIMESTAMP), status 6: Data overflow.
Insert error column 150 ('VRptTime', DBTYPE_DBTIMESTAMP), status 6: Data overflow.
Insert error column 147 ('ViewAppTime', DBTYPE_DBTIMESTAMP), status 6: Data overflow.
Insert error column 144 ('VPreTime', DBTYPE_DBTIMESTAMP), status 6: Data overflow.
Insert error column 15 ('Time', DBTYPE_DBTIMESTAMP), status 6: Data overflow.
Invalid character value for cast specification.
Invalid character value for cast specification.
Invalid character value for cast specification.
Invalid character value for cast specification.
Invalid character value for cast specification.

Could you please look into this and guide me
Thanks in advance
venkatesh
imtesh@gmail.com

View Replies !   View Related
Converting Date/time To Just Date?
I have a table that's of type date/time (i.e. 01/01/1900 00:00:00).What I want is to do the following:Say you have these records:person | date-time-------+---------------------------jim | 06/02/2004 00:05:52jim | 06/02/2004 05:06:21jim | 06/02/2004 05:46:21jim | 06/15/2004 11:26:21jim | 06/15/2004 11:35:21dave | 06/04/2004 09:35:21dave | 06/04/2004 11:05:21dave | 06/06/2004 10:34:21dave | 06/08/2004 11:37:21I'd like the results to count how many days and returnperson | days-------+-------jim | 2dave | 3How would I do this?--[ Sugapablo ][ http://www.sugapablo.com <--music ][ http://www.sugapablo.net <--personal ][ Join Bytes! <--jabber IM ]

View Replies !   View Related
Date Part Of Date Time
SELECT ltrim(str(datepart(yyyy,getdate()))) +'-'+
replicate('0',2-len(ltrim(str(datepart(mm,getdate())))))+ltrim(str (datepart(mm,getdate())))+'-' +replicate('0',2-len(ltrim(str(datepart(dd,getdate())))))
+ltrim(str(datepart(dd,getdate())))

This is how i am getting datepart of datetime.Is there any other way to get the date and also time seperately..

Thanks.

View Replies !   View Related
Group By Date But Not Date Time
i have a query
select mydate,lastname from users
group by mydate,lastname

now the only thing is mydate is a datetime fields but i want the results to group by just the date for each lastname entered.
How do i do this?

View Replies !   View Related
Combine Tables From 2 SQL Servers With Different Schemas And Update As New Data Is Entered
 I have 2 SQL server 2000 machines, I need to take a table from each one and combine them together based on a date time stamp.  The first machine has a database that records information based on an event it is given a timestamp the value of variable is stored and a few other fields are stored in Table A.  The second machine Table B has test data entered in a lab scenario.  This is a manufacturing facility so the Table A data is recorded by means of a third party software.  Whenever a sample is taken in the plant the event for Table A is triggered and recorded in the table.  The test data may be entered on that sample in Table B several hours later the lab technician records the time that the sample was taken in Table B but it is not exact to match with the timestamp in Table A.  I need to combine each of these tables into a new SQL server 2005 database on a new machine.  After combining the tables which I am assuming I can based on a query that looks at the timestamp on both Tables A & B and match the rows up based on the closest timestamp. I need to continuously update these tables with the new data as it comes in.  I havent worked with SQL for a couple of years and have looked at several ways to complete this task but havent had much luck.  I have researched linked servers, SSIS, etc Any help would be greatly appreciated.

View Replies !   View Related
Splitting SQL Server Date/Time Column Into Access Date Column And Access Time Column
I have an SSIS package that moves data from SQL Server to an legacy Access database.  In SQL Server, there is a date/time column that I need to split into a separate date column and time column in the access database.  Initially I just created a derrived column for the time and set the expression equal to the source date/time column from SQL Server. Unfortunately, that just makes the date column and time column the same having the full date/time. 

What expression can I use during a derrived column transformation to assign just the date to a derrived column and just the time to another derrived column?
 
Thanks,
 
Steve

View Replies !   View Related
Combine Data And Split Into Separate Txt Files For Each Header/detail Row Groupings
I€™ve created with the help of some great people an SSIS 2005 package which does the follow so far:
 
1)       Takes an incoming txt file.  Example txt file: http://www.webfound.net/split.txt    
 
The txt file going from top to bottom is sort of grouped like this
     Header Row (designated by €˜HD€™)
          Corresponding Detail Rows for the Header Row
           €¦..
     Next Header Row
          Corresponding Detail Rows
 
     €¦and so on  
 
       http://www.webfound.net/rows.jpg
 
2)       Header Rows are split into one table, Maintenance Detail Rows into another, and Payment Detail Rows into a third table.  A uniqueID has been created for each header and it€™s related detail rows to form a PK/FK relationship as there was non prior to the import, only the relation was in order of header / related rows below it when we first started.  The reason I split this out is so I can massage it later with stored proc filters, whatever€¦
 
Now I€™m trying to somehow bring back the data in those table together like it was initially using a query so that I can cut out each of the Header / Detail Row sections into their own txt file.  So, if you look at the original txt file, each new header and it€™s related detail rows (example of a cut piece would be http://www.webfound.net/rows.jpg) need to be cut out and put into their own separate txt file. 
 
This is where I€™m stuck.  How to create a query to combine it all back into an OLE DB Souce component, then somehow read that souce and split out the sections into their own individual txt files.
 
The filenames of the txt files will vary and be based on one of the column values already in the header table.
 
Here is a print screen of my package so far:
 
http://www.webfound.net/tasks.jpg
 
http://www.webfound.net/Import_MaintenanceFile_Task_components.jpg
 
http://www.webfound.net/DataFlow_Task_components.jpg
 
Let me know if you need more info.  Examples of the actual data in the tables are here:
 
http://www.webfound.net/mnt_headerRows.txt
http://www.webfound.net/mnt_MaintenanceRows.txt
http://www.webfound.net/mnt_PaymentRows.txt
 
Here's a print screen of the table schema:
http://www.webfound.net/schema.jpg

View Replies !   View Related
IMPORT New Data Since Last IMPORT - DTS/Stored Procs?
Hello:

I am not sure how to implement the following, but I believe it entails using DTS, and hopefully it is fine that I post it here b/c ultimately I will need this backend data for my frontend .aspx pages:

On a weekly basis, I need to IMPORT some data located on a remote Oracle DB into SQL Server 2k. Since there is so much data to transfer, I would only like to transfer the data that is new to the table since the last IMPORT, i.e. a week ago and leave behin the OLD data.

Is DTS the correct way to go or do I have more control via DTS with STORED PROCEDURES? Does anyone have any good references for me?

On a similar note, once this Oracle data is IMPORTED into a certain table, I would like to EXPORT some of these NEWLY acquired rows matching certain criteria into another table for auditing purposes. For this scenario, should I implement a TRIGGER UPDATE event here on the first table?

Any advice will be greatly appreciated!

View Replies !   View Related
How To Combine Multiple Rows Data Into Single Record Or String Based On A Common Field.
Hellow Folks.
Here is the Original Data in my single SQL 2005 Table:
Department:                                            Sells:
1                                                              Meat
1                                                              Rice
1                                                              Orange
2                                                              Orange
2                                                              Apple
3                                                             Pears
The Data I would like read separated by Semi-colon:
Department:                                            Sells:
1                                                             Meat;Rice;Orange
2                                                             Orange;Apple
3                                                             Pears
I would like to read my data via SP or VStudio 2005 Page . Any help will be appreciated. Thanks..
 
 

View Replies !   View Related
Can't Get A Date... To Import
I am new to this forum, but it looks like you all know your stuff.

We have an Access database that we have attempted to import into SQL server. Everything comes on over fine except for the date fields--we set them to long and all of that--but they all show up offset by two days (+2 from actual or previous unimported value). Any suggestions?

I have posted to several forums but nobody has had any comments. Please help.

--the Desperate Fat Kid

View Replies !   View Related
SQL TIME AND DATE
Hi 
I have created a simple SQL database with four columns using Microsoft SQL Server Mangement Studio Express  - (Name(varchar), Email (varchar), Comment (varchar), Datetime). The idea is for this database to hold feedback and comments from my website by connecting a form view with insert capabilities to this database. How can I configure the Datetime column in the database to automaticaly input the time and date from when the user posted the comment?
 
Thanks

View Replies !   View Related
Date But Not Time
I would like to know how to do a select on a datetime field that will return to me only the Date but not the time. Please help out. Thanks.
I ran through all the built in date functions and couldn't find anything for this task. I still can't fathom why there isn't a date function for this simple but a must have option.
blumonde

View Replies !   View Related
Date/time Or Date And Time
I am setting up an SQL database and I will need to get differences in dates. For example I have a start date, start time, completion date and completion time and I want to get the difference between the start and completion.
Would it be better to have one field with both date and time in it, or better to have a date field and a time field?
Even though I have already started setting up the tables with seperate fields for date and time I am now leaning toward one field with date/time in it. (Only because that is the way I had to do it when setting up an Excel spreadsheet for a similar task)

When that is decided could someone please point me to a good resource for explaining to me the iConvertible method. I tried a simple asp.net page to insert a record into the database and got an error method telling me I had to use the iConvertible method. (I am programming in C#). I use a textbox on a webform to input the date and time information and the SQL database fields are set up as date/time. I looked at the visual studio documentation but that doesn't help me much. It doesn't show me the syntax required and how to "use" the method.
Thanks

View Replies !   View Related
Date/time Bug?
Hi

I've just noticed something unusual happening when entering into a field with a date/time data type.

When entering 31/06/2005 it displays a message saying:-

The value you entered is not consistent with the data type or length of the column.

But if I enter 31/06/05, it changes the value to 05/06/1931.

Is this a known problem with SQL Server?

I did a search on google, but nothing came up.

Thanks

View Replies !   View Related
How Tell Sql To Consider A Value As Date Time
hi
as you know when you want to tell sql to conside a value as STRING, put a " around the value.
i want it for date value, somethin that works like this for me: CONVERT(datetime,'2003-06-07').
in some languages # around the values works, but in sql?

View Replies !   View Related
Next Run Date And Time
Does anyone know how to determine the next run date and time of a scheduled job while the job is running? I have found that using DMO or SPs to find this information while a job is running returns the time the job started. I am not sure but I believe that SQL Server calculates the next run time after the job has been completed if anyone knows to figure this out while a job is running I would greatly appreciate it. Thanks

Keith

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved