2,569 Topics

Member Avatar for
Member Avatar for 47pirates

I'm trying to make a search by different option say A, B . what i need is if user provide value of A only then it does the searching using parameter A only , if user provide A and B then it needs to do searching using condition A=value1 AND …

Member Avatar for 47pirates
0
307
Member Avatar for ShaggyDogg

I'm extending a website built in ASP.NET to display Spiceworks reports - basic SQL queries. The easist way (with my knowledge) is to connect to the Spiceworks db through both Management Studio and Visual Studio. I have therefore followed this '[how to](http://community.spiceworks.com/how_to/show/2271http://www.)' in this forum, plus a few others, to …

0
169
Member Avatar for neoseeker191

I have looked through a few SQL hierarchy tutorials, but none of them made much sense for my application. Perhaps I am just not understanding them correctly. I'm writing a C# ASP.NET application and I would like to create a tree view hierarchy from SQL data. This is how the …

Member Avatar for Momerath
0
4K
Member Avatar for JellybeanFB

"UPDATE P SET Stock = T.Stock FROM prices P INNER JOIN #prices " + "T ON P.Avg = T.Avg AND P.Colour = T.Colour;" + " " + "INSERT INTO prices(Avg, Colour, Stock) SELECT T.Avg, T.Colour, T.Stock FROM #prices T " + "WHERE NOT EXISTS (SELECT 1 FROM prices P WHERE …

Member Avatar for taskman
0
186
Member Avatar for renzlo

Hi, All, Sample Table Job_ID Job_Name Status 1 TEST00001 FOR KE 2 TEST00002 FOR KE 3 TEST00003 FOR KE 4 TEST00004 FOR KE 5 TEST00005 FOR KE I have sql query that will get a jobname where status is equal to 'FOR KE' and I have multiple users that will …

Member Avatar for renzlo
0
349
Member Avatar for gispe

Hi, Im trying to insert to a table in sql that is related to another by a foreign key. The first table has an ID, a suppliers id and a date; and the other table has an ID (that for some records should have the same id from the other …

0
126
Member Avatar for fabzster

Hi I have a MYSQL DB hosted on a Win 2003 server on my LAN and a Mysql DB on a dedicated (linux) server at our ISP. I would like to dump a few tables to a .sql file and ftp it to the server and then import the .sql …

Member Avatar for fabzster
0
185
Member Avatar for Japri

Hello all, nice to know this helpfull forum, I'm a totally newbie and I need advice, I want to import a CSV to a table in sql, but the problem is the CSV has very strange format. ================================== Telephone,=,'88213839 Name,=,John Doe Currency,=,USD Date,Information,Source,Total,,Balance '30/04,ATM 28/04 ,'0000,000000000500000.00,DB,1.171892966E7 '30/04,DEBIT 28/04 LAWSON,'0000,000000000092100.00,DB,1.162682966E7 '30/04,DEBIT …

Member Avatar for diafol
0
110
Member Avatar for hueikar

I am trying to insert and retrieve image from sql server into window phone. and the image type would be varbinary. I cant find example for it.. Mostly the related post is about retrieve from url or isolated image.. Any help? Thank you.

0
96
Member Avatar for G_Waddell

Hi I have a real conumdrum here - I just can't expalin this behaviour!! A colleague has designed a view that contains the following : `CONVERT (nvarchar(4),YEAR(dbo.SYSFinancialYear.FinancialYearStartDate)) + N'/' + RIGHT ('00' + RTRIM(CONVERT (nvarchar(2), dbo.SYSAccountingPeriod.PeriodNumber)), 2) As YearPeriod` When you are in the design view, of the view and …

Member Avatar for G_Waddell
0
153
Member Avatar for jeffadrian

here is my sql data from my search.php page mysql_connect("localhost", "username", "password") or die( mysql_error() ); mysql_select_db("dbname") or die( mysql_error() ); mysql_query("SET NAMES utf8"); $find = strtoupper($find); $find = strip_tags($find); $find = trim ($find); mysql_query("SET NAMES utf8"); $data = mysql_query("SELECT * from database WHERE upper($field) LIKE'%$find%' ORDER BY Catalog ASC"); …

Member Avatar for jeffadrian
0
249
Member Avatar for kindofsudden

I am new to dealing with SQL Express DB tables. I have a Windows application that gives the user a textbox that is bound to a value in my dataset (ds) which reflects my SQL table (Specs) field. The user can change the numeric value of the textbox and I …

Member Avatar for kindofsudden
0
238
Member Avatar for hwoarang69

trying to build a database for user can upload images and stuff. i want to do so that 1-user can upload image 2-name image 3-discribe image 4-how many views that image have 5-how many fav image have 6-list all the messages(comments) 7-number of comments so i could need 9 fields? …

Member Avatar for adam_k
0
172
Member Avatar for HiWorld

I am stuck on a problem, and can't seem to figure out why this isn't working, when I am pretty sure it should be... I am trying to get my code to delete users from the dropdown list after the admin hits the delete button within the page. The form's …

Member Avatar for HiWorld
0
359
Member Avatar for |-|x

I have a datasource on my page, the select query of which creates a pivot table. The complexity is that the columns in the pivot are determined by records in another table (the users table). So I have to use a prepared statement to build and execute the pivot query, …

Member Avatar for |-|x
0
334
Member Avatar for azareth

I can't update my database by using select .. i've tried searching for different solutions but those didn't helped me .. any ideas why this doesn't update my DB?? i need to update the row with such conditions: the query/queries i used $records = mysql_query("SELECT * FROM cot_cargovolume WHERE VoyageNo …

Member Avatar for diafol
0
161
Member Avatar for soUPERMan

I have two tables namely student and subject joined by a table called student_subject. With the following structure student: +----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+--------------+------+-----+---------+----------------+ | student_ID | int(11) | NO | PRI | NULL | auto_increment | | studentCode | …

Member Avatar for soUPERMan
0
123
Member Avatar for BenzZz

Hi, I have a php file that contains the queries as strings. I have wrote the following query: SELECT message_no, sender, destination, time_received, type, reference_no, message FROM messages WHERE message LIKE '%:substring%'; :substring is then assigned a value from $substring. The query works when i run it directly in cmd …

Member Avatar for simplypixie
0
254
Member Avatar for 21KristianN

Hello everyone, im doing a small program where i have a stock table with my Items and the current stock status. How do i substract from that stock status when i insert a new order in my ordertable. My tables are: STOCK: Item_ID Stock status ORDER Item_FK: Qty So i …

Member Avatar for Philippe.Lahaie
0
139
Member Avatar for manhthaodn

For the purpose of synchronizing data in sql server, such as: **1. Synchronize data between servers and client 2. When loss of internet, the client can still work based on the data required to run on the client. 3. When have the internet connection, data from workstations to be synchronized …

Member Avatar for maniat123
0
131
Member Avatar for Szabi Zsoldos

Hello, I've built a timekeeping aplication from a fingerprint machine with automatic import to db and I'm getting some reports. One report is that I'm getting the employees time if they are late from work. But my table is small with 20.000 entries, but with the following query, the results …

Member Avatar for maniat123
1
229
Member Avatar for mancode1007

halo guys, I having problem executing the SQL statement in the visual studio but when in the MySQL it work fine. Here are my code. Dim sql As String = "SELECT * FROM (SELECT @row:= @row + 1 AS rowNum, std.* FROM Student std ,(SELECT @row:= 0) r) AS t …

Member Avatar for wen_cai
0
166
Member Avatar for karanits

I know there are multiple variations of this question here, but not in this form. My Ledger table, in a basic form have the following columns. TransactionID | DateOfEntrydate | TransactionDate | ClientID | TrIsDebit | OpeningBalance | Amount | ClosingBalance DateOfEntry is a colums which stores time of insert …

Member Avatar for karanits
0
1K
Member Avatar for qwertpink

Hi all, i have a table for instance, systemid | phonenumber 1 62222222 1 92222222 1 64444444 2 91111111 3 63333333 3 63333333 i want my select query output to be systemid | phonenumber | phonenumber2 | phonenumber3 1 62222222 92222222 64444444 2 91111111 3 63333333 63333333 I tried to …

Member Avatar for seslie
0
116
Member Avatar for renzlo

Hi, All, I have a data table that looks like this: USERNAME ICOUNT IAVERAGE DATE_LOGGED LAGX01 1245 1245 05-07-2012 LAGX02 2211 1422 05-07-2012 LAGX03 1698 1112 05-07-2012 LAGX04 4598 1555 05-07-2012 LAGX05 2589 3245 05-07-2012 LAGX06 3321 1155 05-07-2012 LAGX07 3698 3458 05-07-2012 LAGX08 2589 4587 05-07-2012 LAGX09 1598 1142 …

Member Avatar for renzlo
0
379
Member Avatar for Pamilerin

In sql server , my query brings out more than one row of data SELECT * FROM TABLE 1 WHERE COLUMN LIKE 'PARAMETER' Now i am trying to make it in a dtagrid that the datagrid shows allpossible rows that is supposed to show .This is the code Dim objCommand …

Member Avatar for Pamilerin
0
853
Member Avatar for Pamilerin

I have a problem trying to link my my datagrid view to my sql server stored procedure. The way it should work is that when I select an item in a list from my combo box it returns a set of rows on the datagrid view specific only to that …

Member Avatar for Pamilerin
0
1K
Member Avatar for DAlexNagy

Hi all! I am looking for some advice on how to best design C++ programs that read, write, and update data in MySQL databases. I have completed a system that successfully does this but I'm not sure if I designed it the right way to take advantage of OOP principles …

0
125
Member Avatar for lewis92

Hi I populate a drop down menu like this: <select name="mySelect"> <?php $result= mysql_query('SELECT DISTINCT Year FROM MonthlySales'); ?> <?php while($row= mysql_fetch_assoc($result)) { ?> <option value="<?php echo htmlspecialchars($row['Year']);?>"> <?php echo htmlspecialchars($row['Year']); ?> </option> <?php } ?> </select> Then build a HTML table like this: <?php while( $row = mysql_fetch_row($results) ) …

Member Avatar for diafol
0
1K
Member Avatar for wipeskim

i have a table with day_date and price each record is displayed as below: Day_date Price Allotment 2012-05-20 500 2 2012-05-21 500 2 2012-05-22 500 2 2012-05-23 600 4 2012-05-24 600 4 2012-05-25 500 7 2012-05-26 500 7 2012-05-27 700 2 2012-05-28 700 2 what i want to do is …

Member Avatar for smantscheff
0
167
Member Avatar for lfmconsummates

I currently have this login form in my python program with a submit button: <input type="text" class="input-small" placeholder="Email"> <input type="password" class="input-small" placeholder="Password"> and I have an sql database that has emails/logins/etc. How do I make it so the after pushing the submit button, the email/password is verified with the database …

Member Avatar for lfmconsummates
0
126
Member Avatar for moone009

I need help with the format for single qoutes. I am using dynamic sql in an SSRS for error trapping records inserted with single qoutes during bulk imports but I cannot seem to format the actual select statement properly. SQL Sever 2005 Dev edition. Any help is great. Declare @DB …

Member Avatar for BitBlt
0
139
Member Avatar for grako84

Hi folks! I got a little problem with my assignment. The idea is to create online bookstore. As far didn't have much troubles with the project, until now. Problem occures when I'm trying to update/delete an entry to mySql. if you take a look at line 93 - there is …

Member Avatar for fobos
0
241
Member Avatar for blaaam

Hi! I have started learn about Query and PHP, and i don't know what to do next. I have made table with query help i can show in table records from my Database, so far i have well, but next what i want to do is every record in table …

Member Avatar for Biiim
0
325
Member Avatar for jdm3

Hello, I'm new with Python and running into an error trying to print data I have retrieved from a database. The code works but there are characters being printed with it that are not displayed in the database...here is my current code: con = mysql.connect(host="silo.soic.indiana.edu", port=3306, user="XXXXXXX", passwd="XXXXXX", db="XXXXXXXXX") cursor …

Member Avatar for TrustyTony
0
260
Member Avatar for Rahmania03

Hello Friends, I m Developing an windows form application. i have a winform on which i have datagridview and i am saving the data to Sql Server database from datagridview directly . i m using the following code for connecting & saving data of datagridview to database using button click …

0
116
Member Avatar for Mko_

So, I have this following snippet of code: if (isset($_POST['type1'])) { mysql_query("UPDATE table SET status = 1 WHERE id = '". $_GET['repid']."'", $c2) or die(mysql_error()); } if (isset($_POST['type2'])) { mysql_query("UPDATE table SET status = 1 WHERE id = '". $_GET['repid']."'", $c2) or die(mysql_error()); } if (isset($_POST['type3'])) { mysql_query("UPDATE table SET …

Member Avatar for fobos
0
132
Member Avatar for renzlo

Hi Java Developers, I don't know if this is the right place to ask but I hope It is. First of all this is not my programming language, I am an intermediate .net developer, I just came up with this problem that I need to solve which what the thread …

Member Avatar for renzlo
0
328
Member Avatar for dinhunzvi

how do i create service accounts for the various SQL Server 2008 components?

Member Avatar for adam_k
0
68
Member Avatar for |-|x

I have a query in which I need to display some group function figures SUM COUNT etc from a joined table. I also need to select the latest version (by datetime) of a matching record from a separate table, which I can do using an ordered subquery in the join. …

Member Avatar for |-|x
0
214
Member Avatar for Pamilerin

can any body help me by giving me a guideline on how to insert data from a populated datagrid into sql server table and how to make the values conform to the specified datatypes constructe in the sql server side...assuming the datagrid headings have already been created in the sql …

Member Avatar for Begginnerdev
0
849
Member Avatar for smartadolf

am total newbie to programming, apart from knowing SQL, the thing is i have been given a MYSQL database containing various information about kids diseases and a web interface written in php to create reports from the database that can be accessed via the interface. there are almost 25 different …

Member Avatar for smartadolf
0
171
Member Avatar for Skeldave

Hi, I am getting the following error and I cannot understand why. SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. Before i try and insert the data into the database I print it out and this is what i get: **09/04/2012 00:00:00** The code below is …

0
94
Member Avatar for zhouy

Dear All, I am using VB.NET 2010 and SQL Sever CE 3.5 database. I insert some data into my database (SDF file) and I can do any all manipulations with those data. But I cannot see those data in the data table using Data Source or Server Explorer in Visual …

Member Avatar for artemix22
0
83
Member Avatar for akingcool

so i've been working on a database in oracle for a booking system and I am trying to create dyanmic query results... was just wondering if there is a way to create a query to add up all the seats in a arena with booking numbers (not necessarily the same …

Member Avatar for JorgeM
0
114
Member Avatar for aldm

Hi, I need to create windows services that will back up MS SQL database. Parameter should be time period when I want to backup database (for example every hours, every 2 hours etc). I haven't any experience with backing up database. Once I made WCF service. How can I do …

0
93
Member Avatar for RazorRamon

Ok I need help. I have a couple hundred databases, which are different cities, that I am trying to connect with one query. each city has the same Sports table in it. I want to put the 100 most recent results on one page . The code below gets the …

Member Avatar for Biiim
0
1K
Member Avatar for mikeybware

I have an SQL select statement that I cannot quite get working. Dim SelectStr As String = "SELECT * FROM Appointments WHERE Doctor = '" & ComboBox1.Text & "' AND AptDate = #" & DateTimePicker1.Text & "#" This works perfect ... however I have 2 more WHERE possibilities ... I …

Member Avatar for poojavb
0
179
Member Avatar for circuit009

Hello, I am working on a C# application where i have to store values of article in sql server as i have 3 products (stone, diamonds, jewellery). Now during the initial process when i enter the product details let say i have to store value for a diamonds i put …

Member Avatar for arunkumars
0
137
Member Avatar for jacksantho

Hi, On executing CROSS APPLY Clause using UDF: create function Reg(@pc int,@pp varchar(15)) Returns Table As Return select cr from crt where piod=@pc and cr=@pp Go select distinct a.cr from cdet AS a CROSS APPLY Reg(a.cr,a.piod) AS a where a.piod='208'** Am getting this following errors: Incorrect Syntax near '-'. Thanks.

Member Avatar for BitBlt
0
311

The End.