Accessing Data From Basic SQL Select * From TableName WHERE Search Params
Nov 5, 2007
I am learing VWD as I build a site and while I can use the various controls (GridView, FormView) to set up operations and retrieve/display database information, I need to be able to codebehind to do SQL operations for retrieving data to fill paper forms and to modify the database. After I retrieve data from the database, I need to do a lot of computation befor I build a paper quote that is emailed to a customer. I have written a subroutine to which I pass my sql query statement and I can add a new entry and edit an existing entry. The problem is a simple query to read an existing database entry.
If I write a simple command : Cmd = SELECT PartNumber, PartName, PartsAvailable FROM Inventory WHERE PartNumber = "P7226" , the command is executed but the return data falls on the floor somewhere as I dont know how to code to put the results in an array or in fact, have any idea on how to find the returned data. Can anyone help with this simple(?) problem? My sub that handles the sql command is shown below.
I have also been looking for the way to code in VB to cause existing controls like GridViews to access, edit, and insert but I havent been able to find a paper or tutorial. If anyone has seen this information, it would be helpful also.Protected Sub CallSQL(ByVal Cmd As String)
Dim conn As New SqlConnection("Data Source=.SQLExpress;AttachDbFileName=C:Documents and SettingsaMy DocumentsVisual Studio 2005WebSitesWebSite5App_DataPINEMgt.mdf; Integrated Security=True;Connect Timeout=30;User Instance=True") 'Data Source=.SQLEXPRESS;AttachDbFilename="C:Documents and SettingsaMy DocumentsVisual Studio 2005WebSitesWebSite5App_DataPINEMgt.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True)Dim sql As String = String.Empty
sql = Cmd
'Open the connection to the database and execute he SQL
conn.Open()Dim command As New SqlCommand(sql, conn)
command.ExecuteNonQuery()
conn.Close()
End Sub
View 6 Replies
ADVERTISEMENT
Mar 25, 2008
I have a set of reports that run just fine with the default parameters (Country = US). The report returns data within 60 seconds. However, if I change the default parameters, say to Country = UK, the report will run and won't seem to stop. The user will be prompted every few minutes to relogin to the domain (which they are not prompted when they first run the report). On the server, the report is taking up 1 of the four CPU's and is using a huge amount of disk paging.
Here's the kicker. If I go in, change the default parameters to Country = UK and deploy the report, it will run in 60 seconds with the new default parameters. Now I try to run the report by changing the country = US and it locks up when it is executed.
Anybody run into something like this?
Rob
View 5 Replies
View Related
Apr 4, 2008
Hi to all , I write the query like belwodeclare @userid nvarchar(20)set @userid ='6,8'print @useridselect * from user_master where user_id in (@userid)Here user_id is int datatype, when i execute this query then meet the error as 6,8Msg 245, Level 16, State 1, Line 4Syntax error converting the nvarchar value '6,8' to a column of data type int. How to do this.? Anybody answer me,...
View 5 Replies
View Related
Feb 19, 2001
hi all how are you today i am not good because i can't set this variable in this query please read this thanks
create table aaa1 (id_no int, name varchar(20))
go
create table aaa2 (id_no int, name varchar(20))
go
insert into aaa1 values (1,'rahmi')
insert into aaa1 values (2,'atilganer')
insert into aaa1 values (3,'hasan')
insert into aaa2 values (4,'rahmi')
insert into aaa2 values (5,'atilganer')
insert into aaa2 values (6,'hasan')
/* declaring any numeric variable*/
declare @id_no_var int
/* and set variable to max table name's (aaa2 table in this example)
id_ no column*/
set @id_no_var =
(select max(id_no) from
(select max(name) insqlhelp from
sysobjects where name like 'aa%') insqlhelp2 )
this query return:
Server: Msg 207, Level 16, State 3, Line 3
Invalid column name 'id_no'.
this error returned in second
View 1 Replies
View Related
Feb 19, 2001
hi all how are you today i am not good because i can't set this variable in this query please read this thanks
create table aaa1 (id_no int, name varchar(20))
go
create table aaa2 (id_no int, name varchar(20))
go
insert into aaa1 values (1,'rahmi')
insert into aaa1 values (2,'atilganer')
insert into aaa1 values (3,'hasan')
insert into aaa2 values (4,'rahmi')
insert into aaa2 values (5,'atilganer')
insert into aaa2 values (6,'hasan')
/* declaring any numeric variable*/
declare @id_no_var int
/* and set variable to max table name's (aaa2 table in this example)
id_ no column
note :insqlhelp and insqlhelp2 is an alias for tablename query (recommended from sql help
*/
set @id_no_var =
(select max(id_no) from
(select max(name) insqlhelp from
sysobjects where name like 'aa%') insqlhelp2 )
this query return:
Server: Msg 207, Level 16, State 3, Line 3
Invalid column name 'id_no'.
this error returned because max(id_no) column is absent
if you are run
select * from
(select max(name) insqlhelp from
sysobjects where name like 'aa%') insqlhelp2
this query return that
insqlhelp ---------------
aaa2
(1 row(s) affected)
this mean that my table name query returned table name but i cant use this name in any other query (i think because of daclaring alias "insqlhelp, insqlhelp2")
other way is
set to any other text variable to table name,
and concetanate to query,
and execute with exec
but in this way you cant set to my int variable
please help me thanks for all
hra
View 1 Replies
View Related
Jul 23, 2005
Hi all,I have an existing application that checks a few things before itlaunches another application. One thing that the application needs tocheck is the subscription properties of both the local database and theremote (LAN) server.I've stumbled upon some properties but I am trying to fit in the lastones and I can't seem to find the right code to accomplish this... Cananyone shine a little light on this please ?The following code queries the SQL Server (remote) to get (some of) theproperties of the replicated database. What I would like to fit inafter the 'state' are the properties that you can retrieve with theEnumAllSubscriptions function. However, I can't seem to find the rightobject (sample code) to retrieve those (or I'm just overlooking theobvious)...Here is (part of) the code I'm using to query the publication on theremote server :Dim oMergePublication As SQLDMO.MergePublication2Dim oSubscription As SQLDMO.MergeSubscription2Me.lstPublications.ClearFor Each oReplicationDatabase InobjSQLSERVER.Replication.ReplicationDatabasesIf oReplicationDatabase.Name = Me.txtSQLServerDatabase.TextThenFor Each oMergePublication InoReplicationDatabase.MergePublicationsbFoundReplicated = TrueMe.lstPublications.AddItem "Database replicated as'" & oMergePublication.Name & "'"For Each oSubscription InoMergePublication.MergeSubscriptionsMe.lstPublications.AddItem " - subscriber:" & oSubscription.SubscriberMe.lstPublications.AddItem " - localDB :" & oSubscription.SubscriptionDBMe.lstPublications.AddItem " -state :" & GetReplStatus(oSubscription.Status)NextNext'For Each osubscriber In oReplicationDatabase.'NextEnd IfNextSet oReplicationDatabase = NothingSet oMergePublication = NothingAfter this, I also want to check the local DB (=pulled subscription)and show some of the properties (from EnumAllSubscriptions). Forexample to warn the user about the need to synchronise (last_updatedvalue)...Any help appreciated,Many thanksGB--Your eyes are weary from staring at the CRT. You feel sleepy. Noticehow restful it is to watch the cursor blink. Close your eyes. Theopinions stated above are yours. When I snap my fingers, you cannotimagine why you ever felt otherwise. <snap>
View 2 Replies
View Related
Sep 19, 2007
I have a stored procedure that accepts the table name as a parameter. Is there anyway I can use this variable in my select statement after the 'from' clause. ie "select count(*) from @Table_Name"?
When I try that is says "Must declare the table variable @Table_Name". Thanks!
View 1 Replies
View Related
Aug 30, 2000
Hi all.
I want something like this :
create proc myProc ( @num int ,@name varchar(80))
as
select @num = max(field1) from @name
but there is a problem that the @name is a varchar and the error is :
Server: Msg 170, Level 15, State 1, Procedure sp_myProc, Line 3
Line 3: Incorrect syntax near '@name'.
I tried
select @num = max(field1) from object_id(@name)
and the error was the same
is ther another way than :
exec ("declare @num int select @num = max(field1) insert into anotherTable values( @num) " ) ?
thx
Eyal Peleg
View 1 Replies
View Related
Aug 7, 2007
I have a stored proc that I'm using to run a report. It works fine, but currently I'm using a parameter that is a single selection from a dropdown. I'd like to use multi select, but have not been able to get it to work.
In the data tab I'm currently using "text" for command type and :
Code Snippet
declare @sql nvarchar(2000)
set @sql = '
EXEC [Monitor] '' + @p_OfferStatus + '''
exec sp_executesql @sql, N'@p_OfferStatus VARCHAR(100)', @p_OfferStatus = @p_OfferStatus
when I run this in the data tab, it works fine, returning data, but when I try to preview it it tells me there are syntax errors. Anyone know the correct way to use multi selects with stored procs?
View 4 Replies
View Related
May 15, 2005
I have a stored procedure that I use to return Purchase Orders from our PO system. It returns the data rows for PO's that match the criteria passed in (including the page to show etc.) + it returns two output params, Number of rows and Number of Pages.
Using query analyzer I can confirm the query works exactly as we want. I cannot however seem to get the data out to our ASP.net app.
Here is a function that I use in one of my classes:
<code>
Function fnListPOsByCoordinatorIDPaged(ByVal strCoordinatorID As String, ByVal intPOStatusID As Int16, _
ByVal intUserTypeID As Int16, ByVal intArchived As Int16, _ByVal intPageNum As Int32, ByVal intPerPage As Int32, _ByVal strConn As String) As SqlClient.SqlDataReader
Dim dr As SqlClient.SqlDataReader
SqlConnection1.ConnectionString = strConn
prListPOByCoordinatorPaged.Parameters("@CoordinatorID").Value = strCoordinatorIDprListPOByCoordinatorPaged.Parameters("@POStatusID").Value = intPOStatusIDprListPOByCoordinatorPaged.Parameters("@UserTypeID").Value = intUserTypeIDprListPOByCoordinatorPaged.Parameters("@Archived").Value = intArchivedprListPOByCoordinatorPaged.Parameters("@PageNum").Value = intPageNumprListPOByCoordinatorPaged.Parameters("@PerPage").Value = intPerPage
SqlConnection1.Open()dr = prListPOByCoordinatorPaged.ExecuteReader(CommandBehavior.CloseConnection)
Me.Pages = prListPOByCoordinatorPaged.Parameters("@Pages").ValueMe.Rows = prListPOByCoordinatorPaged.Parameters("@Rows").Value
If Me.Rows / intPerPage > Me.Pages Then Me.Pages = Me.Pages + 1End If
Return dr
prListPOByCoordinatorPaged.Dispose()SqlConnection1.Close()SqlConnection1.Dispose()
End Function
</code>
It does not crash, it returns my data reader with the correct records. Unfortunately my property values are returned as 0. They should have values.
Anyone know how to do this?
Thanks.
View 1 Replies
View Related
Feb 19, 2007
Hello experts,
I am trying to create a report including a subreport in VS.2003 Reporting services. The subreport itself runs properly, if I give it a parameter, but when I try to run the main (parent) report, I get the obvious message Subreport could not be shown.
The output windows returns a message:
The value expression used in textbox €˜AccountID€™ returned a data type that is not valid.
The AccountID field is a system.guid. I tried to "cast" it as a text, but I got another error message that the system.guid cannot be explicitly converted.
Does anyone know how to get around this?
Thank you very much.
Ravie.
View 1 Replies
View Related
Apr 25, 2007
I have an sql data source..select command is something like this.
Select password from users where username = Username.Text
how can i retrieve the password value and save it into a string?! to make a comparison between password value and a textbox Password.Text
i know its a silly question but i took me long time and i still can't find the ans
View 3 Replies
View Related
Aug 1, 2001
Hi,
I'm new to SQL and learning, so please forgive my question....
I have two tables; Authors and Books with the fields as shown below. Each author will have 1 or more books listed in the Books table.
I need a SELECT statement that will GROUP all authors and return 1 record per author with the LAST published book fields for each author (most recent PubDate) from the Books table. All fields on both tables should be returned:
AuthorID, FullName, Country, BookID, BookName, PubDate
Can anybody help me w/ this?
Thanks in advance!!!!!!!!!
George.
Authors
=======
AuthorID
FullName
Country
Books
=======
BookID
AuthorID
BookName
PubDate
View 7 Replies
View Related
May 26, 2008
Hello All,
I have what i believe to be a pretty basic SQL question. I have 2 tables, One called participant, and another called cnAvailableParticipant_List they are related with a field called userid I would like to select the firstname, lastname, userid, fields from the participant table and the dnnuserid field from the cnAvailableParticipant_List table where the users have a record in the participant table but do NOT have a record in the other table. Basicially i want to select all the users who are essentially not checked in. So far i have:
SELECT p.ParticipantID as ID, p.FName as FName, p.LName as LName, ap.DNNID FROM Participant p, cnAvailableParticipant_List ap
WHERE
ORDER BY LName, FName
can someone explain to me what i need in the where clause and why. I don't just want the answer, i would like to know why it works the way it does as well. Sorry for the basic question but im new to SQL
Thanks all help is appreciated,
John
View 7 Replies
View Related
May 1, 2007
Basically, im being asked Which is the maximal budget of projects in which employee 'John Smith' is involved?
I got a nested query done kinda right, like this
Select max(Budget)
From aProject
Where (aProject.Pid = (
Select Pid
From aWorks_For
Where aWorks_For.Eid = (
Select Eid
From aEmployee
Where Ename = 'John Smith')))
But when an employee is working on more then one project I get this error
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Heres my Create Table Statements
Any help would be appreciated
CREATE TABLE EMPLOYEE ( EId INT, EName VARCHAR(20), Salary INT, PRIMARY KEY (EId) )
CREATE TABLE WORKS_FOR ( EId INT, PId INT, PRIMARY KEY (PId, EId) )
CREATE TABLE PROJECT ( PId INT, PName VARCHAR(20), Supervisor VARCHAR(20), Budget INT, PRIMARY KEY (PId) )
View 11 Replies
View Related
May 2, 2004
If I want to select certain values from a table where date is equal to something and the second field is null,would I go.
select * from table where date = 'something' and Sent = null or something else because if I do it this way I get nothing as a result but if I scroll down I can see that I have null values.
thanks
View 4 Replies
View Related
Mar 29, 2008
Hi - I'm short of SQL experience and hacking my way through creating a simple search feature for a personal project. I would be very grateful if anyone could help me out with writing a stored procedure. Problem: I have two tables with three columns indexed for full-text search. So far I have been able to successfully execute the following query returning matching row ids: dbo.Search_Articles @searchText varchar(150) AS SELECT ArticleID FROM articles WHERE CONTAINS(Description, @searchText) OR CONTAINS(Title, @searchText) UNION SELECT ArticleID FROM article_pages WHERE CONTAINS(Text, @searchText); RETURN This returns the ArticleID for any articles or article_pages records where there is a text match. I ultimately need the stored procedure to return all columns from the articles table for matches and not just the StoryID. Seems like maybe I should try using some kind of JOIN on the result of the UNION above and the articles table? But I have so far been unable to figure out how to do this as I can't seem to declare a name for the result table of the UNION above. Perhaps there is another more eloquent solution? Thanks! Peter
View 3 Replies
View Related
Aug 9, 2006
This is more of a basic SQL question rather than anything specific for T-SQL, but I assume someone here can help me...
I have a problem with properly combining a lot of AND and ORs in a SELECT statement in a stored procedure in order to get the desired results. The problem is that I want to have all results that fullfill all of the supplied conditions: InstitutionCode, CollectionCode, ScientificName, Locality (unless they are null, hence 'coalesce') and the Parentid, that can be in one of eight columns.
SELECT * FROM QueryView WHERE InstitutionCode = COALESCE(@museum, InstitutionCode) AND CollectionCode = COALESCE(@collection, CollectionCode) AND ScientificName LIKE '%' + @binomen + '%' AND Locality LIKE '%' + @locality + '%' AND ParentID1 = COALESCE(@taxparent, ParentID3) OR ParentID2 = COALESCE(@taxparent, ParentID2) OR ParentID3 = COALESCE(@taxparent, ParentID3) OR ParentID4 = COALESCE(@taxparent, ParentID4) OR ParentID5 = COALESCE(@taxparent, ParentID5) OR ParentID6 = COALESCE(@taxparent, ParentID6) OR ParentID7 = COALESCE(@taxparent, ParentID7) OR ParentID8 = COALESCE(@taxparent, ParentID8)
The current construction, however, gives me all results that fullfill either on of the four conditions, or the parentid in one of the columns. putting parentheses around parentid part gives me zero query results. I understand that the ORs should be restricted to the parentids and not the rest, but putting parentheses around parentid part gives me zero query results.
Has anyone got a good tip to help me resolve this puzzle?
View 6 Replies
View Related
Jul 17, 2007
Hi! I am trying to do something that I would think should be rather simple.I have a SQLDataSource that has a simple select statement.I have a String Variable st_tempI know my SQLDataSource returns only one value, and it's a string.HOW DO I DO somehitng like st_temp=SQLDataSource.Select;I am getting nothing but errorrs Thanks in advance Dan
View 4 Replies
View Related
Aug 19, 2005
Hi,I feel stupid for posting this question but I cannot find out how to create an SQL statement to return records that have been added today.My database table has a field called calldate which hold the date and time of the record added to the database i.e. "02/08/2005 16:55:41".Please can someone let me know how I can search to find all records added today. I thought it would be something like it, but I assume I need to format the calldate so it's just 02/08/2005.Select *From TableWhere CallDate = GetDate()ThanksBrett
View 9 Replies
View Related
May 18, 2004
Hi,
Can anyone tell me how to access the results from a select statement within the stored procedure?
This is to implement auditting functionality, before updating a record i want select the original record and compare the contents of each field with the varibles that are passed in, if the fields contents has changed i want to write an audit entry.
So i'd like to store the results of the select statement in a variable and access it like a dataset. e.g
declare selectResult
set selectResult = Select field1,field2,field3 from table1
if selectResult.field1 <> @field1
begin
exec writeAudit @var1,@var2,var3
end
Many thanks.
View 4 Replies
View Related
Jun 20, 2007
I've found example code of accessing an SQLDataSource and even have it working in my own code - an example would be Dim datastuff As DataView = CType(srcSoftwareSelected.Select(DataSourceSelectArguments.Empty), DataView) Dim row As DataRow = datastuff.Table.Rows(0) Dim installtype As Integer = row("InstallMethod") Dim install As String = row("Install").ToString Dim notes As String = row("Notes").ToString The above only works on a single row, of course. If I needed more, I know I can loop it.The query in srcSoftwareSelected is something like "SELECT InstallMethod, Install, Notes FROM Software"My problem lies in trying to access the data in a simliar way when I'm using a SELECT COUNT query. Dim datastuff As DataView = CType(srcSoftwareUsage.Select(DataSourceSelectArguments.Empty), DataView) Dim row As DataRow = datastuff.Table.Rows(0) Dim count As Integer = row("rowcnt") The query here is "SELECT COUNT(*) as rowcnt FROM Software"The variable count is 1 every time I query this, no matter what the actual count is. I know I've got to be accessing the incorrect data member in the 2nd query because a gridview tied to srcSoftwareUsage (the SQLDataSource) always displays the correct value. Where am I going wrong here?
View 6 Replies
View Related
Feb 5, 2007
is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.
I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?
I expect to set up a username for each database as i setup new customers.
View 1 Replies
View Related
Aug 7, 2015
I have an MVC asp.net application that stores many records in a table on sql server, in its own system. Â used the system for 2 months, worked fine accessing, changing data.
Now that other users are logging in? there is cross coupling going on. Â one user gets the data from another users sql search.
In the mvc app it had used the get async method to read the ID record from the db, i set that to synchronous. Â no effect; Â the user makes their own login id but that does nt matter either.
View 8 Replies
View Related
Sep 18, 2000
I'm a newbie to database work so please bear with me.
I am currently developing a system, that will exchange data between my web site and a third parties systems. We are essentially exchanging a lot of name / value pairs. I need to specyfy the data type for these values. Could someone explain when I use a Char and when I use a Varchar. Also what are the basic rules for defining data types or where I can find further information.
Thanks
Dan
View 1 Replies
View Related
Nov 21, 2001
I'm using a 'searched case' however I don't care which method I use.
I'm open to using anything....
I just want to correct a problem in my pivot table where I need to create a ficticous eventdate for 'S' records, those that do not have an event date in the past 7 days.
-- eventdate is a datetime column
select User
,res =
case res --event result
when 'S' then '0' --S generic non-event
when 'SUC' then '1' --successfull event
end
,eventdate =
case eventdate
when enventdate < getdate()-8 then getdate()-8
end
from eventlog_1 --my view of events
Server: Msg 170, Level 15, State 1, Line 8
Line 8: Incorrect syntax near '<'.
TIA
JeffP...
View 2 Replies
View Related
Jun 12, 2007
I have novice level visual basic knowledge using Visual Studio 2005 and have little knowledge of SQL using SQL express. I am attempting to create a SQL database which initially consists of a single table bound to a Visual Basic form for data entry. So far I have been able to bind a VB form to a SQL database creating a DataSet, DataAdapter, and utilizing the default binding navigator. I also seem to have functioning Stored Procedures.
The VB form is able to add data to the SQL table and I can toggle through the data while the VB app is running but when I terminate the app and load it again all newly added data is not available from the SQL table.
I have seen other strings on this subject and viewed many tutorials but they only bring me as far as I am. None of them address the concept of permanently committing data to SQL from the VB form. FYI€¦data entered manually into the SQL table is stored, just not data from the form.
Does anyone have any idea what is wrong?
View 4 Replies
View Related
Nov 30, 2015
I have a table name like "WebSearchPage" which contains near about 16 millions records and structure is likeID,  PID, Pagename, Title, MetaDesc, Meta Keyword, BodyDesc..Now I have a input parameter a "Keyword" which can be single or multiple words("Cricket/international cricket").Now I have to check if that input "keyword" is exists in any column(Pagename, Title, MetaDesc, MetaKeyword, BodyDesc) from "WebSearchPage" ..then I have to select that row..
View 3 Replies
View Related
Aug 9, 2006
I'm just wonder if this is a bug in MS Search or am I doing something wrong.
I have a query below
declare @search_clause varchar(255)
set @Search_Clause = ' "hepatitis b" and "hepatocellular carcinoma"'
select * from results
where contains(finding,@search_clause)
I don't get the correct result at all.
If I change my search_clause to "hepatitis" and "hepatocellular carcinoma -- without the "b"
then i get the correct result.
It seems MS Search doesn't like the phrase contain one letter or some sort or is it a know bug?
Anyone know?
Thanks
View 3 Replies
View Related
Apr 27, 2015
Make a few simple pages to enter data into multiple tables in my SQL DB.
I have the DB designed and IIS setup but I am trying to wrap my head around the php connection to the DB and then relating the tables/columns in the "Input" page.
After this is done I will use SRS to use these entries to show reports hourly.
View 4 Replies
View Related
Nov 13, 2007
Hi
I am developing a program on Visual Basic 2005 to a pocket pc, I want to make the SQLceconnection but It says that the file doesn´t exists, I use this code:
Dim conn As New SqlCeConnection()
Dim Recordset As SqlCeDataAdapter
Dim SQL As String
Dim ds As New DataSet
conn.ConnectionString = _
"Data Source = '.BDDclimatologicos.sdf';"
conn.Open()
SQL = "select [Provincia] from ZonasClimaticas"
Recordset = New SqlCeDataAdapter(SQL, conn)
Recordset.Fill(ds, "ZonasClimaticas")
lstboxProvincias.DataSource = ds.Tables("ZonasClimaticas").DefaultView
I have Dcilmatologicos.sdf on a folder named BD next to the folder of the executable, I don´t know what happends.
My database has one table "ZonasClimaticas" and a column named "Provincia" on that, my other question is:
Is this the right code to show that column on a listbox?
Thank you very much!
View 4 Replies
View Related
Jun 7, 2007
In DTS 2000 I had a situation where I had a text file as input source and text file as output source. On migrating the package to 2005 it puts a wrapper around it which executes it as a 2000 package, the rest of the tasks are neatly converted to 2005 style tasks. I presume this to mean that this will not be supported through to the next version, and there is no direct equivalent in 2005.
My question is how do I import a non-flat file source which has different numbers of columns per line. I did ,somehow, manage to do this with 2000 but cannot seem to get anywhere with 2005.
The flat file source seems to be expecting a common number of columns and just can't seem to cope with no column delimiters on some lines. If anybody knows different I would be glad to hear about it.
Raw data is not helpful to me as only works with a specific raw type (apparently)
Went onto Bulk Insert Task but got this message
[Bulk Insert Task] Error: An error occurred with the following error message: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.Bulk load: An unexpected end of file was encountered in the data file.".
Have already browsed with this on web but only find comments about changing timeout setting.
Can find timeout settings in DataFlow source and DataFlow destinations but not in Bulk Insert Task.
As you can see this is a long and protracted question.
If the answer is simple I apologise if not blame Microsoft. Other than that have found SSIS has some nice improvements, apart from the odd vague error message I keep coming across.
View 13 Replies
View Related
Feb 28, 2008
Hi ALL,
How could you make the SQL Select statement query case sensitive, what i mean is i have this select statement below ...
Select * From Staff WHERE Staff.Staff_ID = 'KabirJ' AND Staff.Password = 'KaBir1!'
and a data row in the staff table that is the following information
Staff_ID Password
Kabirj kabir1!
Since the cases in database is different then in the string provided, i want sql to return me nothing, How do i go about and achieve that???????????
Thanks
Kabir
View 2 Replies
View Related