|
i wrote a command like 'select max(admission_no) from user_details'in ms access.but it is giving the error as 'characters found after end of sql statement'.Can anybody help me with this?
|
|
|
|
|
Please Give us more info. Where are you using this query ? from your code or this is in the Storeprocedure.
Give us more info so that we can help.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Situation:
One of the columns in the table is with xml data type.
Every seconds table has ~30 row inserted. After couple of mounts there will be ~ 30row x 60s x 60min x 24h x 30day = ~78x10^6 rows for 1 month.
The goal is: very quick retrieve data from that table, where some queries will target xml column (specific data in xml element or attribute).
Did anybody have experience with xml column in this way? Did this way of returning data is slow, or can be quick with using xml indexes, or even using xml indexes this way of returning data is still slow?
___________________________
A.Petkovic
B.Sc.Eng., MCSD, MCT
|
|
|
|
|
if i understand you correctly , you have a field in your table that is of XML data type and has some xml in it and you want to retrieve a certain attribute(Column) in that XML. Then my frinend , that means form the begining you made a poor design decision when designing a database, and to loop through the data will be tedious for sql to retrieve the amaount of data you want. use another way.Give us more info , mybe we can help in the Logic that you can follow.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I will try to explain, in one db I have 3 tables, because I want to return data as quick as possible to web services, I design 1 table with all necessary columns.
First design is without xml column, but number of rows will be at least 5x larger from design with xml column.
One of the solution is that I return data, and in web services to deal with xml column.
Second solution is that I return data filtered by xml attributes, or elements.
One more quick response is goal.
___________________________
A.Petkovic
B.Sc.Eng., MCSD, MCT
|
|
|
|
|
Hi,
I'd like to put all my database management in StoredProcedures or Functions, but I'm having a small problem:
1) I know I can't use INSERT, UPDATE or DELETE in UDFs, right?
2) So i created a SPROC that inserts a record to a simple table (id, name) and returns the ID in an output parameter. It's working fine.
3) I create a UDF that executes this SPROC and returns the ID... and here is my problem... looks like I can't execute my own SPROCs from a UDF.
4) So.. how do I achieve this goal? Inserting a record and returning the auto generated id back to my web browser (asp.net application).
Here is some of my code:
CREATE PROCEDURE finsTeste
@snome varchar(50),
@nid int output
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO teste (nome) VALUES (@snome)
SELECT @nid = SCOPE_IDENTITY()
END
GO
CREATE FUNCTION insTeste
(
@snome varchar(50)
)
RETURNS int
AS
BEGIN
DECLARE @nid int
EXECUTE finsTeste @snome, @nid output
RETURN @nid;
END
GO
And then in the asp.net page I run a ExecuteScalar(StoredProcedure, "insTeste", params);
Thanks,
Dirso
|
|
|
|
|
Why do you need to create a UDF? You can get the value that you need directly from the SP.
|
|
|
|
|
I didn't know that... I thought I had to execute. Thank you very much! I just tried and it worked great!
Thanks,
Dirso
|
|
|
|
|
hi
how to create foreign key in sql server 2005 using table designer
thanks
|
|
|
|
|
I'm assuming that you're using "Microsoft SQL Server Management Studio";
* Rightclick on the table, choose "design"
* Rightclick on any column in the newly opened window, choose "Relationships"
* Click "Add"
I are Troll
|
|
|
|
|
Hello everyone!
I wonder is it possible to create SQL querie using FULL JOIN in Access 2003? When i try it i just get syntax error. So does anyone have an idea how to simulate full join in access?
Cheers!
|
|
|
|
|
Branislav Vidovic wrote: When i try it i just get syntax error
Which error message do you get? Post your code to see where is wrong.
For more about FULL JOIN.[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
There is no reason to simulate the Outer Join.
Please post your query along with the error you receive.
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering
|
|
|
|
|
Possibly the union of a left join and a right join?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Yes I actually tried that and made it. IT is actually union of left join, right join and inner join
|
|
|
|
|
Branislav Vidovic wrote: and inner join
Of course - stupid of me to forget it.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
Hello,
I have two data tales in Access. One contais 2 million recors and the other contains 116000 records. The Customer name, street address, city and zip code fields need to be matched against each other across both tables in order to fin mismatches and exact matches.
Since one of the tales is very large, I am having a problem with the database program hanging every time I run the query. I tried doing this in SQL server 2005 as well, with no success.
Can anyone suggest a method for accomplishing this?
Regards.
|
|
|
|
|
Please post your query so that we might be able to understand why it refuses to dance.
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering
|
|
|
|
|
You can create a non-clustered index for every condition and If you optimize your query that also will help you. Please post your query.
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
2 million records is not large in SQL server (although it may be in Access) so it has got to be your query. As suggested by others add some indexes and try optimising your query.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
how i can see if the server is working or not ?
in sql server 2000 there was tool that show it
if there Isn't any tool, how i can open and close the server ? (script ?...)
thank's in advance
|
|
|
|
|
E_Gold wrote: how i can see if the server is working or not ?
Just try to open a connection
E_Gold wrote: how i can open and close the server ?
Open the Control Panel, go to the Administrative Tools and open the "Services" applet. From there you can start and stop the service.
Wha?
|
|
|
|
|
is there any script that can open/close the server ?
thank's
|
|
|
|
|
No SQL script; if the server is closed, how would you execute that SQL-script?
You can use VBScript[^]
I are Troll
|
|
|
|