2,570 Topics
| |
Problem is based on C#, ADO.NET, using Access Database. I am trying to filter the results from the database and display them in DataGridView on click of 'button1' button. But the datagridview shows empty results when there are actually 3 records with matching conditions. According to what I know, the … | |
I would like to retrieve the previous date (i.e., current date minus 1) and use it in a query through an = operator. I got the following query to retrieve the previous date: [icode]select DATEADD(DD, DATEDIFF(DY, 0, GETDATE()), -1)[/icode] It gives: 2011-03-14 00:00:00.000 I would like to get only: 2011-03-14, … | |
Hello, I'm having some trouble with SQL CE. The below code *should* insert a record into the 'maps' table. (table adapters all set up) sometimes it says cannot insert as breaching primary key constraint, which is fine, but it otherwise fails with cannot insert NULL into iMapId. I have checked … | |
Hello everyone! I'm trying to get a date from SQL without the year. Every code I've seen has included the year. Here is what I have now. [CODE]SELECT * , convert(CHAR, \"date\", 10) AS ndate from dbo.MYDB where 35 > DATEDIFF(d,\"date\", GETDATE())";[/CODE] I would like ndate to be show like … | |
I have an SQL Server Query: select *from table1 where column in ('list of values') When I execute this, I get all the details, however, when I do this: select *from table1 where column in ('list of values') and date_of_req='2011-03-15' I get an empty table. All the column headings are … | |
i m facing problem while conencting with sql server mangemnet studio A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. … | |
I will get an Excel 2003 file everyday via email. This file has 5 columns. The first for columns have static headers and text in them. The 5th column is the date of the report and below that is a list of values in the same column, followed by an … | |
Afternoon All, hope someone can help as this is really doing my head in. I have a SQL View which has a field called MOP/T which shows the number like so 28.5140299679490 349.893390000000 349.893389892905 I want to format that field so that it only shows the number before the decimal … | |
Hi, This is a SQL statement query (so may be in the wrong forum). Any help much appreciated! I have 3 tables in an Access DB (I know!): IndexData is main table with title, description, date, fileid Category table has categories (Cat1) associated to fileid in IndexData i.e. a fileid … | |
Hi I want to store query result in single variable like if query is "select count(*) from tablename" , and it return suppose 21 records (integer value) then I want to save this value in my database during insertion of record what should i write in place of question mark … | |
Hi All, I can connect C# to SQL and read SQL table but i am having problem in writing the outcome to text file. I really appreciate if you could assist me. this is the code. [CODE]//====================================== using System; using System.Data; using System.Data.SqlClient; using System.IO; namespace Chapter07 { class OrdinalIndexer … | |
Hi, i'm trying to get something to work. I want to do a query with multiples "if not" conditions in a mysql query. This is working : SELECT * FROM table WHERE column!='value' This is not working : SELECT * FROM table WHERE column!='value' OR column2!='value' I've tried all kind … | |
Dear all, I have using db operations such as insert,update,select,delete in my program .I have perform this operation using the prepared statement. How to avoid the sql injection in my java program.? *)I want to know functions to avoid the escape characters in java ? *)Did any one know what … | |
Hi i keep getting an exception when i'm trying to update table values within a database. the exception is below but i dont change from datetime to varchar it always stay as datetime. is there any other reasons why this is happening ? "The conversion of a varchar data type … | |
Hi, Not sure if my question belongs in an ASP.NET or MSSQL forum.. I have an ASP.NET webpage built in VS2010 with an Input field with the functionality to browse to a network directory, select a text file, read content and upload the data to an MSSQL database table. Nothing … | |
I would like some help on this database design I need to have completed by next week. Here's the specs: I'm creating a custom PC builder application. I've been getting stuck on trying to create the database for it. I would like to be able to enter customer details then … | |
Hi, I am trying to generate an sql query to insert several pieces of data, most of which comes from another table, however I have one variable that comes from PHP variables as below: [CODE]insert into scores (AuditID, question_id, available_score, question, question_number, question_section) values ($auditvalue, (SELECT questions.quid, questions.question_value, questions.question, questions.question_number, … | |
Hi everyone, I'm in a spot of bother. Attached is an image which should help better show what I'm about to ask for assistance with. :) [url]http://img96.imageshack.us/img96/7624/sqlm.jpg[/url] What I have, is 2 tables that associate each other with 'packholder' In the table shown, you can see Packholder - 1, 2, … | |
Hi All, I'm a fairly new programmer so you'll have to bear with me on this. Basically, I have a database with 3 tables, Engineers, Equipment and Signouts. I want to create a VB application that allows engineers to sign out equipment. I have all of the forms setup the … | |
Hye I have a question: Suppose I use JDBC, JDBCTemplate in order to execute a sql query. The query is something like: query = "SELECT ... FROM ... WHERE user = ? AND password = ? AND x='valuex' AND y='valuey' ..." Where user,password - I got from the web user … | |
I have two tables representing two forms that are connected each other but a form number. The second form records a number and a timestamp. This form can record multiple entries with a timestamp for each entry. I need a SQL statement that will return the first entry on Form2 … | |
Hi everyone, I am getting this error: [CODE]Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated.[/CODE]please … | |
hi i have a question in getting values from two table i ave two tables Table1 and Table2. table 1 have data and table 2 may have the same data as table 1 and more. and also table 1 may have the same data and some which is not in … | |
i m trying to update a table in my sql database using stored procedure. i have executed my stored procedure and dat works fine, no problem in that. i knwo because the values are updated when i execute it. however when i try to do so through asp.net code that … | |
Hi to all, I create the following table. create table man(id integer, name varchar(20), city varchar(20), age integer) I want the age, maximum age of person. So, I ran following query, select name, max(age) from man group by name; It shows name of all person in ascending order with their … | |
I have a table in which i have a column named "dtCreated" which has got datatype as VARCHAR(50) Now I want records between two dates. I wrote my query as written below [CODE] select * from mytable where dtcreated>=fromdate and dtcreated<=todate [/CODE] This query work fine when fromdate and ToDate … | |
Hi to all, I have nothing idea about how to create relation and solve their queries. I want to relation as follows: ------------------------------------------------------------------- BookAuthor(book, author, earnings) BookReference(book, referenceBook, times) BookReview(book, reviewer, score) BookPublih(book, year, publisher, price, numbar) In these database, each book may have 1 or more authors & each … | |
Hi to all, I created the following two table -------------------------------------- create table mail(mid integer primary key, name varchar(20) ) create table phone( pid integer foreign key references mail(email), phone integer) ----------------------------------------- After inserting records on both table, now i want delete perticular record from table say 'delete record of pid=12'. … | |
I have a Windows SBS 2008 system. Occasionally, When I look at the daily report it shows that status of updates as unavailable. The status may be fine for up to 2 weeks or I may get this message every day for 4 or 5 then it disappears for a … | |
I have an existing database design which I would like to normalize. Essentially, the table causing me problems is one with about 150 columns. The table holds live data for a natural gas well. So, there are columns for the various temperatures, pressures, etc. The data types of these columns … |
The End.