2,935 Topics
| |
Hi, Trying this Query, [CODE][B]DECLARE @SR VARCHAR(8),@SC CHAR(15),@ST CHAR(15),@SNO int; SELECT * FROM (SELECT DISTINCT ROW_NUMBER() OVER (ORDER BY a.rno) AS rowid, @SR=a.rno,@SC=a.kat, @ST=a.type FROM SMas a, SDet b WHERE b.id='X' AND a.rno=b.rno) AS C WHERE C.rowid=4 [/B][/CODE] but getting this following error: [CODE][B][I][U]Msg 102, Level 15, State 1, Line … | |
Hi, I am trying to create a stored procedure to add a new column into a database from an ASP web application. The SQL Code for this is:- [code] ALTER TABLE tablename ADD COLUMN columnname columndatatype [/code] I have tried to insert this SQL into a stored procedure:- [code] CREATE … | |
Any tips on how to connect them? COmments are highly appreciated. Thanks! | |
hello! i have shifted my application from mssql server 2000 to mssql server 2005 , now the prob is the command object is not returning the recordset if command text is stored procedure , here is my code please check it and guide me through errors . [ICODE] dim cmdsp … | |
Basically I have a trigger that is fired off whenever a workorder is reopened to close it again. The trigger works perfectly but I want to track the workorders where there is an attempt to reopen it. so basically if workorderid 8 is attempted to open again I want to … | |
i have two tables in my sql database one is "vendor" and other "purchase_order" they both have one common attribute "vendor_name" my problem is that i want vendor name in my "purchase_order" table to be same as that in "vendor" table but vendor_name is not a primary key in "vendor" … | |
I'm trying to create a webpage that will allow the user to input a vendor number(text box) and if the number exists populate the form with vendor name, phone and state using a stored procedures. Below you will find the stored procedures and after it my webpage. Stored Procedures: SELECT … | |
I have to create a stored procedure that will view data from a table. The user will audit the data, with paid dates. The user comes back to the view report, check/select all lines that have the same paid dates to change. The user will enter the paid date, then … | |
Hi Friends!! I am coming across this problem that whenever I am trying to retrieve the data in a dataset Through database, it is taking around 10 min to get the data no the localhost. And when I am running the same code on the live server it doesnot take … | |
Hi, How do I design a table column named UpdateDate that will give the default date and time upon inserting a record into the table I'm using Enterprise Manager in MSSQL Many Thanks | |
i have a combobox i want to show all the student name in it , i am using mssql database , and when we select student a textbox will show the rollno of that student , please help me | |
Hi all, SQL definitely is not my area of expertise, so I need help with something. Suppose I have 3 tables (I'll try and keep this is as simple as possible): - User (with UserID). There are 13,000 records - Status (StatusID as the PK). There are 10 records - … | |
I have developed following web service in vs2008 but cannot resolve th following error System.Data.SqlClient.SqlException: Arithmetic overflow error converting varchar to data type numeric. here is my web service code using System; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Xml.Linq; using System.Data.SqlClient; using System.Data; using System.Configuration; [WebService(Namespace = … | |
I have made a web service to insert product details the web method is as follows [code] using System; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Xml.Linq; using System.Data.SqlClient; using System.Data; using System.Configuration; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // … | |
is it possible to create a view with a primary key.. if so... how can i do that using a query of t sql.. anyone.. help..:?: | |
Hello, I have a table with clients: id, name, email and the likes I am looking to find all ID's where emails are the same, I tried the following [code]select db_email, db_medlem, count(*) from kunder group by db_email HAVING count(*) > 1;[/code] however this generates an error due to not … | |
How can I ensure that the stored procedure below is able to use either one or all the parameters to filter records from a table? CREATE PROCEDURE ABC @StartDate datetime = null, @EndDate datetime = null, @UserId varchar(255) = null, @AccNo varchar(255) = null AS BEGIN IF @StartDate IS NULL … | |
hi everyone, I wish to share the mdf file on the network so that other computers can use the file to capture or retrieve the data. Is there any way I can do this on MS SQL SERVER 2005? | |
Below dynamic query will set StartDate and EndDate to 1st of March to 30th April as UK financial year. DECLARE @StartDate DATETIME DECLARE @EndDate DATETIME SET @StartDate = DATEADD(dd,0, DATEDIFF(dd,0, DATEADD( mm, -(((12 + DATEPART(m, getDate())) - 4)%12), getDate() ) - datePart(d,DATEADD( mm, -(((12 + DATEPART(m, getDate())) - 4)%12),getDate() ))+1 … | |
Hello Guys, I am trying to get the data from two columns of two different tables using Join as combining them as a whole to insert into dropdownlist... The situation is like this: There are two tables named tblPropertyCategory and tblPropertySubCategory.. I have PCName in tblPropertyCategory and PSCName in tblPropertySubCategory.. … | |
Well, when almost finishing this tutorial: [INDENT][/INDENT][url]http://msdn.microsoft.com/en-us/library/ff677562.aspx[/url] I found a problem on connecting the Add-in to the database, and so the lobInstance can´t be opened: [url]http://i.stack.imgur.com/AFzie.png[/url] This is the error code. (in fact the error message was being popped out when the Excel 2010 client starts, but I commented the … | |
Hi, I recieve the following error message: "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression'name '" when I run this statement: [CODE] sql = "INSERT INTO empDetail VALUES("; sql += txtName.getText()+ ", "; sql += "'" + txtAddress.getText()+ "', "; sql += "'" + txtSuburb.getText()+ "', … | |
this is my query for displaying monthly business [CODE]select convert(varchar,dateadd(month,datediff(month,0,inv_date),0),101) as 'months with date format', sum(inv_amount) as 'business' from invoices inner join customers on customers.cust_id =invoices.cust_id where fname+' '+lname='lala fazlani' group by customers.cust_id,dateadd(month,datediff(month,0,inv_date),0) order by customers.cust_id,dateadd(month,datediff(month,0,inv_date),0) [/CODE] So when I execute this command, It gives me this result [url]http://img821.imageshack.us/img821/6492/sqle.jpg[/url] [url]http://img341.imageshack.us/img341/538/chartv.jpg[/url] … | |
Hi everyone, ALTER TABLE preventiveRecord ADD Verifiedbymanager BIT NOT NULL CONSTRAINT preventive_verify DEFAULT 0 WITH VALUES ALTER TABLE preventiveRecord ADD Verifiedbysupervisor BIT NOT NULL CONSTRAINT preventive_verify DEFAULT 0 WITH VALUES SELECT [ID] ,[Date_Done] ,[Date_Due] ,[SME] ,[Status] ,[History_ID] ,[Remark] ,[Verifiedbysupervisor] ,[Verifiedbymanager] FROM [demo].[dbo].[preventiveRecord] Here is my query : from d in … | |
Hi, I'm wondering if anyone can help me develop the right sql query. I'm trying to select a "customerNumber" in table 1, but only if it doesn't exist in table2. I tried this [CODE]Select Table1.customerNumber From Table1, table2 Where table1.customerNumber NOT IN (select table2.customerNumber from table2) [/CODE] It isn't right … | |
Hi.. I'm developing a website for the first time in visual web developer using asp.net and sql sever database. I have designed my pages and master page. I have created my sql server database too. Please could you help me how to connect the database to asp.net master page? Also … | |
I cant load the image from database please help.. [CODE]strsql = "select top 1 id,shape from table" set rsgetimage = server.CreateObject("adodb.recordset") rsgetimage.open strsql,application("connectionstring") Response.Expires = 0 Response.Buffer = TRUE Response.Clear Response.BinaryWrite(rsgetimage("shape")) Response.ContentType = "image/png" rsgetimage.close [/CODE] it just display an x icon - thanks | |
Daft subject header, but its early and brain not awake yet! One for the SQL gurus (either that i've missed something here....lol) I want to select rows where there are duplicates of data in some columns, but not others. Where a duplication IS found, i want to return all rows … | |
hello ! i am working on a single page of asp ,and i am using ext js 4.0 with it . i have a grid of extjs , my task is to show records in that grid from mssql server 2008 , for getting records i am using webservice . … | |
I want to take backup of my server database at my local machine........ how can i do this...... Thanks in advance |
The End.