[SQL Server] Create an SSIS package without tab's in the destination flat file.. |
- Create an SSIS package without tab's in the destination flat file..
- Query Help with Date and Time
- backup permissions??
- can any body explain normalization and types?/
- Count instances across fields by date?
- Unable to run SSIS package built on 2005 under 2008
Create an SSIS package without tab's in the destination flat file.. Posted: 23 Apr 2013 11:08 AM PDT Hi Everyone, Am new to this form am sorry if am rude.I have to create an SSIS package by taking data from the flat file which consists of spaces and tab for example: 102 rtrtr yyutut juuy 6565 in which after 102, 3 blank 3 spaces and 1 tab. rtrtr as 4 spaces and 1 tab between rtrtr and yyutut. In my destination flat file i must get spaces but not tab.Thanks in Advance. |
Posted: 23 Apr 2013 03:18 AM PDT HII am selecting from a table and setting a condition in the "Where" clause on a column that has a time and date stamp. When I use set the condition for a 20 min threshold for the time stamp I get data (which is expected)WHERE c.CTS_LAST_SAVED_DATE > DATEADD(MINUTE,-50,GETDATE()) AND c.CTS_LAST_SAVED_DATE < DATEADD(MINUTE,-30,GETDATE()) and a.APP_LAST_SAVED_DATE > DATEADD(MINUTE,-50,GETDATE()) AND a.APP_LAST_SAVED_DATE < DATEADD(MINUTE,-30,GETDATE()) or a.APP_LAST_SAVED_DATE > DATEADD(MINUTE,-50,GETDATE()) AND a.APP_LAST_SAVED_DATE < DATEADD(MINUTE,-30,GETDATE())But when I remove the 20 min threshold from the clause I get no data at all but I should get more data. Can anyone see what i am missing?WHERE c.CTS_LAST_SAVED_DATE = DATEADD(MINUTE,0,GETDATE()) and a.APP_LAST_SAVED_DATE = DATEADD(MINUTE,0,GETDATE()) or c.CTS_LAST_SAVED_DATE = DATEADD(MINUTE,0,GETDATE())I even tried removing the reference to time altogether and still get no data.WHERE c.CTS_LAST_SAVED_DATE = GETDATE() and a.APP_LAST_SAVED_DATE = GETDATE() or c.CTS_LAST_SAVED_DATE = GETDATE()Doug |
Posted: 23 Apr 2013 02:03 AM PDT We have SQLExpress on one of our production servers. A lot of the information is sensistive so our server team had to lock it down pretty good. I had batch jobs running the nightly backups which were cut off because I needed to add the NetworkService account to the backups folder in the directory we chose. After I did that the Task scheduler is able to run the backup...here's where I'm a little confused... If I log onto the instance in ssms using the backup login I created and run a backup script to the backup dir... it runs fine and the backup is placed in the right spot. If I run the job from task scheduler or just the batch I created (which is using the same exact script as I am using in ssms) the backup runs fine, processes the same amount of pages as in ssms but the backup size is about half of what it is from ssms? Am I just missing permissions somewhere? |
can any body explain normalization and types?/ Posted: 22 Apr 2013 06:50 PM PDT can any body explain normalization and types? |
Count instances across fields by date? Posted: 22 Apr 2013 10:12 PM PDT I need to search a table and count instances of a particular string across multiple fields by date, I've used the following Dynamic SP in the past to look through fields and was hoping I could adapt it. I've tried different ways to change it to Count with no success, or am I barking up the wrong tree and this isn't the way to do it? I would like to keep it Dynamic so I don't have to specify field names as I may use this on other tables.[code]declare @TmpName as varchar (2000)declare @TmpName1 as varchar (2000)declare @sdate as varchar (20)declare @svar as varchar (2000)declare @CMD Nvarchar(100)declare @Status1 as varchar(2000)declare @sSearchterm as varchar(50)set @sSearchterm = '%something%'set @sDate = '29/Apr/2013'DECLARE CUR1 CURSOR FAST_FORWARD FORselect COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'resource' OPEN CUR1 FETCH NEXT FROM CUR1 INTO @TmpName WHILE (@@FETCH_STATUS = 0) BEGIN SET @CMD = 'SELECT @Rtn = [' + @TmpName + '] from [resource]' + ' where [date] = ''' + @sDate + '''' exec sp_executesql @CMD,N'@Rtn varchar (200) out',@Status1 out print @Status1 FETCH NEXT FROM CUR1 INTO @TmpName END CLOSE CUR1 DEALLOCATE CUR1[/code] |
Unable to run SSIS package built on 2005 under 2008 Posted: 22 Apr 2013 08:20 PM PDT I hope Im on the right forum for this, if not please point this out to me.I have migrated a website from one server to another.On this new webserver SQL server express 2008 is installed.The website on the frontend works fine.However, the backend of the website contains some functionality with which one can upload a .csv-file to import some data into the database by running an SSIS package.Since the migration of the website to the new server this results in the following exception:"Retrieving the COM class factory for component with CLSID {BA785E28-3D7B-47AE-A4F9-4784F61B598A} failed due to the following error: 80040154"The cause of this problem, according to numerous sources, is the fact that this package was built under SQL Server 2005 and that its missing some Class with the above classGuid.Apparantly these were all renamed in SQL Server 2008.I have installed SQL Server 2005 on the said webserver, but the error persists. It seems that the .dll needed still isnt installed with SQL Server 2005.Also i have created a database running on SQL Server 2005 and created a second version of the website which uses that database. But still this does not resolve the problem.Can somebody please help me?Thanks in advance. |
You are subscribed to email updates from SQLServerCentral / SQL Server 2008 / SQL Server Newbies To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment