9,022 Topics
I not sure how to do this.Could anyone can help me...? question: Display all buyer (code, name) who has average purchase each year for more than 100000 for past 10 years here is my query: [CODE]SELECT b.CODE, b.NAME from ( SELECT BUYER, AVG(TOTAL) AS total FROM SMF WHERE TOTAL > …
Hi, Am created a login and an user to access sql server instance and the database. [CODE]Creating Login: create login xxx with password='secret'; Creating User: use testdb; create user yyy for login loginname; [/CODE] And then i login with this login name(xxx) and also i can able to access the …
Hello there, I am having trouble with my C# datagrid. Im working with sql. I have four columns in my datagrid: firstname, lastname, membership, date. So heres the design behind my app. Employee scans a card, hits update. Info pertaining to that member gets pulled from the sql database, then …
[code] try { OleDbCommand cmd = new OleDbCommand(String.Concat("UPDATE EMPLOYEE SET", " Emp_Name='", rec.txtEmpName, "',E_Position='", rec.txtPosition, "', Department='", rec.txtDepartment, "',Date_Hired='", rec.txtHired, "', Address_City='",rec.txtAdC, "',Address_Province='", rec.txtAdP, "', Civil_Status='", rec.txtCivil, "',Maiden_Name='", rec.txtMaiden, "', Spouse_Name='", rec.txtSpouse, "',Citizenship='",rec.txtCitizen, "', Telephone='", rec.txtPhone, "',Mobile_Phone='", rec.txtMobile, "', Emergency='", rec.txtEmergency, "',Birthdate='", rec.txtDOB, "', Birth_Place='",rec.txtBirthPlace, "',Height='", rec.txtHeight, "', Weight='", rec.txtWeight, …
Hi, I have a table QuestionAsked which contains a column DateofAsking. Now what i need is to extract each date value and check whether the difference between that day and the current day is 14 or not. If yes than i have to update a particular column in that table.I …
I have 2 table [EMPLOYEE] Emp_ID Emp_Name [ATTENDANCE] Emp_ID Emp_Name Time_In Time_Out How do I display it like this. I hope I present this right [CODE] +--------++----------++---------++---------+ | Emp_ID || Emp_Name || Time_In ||Time_Out | <---- FROM ATTENDANCE +--------++----------++---------++---------+ | 1 || Josh || || | <---- FROM EMPLOYEE +--------++----------++---------++---------+ …
I am attempting to pull a single record with the most recent affective date. However, I am getting two records with effective dates of 04/01/2010 and 12/01/2009. Can someone please tell me how to pull only the record with an effective date of 04/01/2010? Thanks for your help. [CODE] select …
Good Day All I have a File Format Defined like this [QUOTE]9.0 4 1 SQLCHAR 0 100 "," 0 ExtraField "" 2 SQLCHAR 0 100 "," 1 Descr SQL_Latin1_General_CP1_CI_AS 3 SQLCHAR 0 100 "," 2 ABREV SQL_Latin1_General_CP1_CI_AS [/QUOTE] and i use it like this [CODE]BULK INSERT dbo.TBL_CMPS FROM 'C:\\UNISA_IMPORT\\Final_Import\\Campuses.csv' WITH …
I am looking for sample code for vb.net Dynamic Dashboard applications , so please kindly help me , i want the code in vb.net which will be my front end and sql will be my back end for database , it will be great if dashboard reflect sell/purchase mechanism
how Save, Update, Delete Data using C#.Net and SQL Server 2005
hi, i am using sm sql express 2008 and this does not have the backup feature. so i have to create a application to back up the database everyday automatically, does anybody know a way to do it,please reply thank you.
Hi everybody, I have two tables, Stock and Stockitemlist, am trying to update Itemcost in stockItemlist from Stock with the below query, Update StockItemList set ItemCost =(select ItemCost ItemCost from Stock where ItemMasterUID in (select ItemMasterUID from StockItemList)) but am getting an error messsage like : Msg 512, Level 16, …
I have a gridview which is connected to a SQL datasource.In the gridview i have a item template field (Textbox) and a image button. when i click on the image button, i get a popup (using ModalpopupExtender).In the popup there is a checkboxlist with a series of items which are …
Hi, I'm writing a C++ script and part of it is to connect to an SQL Server. C++ is new to me so I'm still working my way around. Any help would be greatly appreciated. Many Thanks
how can i use to show the selected value from data set i think there is a problem of dataset use to take out value from data set my code is [code] protected void Page_Load(object sender, EventArgs e) { SqlDataAdapter adap = new SqlDataAdapter("SP_selectallbooks", con); adap.SelectCommand.CommandType = CommandType.StoredProcedure; //DataSet ds …
Hi expert, When i try this script i got 2 esn number with different shipdate and supplierid. were us it should be the latest shipdate should be obtain. Any Idea guys. thanks. [CODE] TABLE1 ESN 123 TABLE2 ESN--SupplierID--Shipdate 123--40----------2011-04-27 123--14----------2011-07-02 Select vp.esn, us.supplierid, us.shipdate --(Select Max(shipdate) from TABLE2 where vp.esn …
I'm a c++ server side developer, and someone has asked me to write a system for their small business, and I know nothing about the tools available. In fact, Im so out of date in this area, that my first thought was to use Ashton Tate dBase 4! anyone remember …
Hi, i am creating a windows application in c# while making an exe i want to add setup of sqlexpress. how i can add this so it will install when package is install. I have add prerequisties in properties to add windows installer,.net framework,sqlserver but it seems to be not …
VS 2005 I just started to realized the power of SSIS packages meaning I am very new. Anyways I built a package that pulls from one of my stored procs and creates a flat file out of it and then sends to an FTP folder Okay now the problem is …
We use a single database in SQL Server 2005 and the size is around 190 GB. We plan to spilt the database in following methods; 1. single instance multiple database without synonyms 2. single instance multiple database with synonyms 3. multiple instance multiple database Need inputs on the below queries: …
Hello all, This is my first post here.Woohoo! Seems like an awesome place to collaborate. So heres my issue, thread title explains pretty well though. I have a C# app that I am working on, and I have a datagrid and one button in the UI. Heres me ISSUE: I …
Hi, I have a datagridview.And as per my requirement the data is supposed to be filled from three different tables in database.I have created the query and is succesfully able to populated the data in it with the cross join. Have a look at my structure. Table1,Table2,Table3. table1 has 2 …
I have a web page in which there is a textbox that asks my users to enter a start date. What I'm trying to do from there is that no matter what the end date is, my page will calculated that from the text box, store it as a variable …
Hi, I want to call my simple stored procedure in my app's local database. This is my procedure: [CODE]ALTER PROCEDURE dbo.booklist AS select * from book RETURN[/CODE] ---------- Actually I should run my query that is simple and return list of books (SELECT * FROM book). I should do this …
Hi there, Im working on a web database application and Im encountering problems to connect the database and the ASP.net page. The database is being detected but not the tables inside the database. Could anybody help me?
As an IT placement student I have reached the end of a 3 month project for the company I work for. I have migrated information to MSSQL server 2008 edition and I am retrieving the information for dynamic web page display using php. Now that I have everything in the …
Guys, I have 2 tables. My objective is to get the information from Table1 and place it to table2. the 2 tables have the same Itemnumber and DefectCode. How could make this in correct scripts cause when i make the script it triple the records. [CODE] TABLE1 ItemNumber---------Price---PO-------Code-Qty P300-1710-DROID-U--302.05--9100962--506--1 P300-1710-DROID-U--302.05--9100962--553--4 …
Hi Everyone, Can anyone pls help me out......with my requirement, i am struggling since 3 days. Please find the requirement below my file contains below data Code: R1|Array/Network Resistor - VIP|V_RES_CLASS|V_MOUNT_FEATURE|SURFACE MOUNT|AND|8533.10.00.20|8533.10.00.20| R1|Array/Network Resistor - VIP|V_RES_NW_CLASS|V_TECHNOLOGY|CARBON*||8533.10.00.20|8533.10.00.20| R4|Array/Network Resistor - VIP|V_RES_CLASS|V_MOUNT_FEATURE|THROUGH HOLE MOUNT|AND|8533.10.00.57|8533.10.00.57| R4|Array/Network Resistor - VIP|V_RES_NW_CLASS|V_TECHNOLOGY|CARBON*||8533.10.00.57|8533.10.00.57| R7|Array/Network Resistor - VIP|V_RES_CLASS|V_MOUNT_FEATURE|SURFACE …
hey... i'm using Visual Studio 2010(c#) for a winapp i'm writing. i have a DataBase in which i have 6 tables and there are so many fields in them that use unicode characters( Persian) and all of them are nvarchar(n) type cuz i had problem with text earlier, but when …
ERROR UNABLE TO CONNECT TO DATABASE SERVER STORED BACKUP WHOLE WEBSITE IN HTDOCS AND IMPORT WHOLE DATABASE USING IMPORT IN MYSQL AFTER RUNNING [url]http://localhost:8888/[/url] ON LOCAL MACHINE ERROR MESSAGE :UNABLE TO CONNECT TO DATABASE SERVER ANY HELP WOULD HE HIGHLY APPRECIATED
Hello Experts, How can i save the optionbutton and checkbox value in sql database? please send the query: dim cmd as new sqlcommand("insert into [tablename] values(........)",c.con) please help me :)
Having trouble with a simple database command I keep getting the error invalid column name and I cant seem to figure it out. Please help me figure out some possible problems Thanks. [CODE=VB] Dim ConnString As String ConnString = "Data Source=.\SQLEXPRESS;AttachDbFilename= C:\inetpub\wwwroot\KiKoGraphics\App_Data\aspnetdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" Dim sqlConn As New SqlConnection(ConnString) …
how to create stored procedure for altering multiple coulmns , how to create stored for creating dynamic table and add multiple columns to created table
Hi how would I go about creating a payment schedule based on a date and a number of months 3 or 6 or 12 to then populate the database with reoccurring dates so lets say new user added on 31/10/2011 for 6 months I need the database to add all …
can any one help me about this error [CODE]Private Sub BtnSave_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click If Objconnection.State = ConnectionState.Closed Then Try Catch ex As Exception End Try Objconnection.Open()---->>> The ConnectionString property has not been initialized. End If Objcmmand = New SqlCommand(" Insert into cases_of_accidents ( …
Hi there, I am a newbie to MSSQL. I apologise first as I know that my question might have been asked by others elsewhere but unfortunately I couldn't find it. I will really appreciate if someone can shed some light into my question. I have two tables with the following …
hi, i have an application that feeds data into a table of a database - table name is XTABLE716C6DC3. now i need a stored procedure that takes and calculates data from that dable anytime the table is changed and store the results in a certain format into a new table …
I am using adodb and i want to view the selected field in two tables but only one table appears in datagrid and below are my codes. Private Sub Form_Load() Set cn = New adodb.Connection cn.ConnectionString = "Provider=microsoft.jet.oledb.4.0;data source = " _ & App.Path & "\customers_infos.mdb; Persist security info= false" …
Having problems with the TypeError below: [code]order_list = ['25459 ', '12381 ', '25375 '] cursor.execute("SELECT WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE OHORNO IN (%s)"% tuple(order_list)) TypeError: not all arguments converted during string formatting[/code] The correct SQL should look like: [CODE]SELECT WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE …
Hi, My application is in VS2008 coded in VB.Net I have a DatagridView.I have a Save Button on my Form.Now my requirement is i want to the Data that is populated in Datagridview when i click on Save button. I want to do it using Update Query. below is my …
hi everyone they said in relational database there is no "last" concept.. and the only way to retrieve the last data entered in database is by IDENTITY and sone says TIMESTAMP... which one i would prefer to use?
can anyone tell me how to insert { in sql. Eg. insert into dm_dbo.prsn_ps_epm(product_id,imprint_name) values('123456','nisheeth{jain');
Hi All, I have a SQL database which has many views and needs indexing. Unfortunately SQL server does not let me add indexes with schema bind error. There are app. 50 views created on the database and I don't want to delete and re-create them one by one. Is there …
Hello everyone, I'm just having a problem that is stopping me from doiing my work and I've tried fixing it. I don't know what's really wrong with what I've got typed in visual studio. [code] string connString = @"Data Source=.\SQLEXPRESS;AttachDbFilename='C:\..................\Database1.mdf'; Integrated Security=True; User Instance=True"; SqlConnection conn = new SqlConnection(); conn.ConnectionString …
how to graph data from sql using open flash chart or other chart engine? I did some research but it uses array that has a value already like this one ... [CODE]<? # ------- The graph values in the form of associative array $values=array( "Jan" => 110, "Feb" => 130, …
HI, In my crystal report i want to use the SQL expression field to calculate the opening balance of the account based on the date passed to crystal report using parameter field.. How can i do it?? Thanks & Regards, Victoryy
What is the difference between oracle and sql? I am new to this field.Please help!!!!!!!!!!!!!!!!!!!!
Hi All I want to create a service application with Delphi that can connect to SQL DataBase I can create service application but the ADOQuery don't work inside the service Is any one that can tel me what should I Do? Thanks
hello all, i got project on online examination i want to fetch data dynamically from database. it must be like that once student loged in. he must gives answer for 1st Q. to go next Q. when they click on any of the buttons. next Q. must be fetch dynamically …
Guys, How to make an scripts if itemnumber have no '-U' then i will place this on the right side while if there's an exising '-U' then no replacement to be done. [CODE] ItemNumber ------------------ P300-4410-DROIDERIS P300-4110-TOUR P333-4410-EVO-U P333-4129-8530PUR-U P333-4170-9330GRY-U P333-4110-8350-U RESULTS: ItemNumber ------------------ P300-4410-DROIDERIS-U P300-4110-TOUR-U P333-4410-EVO-U P333-4129-8530PUR-U P333-4170-9330GRY-U P333-4110-8350-U …
The End.