i want to know what is the wrong in this query I want to select all rows for 1 column
string command = "select money from User_Data";
SqlCommand update_money = new SqlCommand(command, con_string.con);
SqlDataReader money_reader;
money_reader = update_money.ExecuteReader();
...
I want to develop the application in which user write query into the text box when it click on the submit button it displays the results in the Grid just just in the Sql Server query analyzer tool i used VS 2008 and application develop in Asp.Net using C#.
Thanks
...
Hello,
I'm trying to customize a table view to display a feed of youtube videos based on a search query. I found this code http://pastebin.com/vmV2c0HT which displays a feed of a YouTube channel in a tableview, it works fine. However, when modifying the viewDidLoad function to search for a query instead of a user feed, I always end up w...
what is the wrong in this Query ?
string command_get_pay = "select Credit
from Update_Company_Credit
where (Update_Date LIKE '%" +
System.DateTime.Today.ToShortDateString() + "%')";
...
what is the syntax of sql query has intersection between 2 "where Like" condition
string command_get_pay = "select Credit
from Update_Company_Credit
where ( Update_Date LIKE '%" + 8 + "%'& Update_Date LIKE 18'%" + 8 + "%')";`
is this true I try it but I got exception in syntax
...
Hi,
I have included an XML file in my InfoPath form as a secondary data source. The data connection is named Divisions. Below is the structure and content of the file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Divisions>
<Division>
<Name>Business Application Services</Name>
<Abbr>BAS</Abbr>
</Divi...
I have two tables, one parent "Point" and one child "PointValue", connected by a single foreign key "PointID", making a one-to-many relation in SQL Server 2005.
I have a LINQ query:
var points = from p in ContextDB.Points
//join v in ContextDB.PointValues on p.PointID equals v.PointID
w...
Hi, I have database with schema on picture below and I need to select everything related to one row (one id) of [letaky]. That means the related [zamestnanci], every related [obsah] and every [knihy] in it.
This is the first time i used relations in database and i have no idea how to make such a select.
...
Suppose I have the following tables:
CREATE TABLE Game (
GameID INT UNSIGNED NOT NULL,
GameType TINYINT UNSIGNED NOT NULL,
PRIMARY KEY (GameID),
INDEX Index_GameType (GameType, GameID)
) ENGINE=INNODB
CREATE TABLE HighScore (
Game INT UNSIGNED NOT NULL,
Score SMALLINT UNSIGNED,
PRIMARY KEY (Game),
INDEX ...
I currently have a SQL query that returns results based on a dynamic number of keywords passed in.
I convert the list of keywords into a table and join to it.
SELECT * FROM Table1
INNER JOIN
dbo.udf_List2Table(@Keywords, ',') ON (Field1 LIKE '%'+Keyword+'%')
This is working fine but it returns all rows that contain an...
Hello. I need to retrieve from database list of manufacturers (table producenci), but only from particular products category. Actual query looks like this, but it returns 0 records. If I remove WHERE, it returns whole table producenci.
SELECT DISTINCT (
pr.id
), pr.nazwa
FROM producenci pr
LEFT JOIN produkty ON pr.id = produkty.produce...
Hi there
In mysql I have a table with like 20 rows (example). I want to write sort order (it is in array that carried picID's) to the SORT column from 1 to x (x is the number of items in this example x=20).
My array starts with: [10,15,1...]
I can do:
UPDATE table SET sort=1 WHERE picID=10
UPDATE table SET sort=2 WHERE picID=15
UPDAT...
I have written a function that takes two arguments and returns a SETOF result.
CREATE FUNCTION foo(parentId bigint, childId bigint)
RETURNS SETOF bar AS
...
I would like to write two "wrappers" for this function that make it simpler to call:
CREATE FUNCTION foo_parent(parentId bigint)
RETURNS SETOF bar AS
...
BEGIN
RETURN ...
How to return a select result with batches through a single query, that should be a straight forward compound select somehow. Below is a sample table and a simple query that will generate the desired result by currently using a temporary numeric column that could not work in the final real world process.
There are only two key columns ...
I know its almost there, but base is telling me it can't find a column called table1.id when I know its there!
UPDATE table2 SET col1 = (SELECT field1 FROM table1 WHERE table2.id = table1.id) WHERE table1.id = table2.id
...
Hey,
at the moment i'm using this validation plugin: (http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/)
but when it comes to the part of validating i have a problem.
If i want to be able to validate a element which doesn't exist from the beginning, it only validates it when i press su...
Hi,
I have my data stored in a MySQL table, which includes an auto_increment ID number (unique) for each new row.
I'd like users to be able to get a certain ID number, using the $_GET function.
eg. User loads http://mysite.com/id.php?id=123
Page displays ID number 123 along with the row.
echo $row['id'];
echo "<table>";
echo "<tr> <t...
Hi,
I am developing some stored procedures in SQL Server 2008.
Some of our customers are running SQL Server 2000.
Is there a way to check whether my queries are compatible without having to install SQL Server 2000? Maybe a transact sql tester?
Regards,
Michel
...
I want my site to have a random "welcome" page.
I've found a plugin that redirects to a random page. I want to specify a parent page that random child pages are selected from.
This is the query that the plug-in uses:
$query = "SELECT ID FROM $wpdb->posts WHERE post_type = 'page' AND post_password = '' AND post_status = 'publish' ORDE...
Hi,
I would like to know if a mysql IN can be used as a AND statement:
SELECT item_id
FROM table_items as a i
WHERE i.attribute_id
IN (
SELECT attribute_id
FROM table_attribute as a
WHERE [..]
)
I want to select the items from table_b who contains all the values selected in table_a.
In other words the previous query is selectin...