|
Hello friends
i have a doubt pls clarify it. i want to transfer all data to one table to another table .How can i do it pls explain me and give syntax or tell wizard how to do it.
pls helpme urgent
kankeyan
|
|
|
|
|
At its simplest:
INSERT INTO DestinationTable
SELECT * FROM SourceTablel;
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
thank u Mr colin its very simple
thanks
|
|
|
|
|
Hi,
I work on a function which extract a blob field from a database access with datareader but I have an error:
specified cast is not valid
The code is:
Dim sql As String = DB_CONNECT<br />
Dim connect As New OleDb.OleDbConnection(sql)<br />
<br />
connect.Open()<br />
<br />
Dim command As New OleDb.OleDbCommand("select bindata from notiz", connect)<br />
<br />
Dim reader As OleDb.OleDbDataReader = command.ExecuteReader(CommandBehavior.SequentialAccess)<br />
<br />
<br />
Dim i As Integer = 0<br />
Dim v(100) As String<br />
<br />
<br />
<br />
While reader.Read()<br />
<br />
v(i) = reader.GetString(0)<br />
<br />
Maybe you have an idea.
Thanks.
|
|
|
|
|
It will arrive as binary data in which case you need a byte array. I don't know enough VB to say how you declare that byte[] in C#.
Dim v() As Byte perhaps?
Then use GetBytes[^] to get the data from the column.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Hi,
I am using DAAB January 2006. I have the following declaration, do I need it, I get an error:
db.AddOutParameter(command, "@ReturnValue", DbType.Int32, 4);
Error:
Procedure or function sp_Property_InsertProperty has too many arguments specified.
I use it to get the value returned like:
using (dr = db.ExecuteReader(command))
{
intResultCode = (int)db.GetParameterValue(command, "@ReturnValue");
}
The variable @ReturnValue is what SQL returns and need not be declared?
Please can someone help?
Regards
ma se
|
|
|
|
|
ma se wrote: Error:
Procedure or function sp_Property_InsertProperty has too many arguments specified.
please check every where where are passing parameters.i think problem is there
|
|
|
|
|
I don't know about the DAAB, but for .NET data providers in general, set the parameter's Direction property to ParameterDirection.ReturnValue . This property is a member of the IDataParameter interface.
The actual name of the return value parameter is unimportant, but it must be the first parameter in the parameters collection.
|
|
|
|
|
Hi all,
I am currently doing a SPC (Statiscal Process Control) software. It is related to Vision Inspection Machine. The software is doing using VC 6 MFC, and database using Microsoft Access.
I am in the final stage of the software development. Now i am facing the problem when i try to retrieve data from the table. The data was extremly huge (about 150k row for a table in a single day, it continue append) and make my software extremely slow when i display all my graph. As is keep track of each of every data that have been inspected by the machine.
At first, i get all needed data using for loop, then i put some comparison in it. If it fullfill then it will use ADO to send query to access. The processing time was horrible. Then i find out that if i retrieve the whole junk of data for the coloum i needed in a CStringArray, then only i compare the CStringArray in the for loop. The time was shorten, it take about 5 to 10 second.
My question is, am i doing the right way of getting data ? Is there any faster method ? Or is this the limitation if Microsoft Access ? Please help.
Thanks alot
Best regards,
David
|
|
|
|
|
again n again firing query for retrieval increases too much communication cost so it's not a good idea for retrieving data.
Suggestion 1:
create a stored procedure do all your work there and return the final result
Suggestion 2:
make a dynamic query or condition for your query and fire at once
Hope it'll help in improving performance of your data retrieving procedure
|
|
|
|
|
Hai,
I have SQL Server 2005 Enterprise Edition in the DVD.I have Windows XP SP2 operating system in my PC.But i am unable to install the SQL Server 2005 Enterprise Edition in my PC.Why?.Please anybody give the solution for this.
And also what edition is suitable for the Windows XP Sp2 System.
Regards,
Gnanavel N
|
|
|
|
|
it also requires 3.1 or 3.2 installer might be missing in your OS
|
|
|
|
|
For SQL Server Enterprise you need a Server class OS.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Sathyaa15 wrote: But i am unable to install the SQL Server 2005 Enterprise Edition in my PC.Why?.Please anybody give the solution for this.
The solution is to install it on a Server edition of Windows.
SQL Server Enterprise (and Standard) is not designed to run on desktop editions of Windows (Home and Professional).
If you want to run SQL Server on Windows XP then use SQL Server 2005 Express Edition.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Colin Angus Mackay wrote: The solution is to install it on a Server edition of Windows.
dear i think your are mistaken it's running perfactly at my desktop with WinXp Sp2
|
|
|
|
|
sam# wrote: dear
First, this freaks me out. Sorry, I have to say that. I'm not your wife so I'd prefer you didn't address me like that.
sam# wrote: i think your are mistaken it's running perfactly at my desktop with WinXp Sp2
Enterprise Edition is not designed to run on Windows XP. If you have somehow managed to install it on Windows XP then you are breaking the license agreement.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
I rather suspect that you've installed the Developer edition. Enterprise edition checks to see if the system is a server or not - if you're not running a server OS then it will fail to install. The only way to get round this is through registry hacks which would invalidate your XP licence.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
There is also a Workgroup Edition which does run on Windows XP.
|
|
|
|
|
So there is. I forgot about that one.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
How to pass a parameter that separated by a blank characther eg "JOHN SMITH" to a Stored Procedure to be used for a full text search.
Thank you
|
|
|
|
|
Use this function in ur back end code....,
Function singletodouble(ByVal str As String) As String
Dim i As Integer
Dim strdouble As String
strdouble = " "
For i = 1 To Len(str)
If Mid(str, i, 1) = "'" Then
strdouble = strdouble & Mid(str, i, 1) & "'"
Else
strdouble = strdouble & Mid(str, i, 1)
End If
Next
singletodouble = Trim(strdouble)
End Function
After that pass the value to ur stored procedure like:
'" & singletodouble(txtdesc.Text) & "'[for example the string in textbox it will be pass this way]...,
I think this will help u...,
Regards,
Magi
|
|
|
|
|
HI i am using MSSQL 2000.
I ve some doubt in group by cluase or selecting data on a certain manner.
i ve 3 table
tbl1 contain fileds Refno(p),catId,remitId,Amt
egs: r1 c1 rm1 1000
r2 c2 rm2 300
r3 c1 rm2 2000
r4 c3 rm3 50
r5 c2 rm3 4000
r6 c1 rm2 500
tbl2 catId(p), catname
eg : c1 cat1
c2 cat2
c3 cat3
c4 cat4
tabl3 remitID(p),remitname
eg: rm1 remit1
rm2 remit2
rm3 remit3
i want to display data like
r1 cat1 remit1 1000
r3 cat1 remit2 2000
r6 cat1
like
i want group tthe data based on category id
how i do this?
is it
SELECT Refno,catname,remitname,Amt from
tbl1,tbl2,tbl3 where
tbl1.catId=tbl2.catId and tbl1.remitId=tbl3.remitId
GRoup by ??????
thanks in advance
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
I think you need to sort them like
<br />
SELECT Refno,catname,remitname,Amt from<br />
tbl1,tbl2,tbl3 where<br />
tbl1.catId=tbl2.catId and tbl1.remitId=tbl3.remitId<br />
order by catname <br />
<br />
Regards,
Arun Kumar.A
|
|
|
|
|
thank u. but when we use group by clause??
i am really confused with groupby clause and order by...
Anyway thank u
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Vipin dev wrote: when we use group by clause??
ORDER BY clause is used to sort the records based on certain fields.
GROUP BY clause is used to find SUM ,AVG ,MAX ,etc.,
for each group of a field.
For more information Click Here[^]
Regards,
Arun Kumar.A
|
|
|
|