Valid Query Wont Work As DTS Task???
Jan 23, 2004
i have a query which works fine when i run it from Query Analyzer.
when i try to create a DTS script "Exectute SQL Task", then this SQL does not work within that task, and i dont know why:
ALTER TABLE T_DESCRIP COLUMN EYE varchar(3) NOT NULL
It throws and error that says:
"Error Description: Deferred prepare could not be completed. Statement could not be prepared. Incorrect syntax near the keyword 'COLUMN'.
View 7 Replies
ADVERTISEMENT
Jul 26, 2006
This error is pretty persistent. I re-installed VS 2005 and SQL Server 2005 but did not help. Every time I try to open a Script Task editor it gives me the same error regardless of the project or package. DO I NEED TO REBUILD MY SYSTEM ?
===================================
Cannot show the editor for this task. (Microsoft Visual Studio)
===================================
Specified cast is not valid. (Microsoft.VisualBasic.Vsa.DT)
------------------------------
Program Location:
at Microsoft.VisualBasic.Vsa.Dt.VsaIDE.get_ExtensibilityObject()
at Microsoft.SqlServer.VSAHosting.DesignTime.get_ExtensibilityObject()
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTaskUI.Dispose()
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTaskMainWnd.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
at Microsoft.DataTransformationServices.Design.DtrPackageDesigner.DoDefaultActionForTask(TaskHost task)
-------
Any help is appreciated.
Gulden
.......
View 9 Replies
View Related
Mar 14, 2006
I am trying to prove I can use SSIS to connect to a web service. The WS I am trying to connect to was developed by a vendor and covered by a NDA, but I was able to reproduce the issue with a public WS.
Here are the steps to reproduce the issue:
In the Web Services Connection Manager, I entered http://office.microsoft.com/Research/Providers/MoneyCentral.asmx?wsdl in the URL window. I am able to successfully "test" the connection
I pasted the above link into IE and saved the resulting XML as a .wsdl file on my local machine. In the Web Services Task Editor, General Tab, I specify the path to the .wsdl file and click on "Download WSDL" button. No Issues
When I click on "Input" and select "MoneyCentralRemote" from the drop-down for Service, I receive an error message saying "This version of the Web Services Description Language (WSDL) is not supported"
So the questions are:
Did I perform the above steps correctly?
What WSDL versions are supported in SSIS?
How can I tell what WSDL version was used to create the .wsdl I am trying to access?
If the WSDL is an unsupported version, is there a work-around to fix the issue?
View 3 Replies
View Related
May 22, 2008
I have been trying to get a simple FTP task to work but I seem to be missing something.
I set up the FTP Connection with the FTP Address, username, password and everything. Then I set up the FTP task to send a file and it doesn't want to work. I know that it has something to do with saving the password but I can't seem to figure out how to get it to work.
So, what is the secret to getting this to work??
View 22 Replies
View Related
Jul 25, 2007
Hi,
I have successfully used the ftp task for all my packages, and have never had a problem before.
However, when attempting to download files from a new ftp site today, I am getting a "directory not found" error.
My ftp connection manager is set up correctly, and when I test the connection, it succeeds.
I am also able to ftp to the site using Windows Explorer, and view all the files in the outgoing folder.
My remote path is set up as: /outgoing/*.*
This is the error I'm receiving:
[Connection manager "FTP Connection Manager"] Error: Changing current directory to "outgoing". 550 /outgoing: folder not found .
I really don't understand what the problem is here!
Thanks
View 5 Replies
View Related
May 16, 2014
I have a query that is coming back with all my rows from an "IN" where condition. The problem is that the query in the sub-query is invalid.
I can't recreate it exactly but in the sample here, I don't get any rows back (not sure why they are different) but why am I not getting an error?
IF OBJECT_ID('tempdb..#temp1') IS NOT NULL
DROP TABLE #temp1
IF OBJECT_ID('tempdb..#temp2') IS NOT NULL
DROP TABLE #temp2
CREATE TABLE #temp1
[Code] ...
The "SELECT LastName FROM #temp2" subquery is invalid and if you run it by itself you do get the error.
So why no error when this runs.
The other query is:
SELECT *
FROM Staging ves
WHERE ves.ssn IN ( SELECT ssn
FROM Employee )
There is no "ssn" in the Employee table (it is in a different table), I get 12,000 records back from Staging.
Why would that be the case?
View 3 Replies
View Related
Dec 18, 2012
Using MSSQL 2008 R2
Given the following table
Code:
{ID, PropClass, OffSet, Amount}
{1, 1, 1, .30}
{2, 1, 2, .45}
{3, 1, 3, .50}
{4, 2, 1, .26}
{5, 2, 2, .15}
If I know the exact offset I can query easily enough using PropClass and the exact offset. But what if the offset is not included in the range for a given PropClass? How can I get a query to return the last valid record for a given PropClass from within a join?
For example, if my query contained PropClass = 1 and offset = 4, it should return the Amount of .50 from Record with ID 3
This is a query that I am trying to work on:
Code:
SELECT v.District, v.PropClass, YearAquired, SUM(cost * cnt), SUM(v.Cost * v.Cnt * t.Amount), SUM(v.Tax), COUNT(*)
FROM UPValue v
INNER JOIN UPMaster m on m.Year = v.year and m.Account = v.account
INNER JOIN UPTable T on t.PropClass = v.PropClass and t.Offset = v.Year - v.YearAquired
WHERE v.Year = 2012 and LeaseType = 2
group by v.District, v.PropClass, YearAquired
order by v.District, v.PropClass
Using <= will not work because that would return multiple records from UPTable when the offset is < the max offset.
View 4 Replies
View Related
Feb 26, 2007
I currently have a simple cdosys email task that has been scheduled to send a simple email from ssis. The email is sent using an activex script in a "SQL 2000 DTS Package Task". When executed manually, the email is sent ok. When scheduled (and run under our SQL agent account), it fails. Can anyone point me in the right direction? Is this a permissions issue?
'-- this script seems to cause problems, but only when scheduled --
dim mailer
set mailer = CreateObject("CDO.Message")
dim cdoconfig
const cdoDispositionNotificationTo = "urn:schemas:mailheader:disposition-notification-to"
const cdoReturnReceiptTo = "urn:schemas:mailheader:return-receipt-to"
set cdoconfig = CreateObject("CDO.Configuration")
with mailer
set .Configuration = cdoconfig
.BodyPart.charset = "unicode-1-1-utf-8"
.BodyPart.ContentTransferEncoding = "quoted-printable"
.Fields("urn:schemas:httpmail:importance").Value = 2
.Fields.Update
.Subject = "Notification"
.From = "donotreply@test.com"
.TextBody = "TEST"
.Bcc = "someone@test.com"
.Send
end with
'-------------
Also, since I have several DTS packages that are similar, I'd like to keep these packages in the SQL 2000 dts format, instead of converting them into SSIS format and using database mail.
Any help would be appreciated.
View 2 Replies
View Related
Apr 24, 2006
Source Database: SQL Server 2000
Destination Database: SQL Server 2005
No matter what table, view, or stored proc I pick, it always says that it doesn't exist at the source. I know it exists because I am picking it from the list of tables, etc. that the GUI provides.
Any suggestions?
Jonathan Allen
View 1 Replies
View Related
May 31, 2006
The task has a fault if you try to copy a table with a schema like [test].[table1]
The error says
Error: 0xC002F363 at Flyt til DM, Transfer SQL Server Objects Task: Table "table1" does not exist at the source.
Even though i just selected it from the table list minutes before.
View 7 Replies
View Related
Mar 24, 2008
I used the toolbox to select maintenance cleanup task to create the job to do this. In reading similar notes regarding this problem, some people mentioned that there was a choice to include subfolders. I do not have this choice. When I execute select @@version I get Microsoft SQL Server 2005 - 9.00.3042.00 (X64) Feb 10 2007 00:59:02 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2) . This is running on a cluster. Any idea what is going on here? Thanks.
View 6 Replies
View Related
Oct 3, 2006
I set up the "Send Email Task" succesfully with "SMTP Connection to myExchangeSERVER" using "Windows Authentication"
However, as we all know - you can't have html format for the Send Mail Task. BUT this piece of code straight from MSDN doesnt work for me - each time it pops up this "Mail Sent Succesfully" - but I receive NO freaking EMAILs!!! Am I missing something or is it another one of those Microsoft "gotchas" ?
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Net.Mail
Public Class ScriptMain
Public Sub Main()
Dim htmlMessageTo As String = "me.here@mydomain.com"
Dim htmlMessageFrom As String = "SSIS@mydomain.com"
Dim htmlMessageSubject As String = "SSIS Success - My Package"
Dim htmlMessageBody As String = _
Dts.Variables("User::HTMLtemplateText").Value.ToString
Dim smtpServer As String = "myExchangeSERVER"
SendMailMessage( _
htmlMessageTo, htmlMessageFrom, _
htmlMessageSubject, htmlMessageBody, _
True, smtpServer)
Dts.TaskResult = Dts.Results.Success
End Sub
Private Sub SendMailMessage( _
ByVal SendTo As String, ByVal From As String, _
ByVal Subject As String, ByVal Body As String, _
ByVal IsBodyHtml As Boolean, ByVal Server As String)
Dim htmlMessage As MailMessage
Dim mySmtpClient As SmtpClient
htmlMessage = New MailMessage( SendTo, From, Subject, Body)
htmlMessage.IsBodyHtml = IsBodyHtml
mySmtpClient = New SmtpClient(Server)
Dim myCred As New System.Net.CredentialCache()
mySmtpClient.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials
mySmtpClient.Send(htmlMessage)
MsgBox("Mail sent")
End Sub
View 3 Replies
View Related
Jun 10, 2007
Using Bulk Insert Task extensively in our solution. Everything was working great till we deployed it in stage columns. The database server is different from application servers. We have ASP.NET web services driving SSIS packages on application server. After struggling thru several security issues to get this working (ended up creating an application pool with a domain account) we are now stuck with this problem. On a different note still don't understand what specific security permission is available to domain account that makes it work.
Read in some blog that SQL Server 2005 SP2 Beta had this (Bulk Insert) fixed but not in final production version. Is there a specific reason why this is so?
SSIS and the API is quite easy to work with but associated security and deployment issues are not always clear. A lot of answers seem to be coming from end users - thanks a lot to all for sharing your experiences - sadly not presented clearly in SSIS documentation.
View 2 Replies
View Related
Dec 14, 2006
This problem is a bit weird but I'm just wondering if anybody else experienced this.
I have a package that has file system tasks (copying dtsx files actually). Basically the package copies other packages to a pre-defined destination. Thing is, it only works if one of the packages it is configured to copy has some sort of sensitive data (e.g., a connectionstring with a password), otherwise it reports a success message on execution but doesn't actually do anything. I've checked the forcedexecutionresult and it is set to None for that matter.
Just wondering if anybody else experienced this problem and of course if there's a way to solve it.
Thanks.
View 2 Replies
View Related
Apr 30, 2007
Hello everybody,
I'm developing a report using the following structure :
declare @sql as nvarchar(4000)
declare @where as nvarchar(2000)
set @sql = 'select ....'
If <conditional1>
begin
set @where = 'some where'
end
If <conditional2>
begin
set @where = 'some where'
end
set @sql = @sql + @where
exec(@sql)
I run it in query analyser and works fine, but when I try to run in Reporting Services, Visual studio stops responding and the cpu reaches 100 %.
I realize that when I cut off the if clauses, then it works at Reporting services.
Does anybody know what is happening?
Why the query works in query analyser and doesn't work in Reporting Service ?
Thanks,
MaurĂcio
View 2 Replies
View Related
Jan 3, 2008
Hi,
I have another issue. I have an excel file that I pipe through a "data conversion" task. I have set all the column data types to strings, because there's no way to know beforehand if a particular column will be number or text because the file is very non-standard (it looks more like a formatted report).
After the data conversion, I send all the rows to a script task. In the script task, I do a check on the numeric fields.
for example:
If Not IsNumeric(Row.Price) Then
Row.Price_IsNull = True
End If
However, this check fails each and every time, even if the field contains a number! I don't have this problem when using flat file sources.
So, none of my numeric fields are getting loaded to my ole db destination.
Help, is there a way around this? Or am I forced to just skip this number check altogether? I'd prefer not to.
Thanks
View 10 Replies
View Related
Aug 3, 2004
What I want to do is update 1 table based on data in another. This query works great in Access XP, but I cannot make it work in SQL 2000 sp3. Is there a different way to populate table A with direct data from table B in an update?
Any help is appreciated
UPDATE [Clients - Complete], AssociateDirectory
SET [Clients - Complete].Phone = AssociateDirectory.WorkPhoneNumber
WHERE [Clients - Complete].Name=AssociateDirectory.LastName And [Clients - Complete].FNAME=AssociateDirectory.FirstName;
View 2 Replies
View Related
Jan 28, 2008
hello everybody!
I'm using ssce.
I'm trying to add the followed query in my table adapter but in the query builder (VS), when I choose execute query, I get a couple of textboxes but whatever I type in, I get an error message "The parameter is wrong"
here is the query:
SELECT EntryID, UserInfo, Kind, ActionDate, Span, SalaryAtAction
FROM Logbook
WHERE
((CASE
WHEN @Enter = 0 AND @Exit = 0 THEN 0
WHEN @Enter = 1 AND @Exit = 0 AND kind = '?????' THEN 1
WHEN @Enter = 0 AND @Exit = 1 AND kind = '?????' THEN 1
WHEN @Enter = 1 AND @exit = 1 AND kind IN ('?????', '?????') THEN 1 ELSE 0 END) = 1)
what I try to implement is, a table that one of it's columns is bit datatype. the end-user can filter out the table by these parameters whether to show only the true rows or only the false rows or both.
would you suggest to use a different various of the query?
(a help button is provided on the error message, it refers to ]ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/dv_vdt03/html/f0bf6b59-c245-4340-a869-5d7278fe0ae5.htm in case it helps anybody).
Shimi
View 1 Replies
View Related
Jul 24, 2006
Hi,
I have a query thatI need to make into one query for the sake of an application reading only one cursor.
Here's the syntax:
select (select distinct(x.amount) from escrow k inner join e120 x on k.escrow = x.escrowinner join a10 g on x.escrow = g.escrow where k.ftype = 'S' group by x.amount, g.officer) As New,a.officer as Officer, count(distinct(j.fstatus))as Escrow_Type, count(distinct(j.amount))as Amount, count(distinct(d.open_date))as [Open], count(distinct(d.close_date)) as Closed, count(distinct(can_date))as Cancelled
from a10 a inner join escrow d on a.escrow = d.escrowinner join e120 j on j.escrow = d.escrow where j.id_scr = 'e21' and j.fstatus = 'PAID' group by a.officer
The error message i'm recieving is the following:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Any ideas? any suggestions would be great.
Thanks
View 3 Replies
View Related
Apr 18, 2004
My SQL Query Analyzer just runs the clock but when the clock stops it fails to open the tool. Both my SQL Server 2000 Developer and Enterprise Edition do this. Can anyone suggest how I can get this working? It worked fine in SQL 7.
View 1 Replies
View Related
Dec 6, 2007
select distinct
a.Patients,
b.Patients,
a.pct,
b.pct
from
(
select count(*) as Patients, [pct of res] as pct
from testing
where [18 week wait] <= 18
group by [pct of res]
) as a right outer join
(select distinct[pct of res] from testing) as c on a.pct=c.[pct of res]and a.pct <> 'null' --is not null
(select count(*) as Patients, [pct of res] as pct
from testing
where [18 week wait] >18
group by [pct of res]
) as a left outer join as b on c.[pct of res]=b.pct
View 6 Replies
View Related
Jul 23, 2005
I'm wondering how/why this query works. Trying to get my head wrappedaround SQL. Basically the Query deletes from the Import table allrecords that are already in FooStrings so that when I do an insert fromthe FooStringsImport table into the FooStrings table, then I won't getprimary key violations.DELETE FROM FooStringsImportWHERE EXISTS(SELECT * FROM FooStringsWHERE FooStringsImport.FooKey = FooStrings.FooKey)It seems to work fine, but I'm wondering about how the EXISTS keywordworks.(SELECT * FROM FooStringsWHERE FooStringsImport.FooKey = FooStrings.FooKey)This part is going to return only records from FooStrings correct? Ordoes it do a cartesian product since I've specified more than one tablein the WHERE statement?I wonder if it only returns records in FooStrings, then I don't see howa record from FooStringsImport would "EXISTS" in the records returnedfrom FooStrings.The reason I wondered about the cartesian product is because, if onlyFooStrings is specified in the FROM part of the SELECT statement, thenI was thinking it is only going to return FooString records. Theserecords would then be returned by the select statement to the WHEREEXISTS, which would look for FooStringImport records, but would findnone because the select statement only returned FooString records.I'm guessing maybe because it has to do a cartesian product to evaluatethe WHERE Pkey's equal, then the "SELECT *" just goes ahead and getsALL the fields, and not just those in FooStrings.FooStrings and FooStringsImport are identically structured tables,where the FooKey is set as the primary key in each table:CREATE TABLE [dbo].[FooStrings] ([FooKey] [bigint] NOT NULL ,[Name] [char] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[StartDate] [datetime] NULL ,[EndDate] [datetime] NULL ,[Code] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]GOThanks in advance. I'm so appreciative of the help I've gotten here,as I've been able to write several very useful queries on my own nowafter everyones help and plus lots of reading on my own.
View 4 Replies
View Related
Jul 20, 2005
I am having alot of trouble with a union query Im trying to create.The bizarre thing is I initially created this query and managed tosave it as a viewSELECT ID, DepartureDate, City, Country, Region,fkDepartureAirport, CONVERT(MONEY, Price) AS Price, '1' AS TypeFROM dbo.vHolidayUNION ALLSELECT ID, ValidTo, DestCity, Country, Region, fkDepartureAirport,Price, '2' AS TypeFROM dbo.vFlightHowever when I tried to update the view to this:SELECT ID, DepartureDate, fkCity, City, fkCountry, Country,Region, fkDepartureAirport, CONVERT(MONEY, Price) AS Price, '1' ASTypeFROM dbo.vHolidayUNION ALLSELECT ID, ValidTo, fkCity, DestCity, fkCountry, Country, Region,fkDepartureAirport, Price, '2'FROM dbo.vFlightit comes up with the error: view definition includes no output columnsor includes no items in the from clause.Any ideas??????All suggestions appreciatedAlly
View 1 Replies
View Related
Apr 2, 2008
Hi all,
I have a table with 2 columns (simplified for this question):
Date and Action
Date is normal datetime, Action is varchar and can be either Sent or Received. The data can look like this:
1. '2008-04-02 15:09:09.847', Sent
2. '2008-04-02 15:09:10.125', Sent
3. '2008-04-02 15:09:11.125', Received
4. '2008-04-02 15:09:12.459', Received
5. '2008-04-02 15:09:15.459', Received
6. '2008-04-02 15:09:24.121', Sent
7. '2008-04-02 15:09:28.127', Received
I want to find a pair of rows Sent-Received with the Max Date difference, where Received follows immediately after Sent.
It means in our example, valid are only lines
2. and 3. or
6. and 7.
In this example, rows 6. and 7. have bigger difference of Dates, so the result of the query should be
6. '2008-04-02 15:09:24.121', Sent, 7. '2008-04-02 15:09:28.127', Received
It is probably easy, I just cannot work it out. Suprisingly finding MIN was quite easy. Thanx for any tips!
Regards,
alvar
View 6 Replies
View Related
Mar 26, 2008
I have designed a VB Script in ASP .NET (as that is what I'm used to using) that will look at a specific file at a specific path and send the Last Modified information to a database. Now I would like to move this script to the Script a Task function in SSIS so that I can check before running the rest of the package that the file I want to pull the data from has actually been updated. The ASP .NET code (which does work) is as follows (connection string removed):
<%@ Import Namespace="System.Data.OleDb" %>
<%
Dim objCONN As New OleDbConnection("REMOVED")
Dim objSQL As New OleDbCommand()
Dim strInsert As String
Dim objFilesSystem As Object
Dim objFile As Object
Dim strDate As String
objFilesSystem = CreateObject("Scripting.FileSystemObject")
objFile = objFilesSystem.GetFile("C:Flat_File_Data/Force_Receipt_To_Clear.xls")
strDate = objFile.DateLastModified
strInsert = "1, cast( '" & strDate & "' as datetime ) ) "
objCONN.Open()
objSQL.Connection = objCONN
objSQL.CommandText = "INSERT INTO CTS.dbo.IS_THERE_CHECK VALUES( getdate(), " & strInsert
objSQL.ExecuteScalar()
objCONN.Close()
%>
What follows is as close as I could get in SSIS (I had to set Option Strict to Off). It produces no error, at least not as far as I can tell, nor does it write to the database when run.
Public Class ScriptMain
' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables, events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.
Public Sub Main()
Dim objCONN As New OleDb.OleDbConnection("REMOVED")
Dim objSQL As New OleDb.OleDbCommand()
Dim strInsert As String
Dim objFilesSystem As Object
Dim objFile As Object
Dim strDate As String
objFilesSystem = CreateObject("Scripting.FileSystemObject")
objFile = objFilesSystem.GetFile("C:Flat_File_Data/Force_Receipt_To_Clear.xls")
strDate = objFile.DateLastModified
strInsert = "1, cast( '" & strDate & "' as datetime ) ) "
objCONN.Open()
objSQL.Connection = objCONN
objSQL.CommandText = "INSERT INTO CTS.dbo.IS_THERE_CHECK VALUES( getdate(), " & strInsert
objSQL.ExecuteScalar()
objCONN.Close()
Dts.TaskResult = Dts.Results.Success
End Sub
View 5 Replies
View Related
Nov 23, 2007
Edit: Newer mind. I tested this query more after writing this, and now it seems to work!I hope it continues to work. In following query, else is never executed.CREATE PROCEDURE Put_into_basket( @Product_code varchar(20))ASBEGIN SET NOCOUNT ON;IF NOT EXISTS(SELECT * FROM dbo.t_shopping_basket WHERE Product_code=@Product_code) BEGIN INSERT dbo.t_shopping_basket (Product_code, Name,Price) SELECT Product_code, Name,Price FROM dbo.t_product WHERE Product_code= @Product_code ENDELSE --this part is never executed BEGIN UPDATE dbo.t_shopping_basket SET Quantity=Quantity+1 WHERE Product_code=@Product_code ENDENDGO The query should test if there is a record or row with Product_code=@Product_code. If there is not, that is the first part, one such row is inserted. Quantity has a default value of 1. Insertion works, one row is inserted. At least sort of. If there is already record, That's later part, Quantity is increased by 1. That too works, if ran separately.But when I test query, it never runs the quantity+1 part.
View 3 Replies
View Related
Oct 15, 2014
I am currently stuck on how to make this 2 separate query work together, both work as i want them to individually, please note the syntax is according to a application i use that uses mysql to manipulate columns in an imported csv file.
CONCAT('at-',
REPLACE([CSV_COL(18)],'http://www.homebuy.co.uk/product.php/','')
)
removes last character i.e. /
SUBSTRING([CSV_COL(18)], 1, CHAR_LENGTH([CSV_COL(18)]) - 1)
basically i need these 2 to work together to give me an output like this
at-09fd8903
from the this. URL...url above minus the "" as i said both work on there own, but not together.
View 1 Replies
View Related
Feb 27, 2007
Not sure which forum too put this question
I have recently upgraded my Access Database too use SQL server 2005 using the upsizing wizard. I have selected too use SQL Linked tables instead off the ADP project for ease off conversion. So now the tables are on the SQL server and the queries are still local.
On off my Access forms which returns a datasheet view by accessing the a query is now running really slowly now SQL server is the backend, I was wondering if I can put an index on one of the tables too speed it up, as the query is local too Access will this work? Just wondering if anyone ever come across this.
View 1 Replies
View Related
Apr 23, 2008
I have my db in a pocket pc wm5.0, I just want to make a simple query
select * from table
where pk = '1'
but this doesnt work, if you tried any other field else than the primary key
it works... WHY???
would it be a problem with the sdf file? help please!!!
View 3 Replies
View Related
Nov 8, 2007
Hi all,
I have a script to bulk copy data from my table into textfile. This bcp script will be executed by xp_cmdshell. When I try to execute the scipt inside query windows it returned an error : Error = [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. But when I test the bcp script in command prompt it will execute successfully
Is there any misconfiguration ? (I'm using sqlexpress) thanks in advance.
Best regards,
Hery
View 9 Replies
View Related
Nov 7, 2006
Hello All,
I am trying to run the below query in SSIS, However it does not work, but when I try to run the same query in Oracle client it works fine. Here is the following query:
select 'AAA-'||OWNER AS SOURCE,
table_name,
column_name,
SUBSTR(data_type,1,50) DATA_TYPE ,
SUBSTR(decode(data_type,'NUMBER', DATA_PRECISION, DATA_LENGTH),1,20) DATA_LENGTH
from all_tab_cols
where owner='XXX'
ORDER BY TABLE_NAME, COLUMN_ID
Here ARE the following errorS I get when running from SSIS:
[ORA_AAA_XXX [147]] Error: There was an error with output column "SOURCE" (612) on output "OLE DB Source Output" (157). The column status returned was: "The value could not be converted because of a potential loss of data.".
[ORA_AAA_XXX [147]] Error: The "output column "SOURCE" (612)" failed because error code 0xC0209072 occurred, and the error row disposition on "output column "SOURCE" (612)" specifies failure on error. An error occurred on the specified object of the specified component.
Any help?
Regards,
Raju
View 3 Replies
View Related
Apr 19, 2007
Hi!
Do you know why this query is ok on SQL 2005 and not on SQL ce ??
Code Snippet
DELETE ProfilesGroups
FROM ProfilesGroups pg
INNER JOIN Groups g
ON tpGroupID = g.gId
WHERE pg.tpProfileID = '7df60fae-a026-4a0b-878a-0dd7e5308b09'
AND g.gProfileID = '8a6859ce-9f99-4aaf-9ed6-1af66cd15894'
Thx for help ;-).
PlaTyPuS
View 1 Replies
View Related
Mar 17, 2007
My Table Structure
Category_ID Number
Parent_ID Number <----Category_ID reports to this colum
Category_Name Varchar....
MY QUERY <---I replaced the query above with my data
=============================
WITH Hierarchy(Category_ID, Category_Name, Parent_ID, HLevel)
AS
(
SELECT Category_ID, Category_Name, Parent_ID, 0 as HLevel FROM Dir_Categories
UNION ALL
SELECT SubCategory.Category_ID
, SubCategory.Category_Name,
SubCategory.Parent_ID,
HLevel + 1
FROM Dir_Categories SubCategory
INNER JOIN Hierarchy ParentCategory
ON SubCategory.Parent_ID = ParentCategory.Category_ID )
SELECT Category_ID,
Category_Name = Replicate('__', HLevel) + Category_Name,
Parent_ID,
HLevel
FROM Hierarchy
My OUTPUT============
All the categories under reporting to Parent_ID 0 or continuous, then the ones reporting to 1 and so fourth. Subcategories are not showing within their main categories. I AM GOING NUTS WITH THIS.
Can you help me please?
View 12 Replies
View Related