|
AS THE ERROR INDICATES YOU HAVE PASSED MORE VALUES TO THE PROCEDURE/FUNCTION THAN REQUIRED.
Gautham
|
|
|
|
|
You may wish to fix your caps lock key - it appears to be broken.
|
|
|
|
|
if you can see i have have have the exact number of parameters sent as required.
Regards
Ruwandi
rkherath
|
|
|
|
|
rkherath wrote: also i noticed this error comes when the loop is going through for the second time.
This means, you haven't closed the connection to your db server. So, you are passing the parameters twice!
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
mysql has limit to show limited rows
but how what does mssql have?
i want to make a paging like code
i have stumbled on this code
select tag, difference from (
select top 4 * from (
select top 8 *
from flexi_pump
order by tag asc
) as newtbl order by tag desc
) as newtbl2 order by tag asc
it works great, but what if the last page only has one row. this sql query shows the last four, not only the last one. (my table has 9 rows)
|
|
|
|
|
|
thanks, this is a good article
edit: i tried this on a windows mobile and it seems not be working
-- modified at 5:11 Tuesday 24th April, 2007
|
|
|
|
|
I want to study about automated tasks,relication in SQL but I don't have documents about it.If you have it,send it to me,please.Thank you very much
|
|
|
|
|
|
Hi All,
I want to know how to insert multiple rows
in SQL Server 2005.
Please anybody can help me.
|
|
|
|
|
Some ideas:
* Call INSERT multiple times
* Call INSERT with a SELECT that returns multiple rows.
|
|
|
|
|
how can i remove duplicate row in any table.
i have no column having constraint.
so how can i do it.
how can i find number of diplicate rows in any table.
|
|
|
|
|
Are all your values of your rows the same or just a special collum?
I think it might work with:
delete from TableName t1 where collum = (select colum from TableName t2 where t1.Value = t2.Value)
;
I am not quiet sure if this work, but it might.
I hope I could help you
See you
|
|
|
|
|
i use one table.in that many row having equal values in all column.i want anly first row of duplicate rows and other rows deleted.
|
|
|
|
|
In this case you might have to write t1.Value = t2.Value and t1.Value2 = t2.Value2 and ...
depend on how many collums you have. I hope it work coudn´t test it. But I think it will do.
|
|
|
|
|
Just to make sure "Value" stands for "columName"
|
|
|
|
|
This works for me and is way more efficient! Give'r a try, but remember to back up first and test the results to make sure you what you are expecting happens!
DELETE FROM [Table with Duplicates]
WHERE [Primary Key Field] IN
(
SELECT a.[Primary Key Field]
FROM [Table with Duplicates] a,
[Table with Duplicates] b
WHERE a.[Primary Key Field]!= b.[Primary Key Field] -- i.e. Userkey
AND a.[Value to check]= b.[Value to Check] -- i.e. Lastname
AND a.[Second Value to Check] = b.[Second Value to Check] -- i.e. Firstname
AND a.[Primary Key Field] < b.[Primary Key Field] -- i.e. Userkey
)
Rocky
|
|
|
|
|
hi
I create the Stored procedure for the user login. In the New user Creation i check the user number in the other table of user personal detail
whether the coding is not work correct.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[PrCreatePassword]
@Employee_Number varchar(6),
@UserName varchar(15),
@Password varchar(10)
AS
DECLARE @EmpNo varchar(6)
SELECT @EmpNo=Employee_Number FROM dbo.Employee_Personal WHERE Employee_Number=@Employee_Number
IF @EmpNo=NULL
BEGIN
INSERT INTO Password
(
Employee_Number,
UserName,
Password
)
VALUES
(
NULL,NULL,NULL
)
END
ELSE
BEGIN
INSERT INTO Password
(
Employee_Number,
UserName,
Password
)
VALUES
(
@EmpNo,
@UserName,
@Password
)
END
give me a idea or new method
|
|
|
|
|
when you check for null values: @var1 is null, it should not be @var1 = null
now, as far as i understood you wnat to check whether that employee number exists or not, if it is not then you want to insert a new record.
Am i right!
Gautham
|
|
|
|
|
Yes Ur Right
At the time new user in login creation he must be in employee table.
|
|
|
|
|
ARE YOU FOLLOWING THE SAME WAY OR DID YOU GET ANY NEW SOLUTION?
Gautham
|
|
|
|
|
how can we insert into field arabic number(hindi format)
|
|
|
|
|
What is the SQL 2000 stored procedure to retrieve a user's permissions on a table.
God Bless,
Jason
Programmer: A biological machine designed to convert caffeine into code. Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
I'm using SQL 2005 Express, and VC#2005 Express. Using a SQLCommand.ExecuteNonQuery() with a CREATE TABLE statement, I can make a table in my database with the columns I need, determined at runtime. I've verified the table is made in the database correctly, via SQL server Management Studio Express. In the process of making the CREATE TABLE statement, I also make the table in my local DataSet, same name, same columns, should be identical, along with a DataAdapter for the table. However, when I try to DataAdapter.Fill() the table, it tells me the table name is invalid, like the table isn't in the database on disk. I've tried setting the MissingSchema property to PassThrough, and then the .Fill() makes a new table, same columns, keys, etc., but the name of the new table is "Table", not the table name I create it with. Any help on this, either the table isn't being made right, or the DataAdapter is screwing up somehow, I can't figure it out.
My CREATE TABLE statement
CREATE TABLE finished (Listing NOT NULL PRIMARY KEY IDENTITY(1000,1),[More data columns, shouldn't be the problem, just data])
The SELECT statement used in DataAdapter
SELECT Listing,[More columns as above] FROM finished
I can post the code if needed
A soft glow comes from the pit in the darkness.
The clicking noise become faster - and louder.
A wind begins to stir up from the pit, as the
creature flexes it's wings, preparing for flight.
You stare into the pit, and hear a voice say
in your mind, "If you survive the encounter,
declare it to the world."
The Code Demon Rises.
|
|
|
|
|
Replying to my own post... In case anyone else has this problem, here's how I figured this out. Simple really. I just needed to add a TableMapping to the DataAdapter, and give it the right names. One line of code fixed a 3 day problem.
myDataAdapter.TableMappings.Add( "Table", myTable.TableName );
Have Fun!
A soft glow comes from the pit in the darkness.
The clicking noise become faster - and louder.
A wind begins to stir up from the pit, as the
creature flexes it's wings, preparing for flight.
You stare into the pit, and hear a voice say
in your mind, "If you survive the encounter,
declare it to the world."
The Code Demon Rises.
|
|
|
|