2,935 Topics

Member Avatar for
Member Avatar for greatcornholio

Hi all, this is maybe a big stupid question, but cant get this to work thing is that i have 5 tables: airlines - hotels - costs - projects and payments being costs my main table. In this costs table I need to have in the 'total' column the sum …

Member Avatar for greatcornholio
0
199
Member Avatar for spowel4

I'm new to stored procedures and, really anything about sql beyond the basic SELECT/INSERT/etc... so this is probably just something I don't understand but my problem is that my stored procedure seems to only return the last row of the result set (i.e. if it should return 10 items it …

Member Avatar for adam_k
0
1K
Member Avatar for varoluscu_prens

Hi There; I have a MS-SQL server and I have Turkish names in my table. User enters names and I send it to SQL server, print result to output. However, my PHP code process and prints text as a UTF-8, and send it to MS-SQL and print it to output.However …

Member Avatar for diafol
0
163
Member Avatar for pawan768

I try many tips but not able to connect two table with each other! Actually i want something like that , I insert into one table and if data also used by another table (Data automatically insert in another table also by submitting data in first table)

Member Avatar for adam_k
0
143
Member Avatar for ssreevidya.m

Hai , I have a table Student_transport_Details having columns : UserId DesignatonId StartDate Enddate I need to get records for a particular month. Can i retrieve records by passing MonthId [between 1 -12]. Thanks in advance

Member Avatar for red_ruewei
0
5K
Member Avatar for aneeka

Good day! Anyone knows how to select latest record of an item..here's the scenario. I have records with the same data except for the date. Example: product_code productname item_code date PR-123 abc TY-01 2011-10-11 PR-123 abc TY-02 2011-10-11 PR-123 abc TY-01 2011-10-13 PR-123 abc TY-02 2011-10-13 PR-123 abc TY-01 2011-10-16 …

Member Avatar for BitBlt
0
119
Member Avatar for violette

I'm having problem to update the data into mysql database. for insert new data, it works nicely but if i want to update the existing data, it will hang my pc. even if i debug line by line, it shows like infinite loop. which part has gone wrong? i'm totally …

Member Avatar for violette
0
163
Member Avatar for moone009

I have a simple ssis package that grabs data from sql server 2005 then puts that into a flat file and then sends it to my webserver. This package currently just pulls data from one db. I would like it to do this for 10 dbs now therefore creating 10 …

Member Avatar for moone009
0
107
Member Avatar for solomon_13000

When I execute the code below I am getting unknown column 'total' in 'field list' error. [CODE] DELIMITER$$ CREATE PROCEDURE setAuthentication(IN uname varchar(12), IN oldpws VARCHAR(12), IN newpws VARCHAR(12), OUT status INT) BEGIN call getAuthentication(uname,oldpws,@total,@pwsval); IF(total=1 AND pwsval IS NOT NULL) THEN UPDATE authentication SET password = newpws WHERE loginId=uname …

Member Avatar for solomon_13000
-1
405
Member Avatar for Arjun_Sarankulu

create table test2 (Roll_ID int ) insert into test2 values(1) insert into test2 values(2) insert into test2 values(3) insert into test2 values(4) insert into test2 values(5) i want output as RollId

Member Avatar for adam_k
0
87
Member Avatar for phoenix_2000

Heya people, Here's my problem: i have a (for me quite lengthy) piece of SQL code which is automagically generated by my own application. However, when i try to execute it, it gives me an recordSet error ("Either BOF of EOF is true, or the current record has been deleted"). …

Member Avatar for phoenix_2000
0
239
Member Avatar for ssreevidya.m

Hai , I have 2 tables 1. [B]Transport_Details[/B] having columns user_id FareStageId StartDate EndDate and 2. [B]Route_Fee[/B] having columns FareStageId monthId fees I need to get a monthwise list by passing monthid. My problem is that , if start date and enddate of a user are 02-08-2011 and 20-02-2012 and …

Member Avatar for urtrivedi
0
205
Member Avatar for varoluscu_prens

Hi There; I have a problem during connection to a MS-SQL server. I copy the code there: [url]http://www.webcheatsheet.com/PHP/connect_mssql_database.php[/url] [CODE] <?php $myServer = "localhost"; $myUser = "Murat"; $myDB = "examples"; //Point 1 //connection to the database $dbhandle = mssql_connect($myServer, $myUser) or die("Couldn't connect to SQL Server on $myServer"); //Point 2 //select …

Member Avatar for varoluscu_prens
0
295
Member Avatar for ibpet11

Code Warriors, I need to set a value in my SQL database as (1 or 0 ) (true or false) so that when i click a button to insert into the database the column register 1 and when i click the button delete the column register 0. do any warrior …

Member Avatar for buddylee17
0
89
Member Avatar for bilal_fazlani

I have tried this : [CODE]update customers set customers.acc_balance = (select sum (invoices.inv_amount) from customers left join invoices on customers.cust_id=invoices.cust_id group by customers.cust_id)[/CODE] this [CODE]update customers set customers.acc_balance = (select sum (invoices.inv_amount) from customers inner join invoices on customers.cust_id=invoices.cust_id group by customers.cust_id)[/CODE] error is : Subquery returned more than 1 …

Member Avatar for bilal_fazlani
0
258
Member Avatar for shers

Hi, I have a datarow retrieved from a datatable. I have a value that exists in some column in the datarow. I want to find which column this value is in. How can I achieve this please? Thanks

Member Avatar for BitBlt
0
64
Member Avatar for shers

Hi, I have a value which I don't know which column this belongs to in the table. So is there a way I get get those rows that contain this value using query? Thanks

Member Avatar for shers
0
68
Member Avatar for violette

This code supposedly generate a web chart but it does not work. How is the correct way to bind data using SQL into web chart. thank you all :) [CODE]Function GetReader() As IDataReader Dim strSQL As String strSQL = " SELECT aa.alert_id, " strSQL = strSQL & " (SELECT alert_value …

0
59
Member Avatar for mokong

Hi. Good day! Hope you could help me through this. I'm having trouble with my customize table sorting in BIDS. i used this formula in group sorting. [CODE] =Switch(Fields!AGE_CAT.Value = "0 - 1", 1, Fields!AGE_CAT.Value = "2 - 4", 2, Fields!AGE_CAT.Value = "5 - 9", 3, Fields!AGE_CAT.Value = "10 - …

0
81
Member Avatar for ankit.pandey3

Hi friends... I am using Wamp with PHP 5.3 and want to connect with SQL Server 2005 but not successful. I also tried it with PHP 5.2.8 but it still not working. I google it and found some solutions but not successsful yet. Can anyone give me detailed guide (step …

Member Avatar for ankit.pandey3
0
175
Member Avatar for JOSheaIV

Okay so I am completely new to creating a database, and have been trying to create one in Visual Studio 2010 I found this guide on the web and have been following it pretty successfully till I came to spot that I can't get past (here's the link - [url]http://msdn.microsoft.com/en-us/library/dd193408.aspx[/url]) …

Member Avatar for JOSheaIV
0
177
Member Avatar for violette

I need to get data between year and period. 1 year have four periods. i.e; year = 2010 period = 1,2,3,4 the problem is on the period part where i could not select second period smaller from the first period. for example, i choose year=2010 to year=2011 and period=4 to …

Member Avatar for violette
0
186
Member Avatar for violette

Hi. I would like to do insert and update database using data from excel file. before i can insert any data into the db, i have to check whether the field is already in the database or not. the primary key is year_id, period_id and stock_code. IMO, to do data …

0
60
Member Avatar for ibpet11

Pals, I love this site with a passion. Again now i need to know how i can relate different tables together using SQL database with different field. Thank you for your responses.

Member Avatar for sneha_07
0
150
Member Avatar for great_learner

Hi guys, I am writing some query from winforms. I am getting error with the following query: [CODE] string query = "Select [Doctor Name], Day, DateTime, Med_Sur from Doc_Pat_App where (lower([Patient Name])= '" + name + "') and (DateTime >= GetDate()))";[/CODE] I know that there is no mistake till lower() …

Member Avatar for great_learner
0
200
Member Avatar for ssreevidya.m

Hai , I have 2 tables 1. [B]Transport_Details [/B]having columns user_id FareStageId StartDate EndDate and 2. [B]Route_Fee [/B]having columns FareStageId monthId fees I need to get a monthwise list by passing monthid. But my problem is that , if start date and enddate of a user are 02-08-2011 and 20-02-2012 …

Member Avatar for urtrivedi
0
120
Member Avatar for jacksantho

Hi, Anyone please help me out. Am having a table with field name 'status' with the values 'yes' or 'no'. Really, i wants to change this 'yes' or 'no' status automatically using mssql server. But i don't have an idea to continue on this work. for example, now the value …

Member Avatar for jacksantho
0
1K
Member Avatar for scamquist

I have an intranet using php 5.3.8 on Server 2003 using IIS 6.0 and SQL 2005. I run a command to call a batch file that starts and stops sql server and then calls a stored procedure to delete records from a table Items and then refreshes the records from …

Member Avatar for scamquist
0
205
Member Avatar for Traicey

Guys I have a table with image datatype and I wana insert an image in the image field, for example [CODE=SQL]insert into dbo.Products(ProductID, ProductName, ProductPrice, ProductImage) valeus(144, '8 Gig Lenovo memory Stick', 250.00, 'Image from C:Drive or where ever the image residing')[/CODE] Thanx in advance

Member Avatar for yassooo
0
184
Member Avatar for a.muqeet khan

guy i was given a qeustion for my exam that What is the most commonly booked room type for each hotel in London? to this i replied [CODE]SELECT MAX(R.roomno)AS most room selected FROM ROOM.R,HOTEL.H,BOOKING.B GROUP BY roomtype WHERE H.hotelno=B.hotelno AND city='london' [/CODE] my problem is that i dont know if …

Member Avatar for adam_k
0
125

The End.