2,935 Topics

Member Avatar for
Member Avatar for jacksantho

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 …

Member Avatar for jacksantho
0
215
Member Avatar for GLT

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 …

Member Avatar for triptikumbhat@g
0
5K
Member Avatar for choboja621
Member Avatar for choboja621
0
75
Member Avatar for M.Waqas Aslam

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 …

Member Avatar for BitBlt
0
235
Member Avatar for moone009

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 …

Member Avatar for BitBlt
0
114
Member Avatar for arbazpathan

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" …

Member Avatar for adam_k
0
174
Member Avatar for tommyarcher

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 …

Member Avatar for tommyarcher
0
153
Member Avatar for trilju2005

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 …

Member Avatar for trilju2005
0
185
Member Avatar for arsheena.alam

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 …

Member Avatar for dickersonka
0
148
Member Avatar for dieterm

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

Member Avatar for AliQadir
0
367
Member Avatar for thehunk

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

Member Avatar for thehunk
0
136
Member Avatar for f_atencia

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 - …

Member Avatar for BitBlt
0
129
Member Avatar for arbazpathan

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 = …

Member Avatar for arbazpathan
0
513
Member Avatar for arbazpathan

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)] // …

Member Avatar for jbisono
-1
559
Member Avatar for rockout15

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..:?:

Member Avatar for adam_k
0
83
Member Avatar for Tommy.b

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 …

Member Avatar for sankarssn
0
9K
Member Avatar for solomon_13000

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 …

Member Avatar for solomon_13000
0
107
Member Avatar for ndodi

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?

Member Avatar for ndodi
0
227
Member Avatar for Conficker111111

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 …

Member Avatar for Conficker111111
0
1K
Member Avatar for geniusvishal

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.. …

Member Avatar for BitBlt
0
337
Member Avatar for Jorgensen

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 …

0
131
Member Avatar for Sonny101

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()+ "', …

Member Avatar for BitBlt
0
331
Member Avatar for bilal_fazlani

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] …

Member Avatar for bilal_fazlani
0
503
Member Avatar for uva1102

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 …

Member Avatar for thines01
0
163
Member Avatar for haranaboy

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 …

Member Avatar for simplypixie
0
217
Member Avatar for Saranya86

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 …

Member Avatar for m27grace
0
146
Member Avatar for jcarbillon

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

Member Avatar for vsmash
0
84
Member Avatar for walkermat

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 …

Member Avatar for dwyaris
0
270
Member Avatar for M.Waqas Aslam

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 . …

0
90
Member Avatar for jacksantho

I want to take backup of my server database at my local machine........ how can i do this...... Thanks in advance

Member Avatar for pritaeas
0
81

The End.