2,570 Topics

Member Avatar for
Member Avatar for JerrimePatient
Member Avatar for JerrimePatient
0
185
Member Avatar for Kcachilove

Hello I have an SQL query that i want to concatenate the fields and display it in a way that those concatenated fields will be displayed first row will have 4 columns,second row will also have 4 columns....etc. for instance the query `SELECT imageurl, caption, template FROM template; The Result …

Member Avatar for anejose
0
1K
Member Avatar for rouse

I’m trying to patch a routine and I finally found the problem. I am given the following string: [code] $query = "SELECT title, DATE_FORMAT(event_date, '%Y-%c-%e') AS event_date FROM $dbTable WHERE event_date LIKE '$year-$month%'"; [/code] In the month variable at the end, for the months January through September I am returned …

Member Avatar for rouse
0
316
Member Avatar for rouse

I am looking for help to write a query. I have a database with an ID a Date_Field and a Description. I want to find out two things What Date_Field and Description and Description are the same? {duplicate records} [code] SELECT * FROM TIME_TABLE t1 WHERE EXISTS ( SELECT * …

Member Avatar for rouse
0
171
Member Avatar for Trench37716

I have this gigantic query that returns certain data from my MSSQL Database (working perfectly- Courtesy of djjeavons). I want to sort and arrange this data in order. I want if the user selects a range of dates from the form (ex. November 1, 2014 - November 9, 2014), the …

Member Avatar for J.C. SolvoTerra
0
390
Member Avatar for altjen

Hello... Im having a problem with "like operator" on SQL database Im using this code to search on database Dim DV As New DataView(dbDataSet) DV.RowFilter = String.Format("ID Like '%{0}%'", TextBox1.Text) DataGridView1.DataSource = DV and at textbox1 I type 2 in data grid view show all people who have number 2 …

Member Avatar for altjen
0
305
Member Avatar for rjgapz

$sql = (" SELECT referral1.*, client.*, employee.* FROM ( select r.referral_date,c.lastname,c.middlename,c.firstname,c.gender,r.presenting_problem,e.employee_nickname from client c inner join referral1 r on c.referral_id = r.referral1_id inner join assign_psychotherapist ap on ap.a_referral_id = c.referral_id inner join employee e on ap.a_psychotherapist_id = e.empid where referral_status ='Assigned' OR referral_status ='Accepted' order by referral_date desc ) as …

Member Avatar for rjgapz
0
124
Member Avatar for altjen

Hi, after creating a software with SQL database (my other pc is the data server) this shown up " String or binary data would be truncated. The statement has been terminated " what to do? sometimes it imports the data sometimes it does not...

Member Avatar for altjen
0
95
Member Avatar for rjgapz

$this->db->select('referral1.*, client.*, employee.*'); $this->db->from('client'); $this->db->join('referral1', 'client.referral_id = referral1.referral1_id', 'inner' ); $this->db->join('assign_psychotherapist ', 'assign_psychotherapist.a_referral_id = client.referral_id', 'inner' ); $this->db->join('employee ', 'assign_psychotherapist.a_psychotherapist_id = employee.empid', 'inner' ); $this->db->where("referral_status ='Assigned' OR referral_status ='Accepted' "); $this->db->order_by("referral_date", "desc"); $this->db->select('referral1.*, client.*, volunteer.*'); $this->db->from('client'); $this->db->join('referral1', 'client.referral_id = referral1.referral1_id', 'inner' ); $this->db->join('assignvolunteer', 'assignvolunteer.Vreferralid = client.referral_id', 'inner' ); $this->db->join('volunteer', 'assignvolunteer.Vvolunteerid …

Member Avatar for mangel.murti
0
4K
Member Avatar for hwoarang69

below, I have create a table using oracle sql. How can I change so that number of credits for a course is always between 0 and 6. Any idea how can i do this? CREATE TABLE COURSES (COURSE VARCHAR(6), DESCRIPTION VARCHAR(60), CREDITS INT, CONSTRAINT pk PRIMARY KEY (COURSE));

Member Avatar for diafol
0
221
Member Avatar for hwoarang69

below, I have created 4 tables using oracle sql. I want to change the code so that when deleting a student will delete all enrollments for that student. any idea how can I do this? # COURSES table # CREATE TABLE COURSES (COURSE VARCHAR(6), DESCRIPTION VARCHAR(60), CREDITS INT, CONSTRAINT pk …

Member Avatar for diafol
0
225
Member Avatar for suneet.pant

hi there, for the last one week I am deliberately trying to solve my problem. **Pls help me** For your better understanding, Layout of my page is something like this : Part -A -------- [ Dropdown list ] [ TextBox ] [ Table -1 ] Part - B -------- [ …

Member Avatar for vishal_isharani
0
355
Member Avatar for ruhestorer

Hi, I have a problem with exercise 51 from sql-ex.ru, please help. Thanks in advance. # Short database description "Ships" # The database of naval ships that took part in World War II is under consideration. The database has the following relations: Classes(class, type, country, numGuns, bore, displacement) Ships(name, class, …

Member Avatar for SOURABH_2
0
1K
Member Avatar for olavbundgaard

The database that I'm working for has been suddenly corrupted. Fortunately, I performed a backup on it and save to a backup tape. Therefore, I reinstalled SQL Server and I tried to restore those backup. However, it failed and I suspect that maybe the backup is corrupted too as well. …

Member Avatar for theodorrinder
-1
969
Member Avatar for altjen

how to fix [DBNETLIB] ConnectionOpen(Connect()).]SQL server http://i.gyazo.com/3e7e693141fd157da860907218fbb1a0.png this is UID and password of my SQL server I try to insert but this is the problem I get http://i.gyazo.com/c903e03c7d697b7b8c2c80933e99e376.png and this is at my other pc so had to make pics with my phone. any idea how to fix this?

Member Avatar for altjen
0
571
Member Avatar for Maideen

Hi I am working in weekly Newspaper company. There are 15000 subscriber, subscribed for next 3 to 4 years.Per year 52 weeks and I have to generate issue number based on week(1001......3000) for each subscriber and store into data table. I am using mssql 2012. I have written the Store …

Member Avatar for erikko
0
325
Member Avatar for altjen

Hi Daniweb users :) Im having a problem over here :( Im developing a application on VB and currently using MySQL to connect to a online database but Microsoft(on Albania) wanted us to change from SQL to MySQL data. I HAVE ABSOLUTELY NO IDEA WHAT THE SYNTAX OF CONNECTING SHOULD …

Member Avatar for DaveAmour
0
535
Member Avatar for Stefce

Hello everyone im working on like button which im a little confuzed with my problem i have this sql and im only able to like the tickets which are in my account $sql = "UPDATE `kladilnica` SET Liked = Liked+1 WHERE ticket_id = '".$like."' AND Username = '".$user."'"; but without …

Member Avatar for JorgeM
0
277
Member Avatar for stokie-rich

Hi Guys hope your all well, I have found some code to create a quiz and this I have done, it was working a few weeks ago... but for some reason its now decied to stop working! When I run the page on my localhost I'm getting the following eorror …

Member Avatar for matrixdevuk
0
245
Member Avatar for sirushti

I am developing a social networking website using a**sp.net mvc** and sql server 2008. I need reference links, sites or reference books which help on knowing what are the best practices, code patterns and best third party tools to integrate and work on. Any suggestions from you people will help …

Member Avatar for tlcd_vip
0
272
Member Avatar for boney

Hi, My query: $query = "select * from ( select * from students union all select * from students ) as tmp order by rand() limit 5"; $myquery = mysqli_query($db_connect, $query); while($students = mysqli_fetch_assoc($myquery)){ $stdid =$students['stdid']; $name = $students['name']; $dept = $students['dept']; echo "<br><br>".$stdid."<br>".$name."<br>".$dept; } There are 20 rows for …

Member Avatar for JorgeM
0
154
Member Avatar for slyme

Hello, I am getting a bit confused regarding apostrophes in my SQL statement. I can get it to work but I would like to understand why it works when it does or, conversely, why it doesn't work when it doesn't. If you know what I mean. Anyway - here goes: …

Member Avatar for pritaeas
0
269
Member Avatar for Trench37716

I HAVE A QUERY THIS IS PRODUCING THIS RESULT. EVERYTHING WORKS FINE BUT WHAT I WANT TO ACHIEVE IS SLIGHTLY DIFFERENT. INSTEAD OF HAVING REPEATING IMPORTERS, I WANT TO GROUP THE IMPORTERS/DISTRIBUTOR SO THAT NOTHING CAN REPEAT AND HAVE ALL THE BALANCES IN THREE SEPARATE COLUMNS. BELOW IS MY TABLE …

Member Avatar for Trench37716
0
217
Member Avatar for zurehman

Hi , members please tell me how can i control Data Entry in 3 different table with BeginTranaction / Commit /Rollback in vb.net 2008. i am using sql server 2000 at back end and used SqlClient,SqlConnection, ExecNonQuery method. Thanks Zia

Member Avatar for Naveen_8
0
5K
Member Avatar for terryds

What does PDO::query actually do ? Does it query the SQL ? If it queries the SQL, I think the data must be in the PDOStatement object as the result of the query.. But, what I find is just the SQL statement itself. So, I think it does nothing but …

Member Avatar for cereal
1
226
Member Avatar for Kumar_K_K
Member Avatar for nimz143

Hello :) I'm trying to create web application. I followed the tutorial given in this site : http://aspsnippets.c...-in-ASPNet.aspx My problem now, after I create a table and the UI. Next step show about stored procedure. What is stored procedure use for? Do I need this even though I had a …

Member Avatar for nimz143
0
271
Member Avatar for William Hemsworth

Hi, thanks for any help in advance. I was hoping to get some guidance for getting started with connecting to an SQL database online. I'm writing an application in Win32 which needs to be able to read/write to a database. I have plenty of experience with C++, but almost no …

Member Avatar for William Hemsworth
0
349
Member Avatar for stokie-rich

Morning guys hope your well, at the moment I'm creating a regsiter and log in page for my website. When I load the page on my local host, the page does not show and all that does show is my nav bar. Can anyone give me a hint as to …

Member Avatar for lps
0
184
Member Avatar for Draw

**Hey Daniweb!** A bunch of us have been putting together a web-based drawing app. In a nutshell, users connect in real-time to draw or chat on a sort of interactive whiteboard. Plenty of these are made in Flash, but we are determined to build it in JavaScript and HTML5; a …

Member Avatar for Draw
0
262

The End.