I'm seeking a solution that would allow persistence without requiring an SQL server to be installed on the host and could be bundled along with a desktop application. Does such a thing exist?
I am Using Oracle 9i and I want to use continue statement or its equivalent in PL/SQL. So is there any keyword called "continue" in oracle 9i. If not, please let me know the solution for this.
I've moved database from one SQL Server instance on a machine to another machine completely. Is there any way to forward requests to the new server automatically so it doesn't require client config changes? Keep in mind it's only one DB out of many on the original server so I can't just forward all requests.
Here's the query
INSERT INTO test_bans( ip, Expiration )
VALUES (
"0.0.0.0", DateAdd(
"d", 1, Date( )
)
)
Here's the table creation query
CREATE TABLE test_bans (
ID smallint(6) NOT NULL AUTO_INCREMENT,
IP text NOT NULL,
Expiration DATETIME NOT NULL,
PRIMARY KEY (ID)
) TYPE=MyISAM;
And here's the error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')))' at line 1
Please help.
I have a need to load an entire LINQ-to-SQL object graph from a certain point downwards, loading all child collections and the objects within them etc. This is going to be used to dump out the object structure and data to XML.
Is there a way to do this without generating a large hard coded set of DataLoadOptions to 'shape' my data?
HI
I am looking for some help I just can't seem to get my head how self joins work. I have this sql code
select Persno'Name',convert(char(20), A_Date , 13)'Logins',acode
from atrail as LOGIN
where acode = 'LOGIN' OR acode = 'LOGOUT'
order by a_date desc
Which produces a list of User names and when the have logged in and out. What I am trying to acheive is to get anther column with the LOGOUT date next to the date they logged in date so that it is easyer to see when they logged in and out.
Thanks
Andy
Hi there,
I'm using SQL Server and I want to use identity constraint in it
I know how to use it in following manner
create table mytable
(
c1 int primary key identity(1,1);
)
the above code works fine but what if i want the identity column to have values as EMP001, EMP002,... instead of 1,2....
Thanks in advance,
Guru
I know you can do bulk XML inserts into SQL Server 2005 tables from your C# code using datasets/datatables.
Is it possible to do the same but as a delete?
Hi
If I have text sotred in my DB, for example:
"There are 2 books on the table".
Maybe the user wants to search for "books" or the user wants to search in this text for any thing.
What is the best SQL Statement to do that?.
Thanks in advance.
Does someone know of a good example of a SQL Injection vulnerability that isn't in a web application? I am looking for a real vulnerability, not speculation. The following picture is an example of a speculated attack.
I need to write a tool to clone a database, instead of detaching it and copying the .mdf and .ldf, wouldn't it be better to just back it up and restore a newly created db?
Is there a way using SQL to create a database from a .bak?
Is it possible to do something like this:
INSERT INTO table(col1, col2) VALUES(something_from_another_table, value);
With something_from_another_table being a SQL command? Like, is there something I can do that's equivelant to:
INSERT INTO table(col1, col2) VALUES((SELECT value FROM table2 WHERE id = 3), value);
I need to clean out a very bloated SQL database by deleting records that are older than two years from a number of tables. What is the most efficient way of doing this? Thanks in advance.
Hi I need some sample MS SQL Employee database with data such as id, surname, name, age, adress etc. It must be quite big, I search with google, but I don't find any good sample.
Can any body help ?
I know a little about SQL injections and URL decode, but can someone who's more of an expert than me on this matter take a look at the following string and tell me what exactly it's trying to do?
Some kid from Beijing a couple weeks ago tried a number of injections like the one below.
%27%20and%20char(124)%2Buser%2Bchar(124)=0%20and%20%27%27=%27
I have a question regarding the Sql Joins.
whenever we join two different tables on some fields.
what will happen exactly inside oracle which will result in the query output.
will there be a temporary table created just for presenting the query output.
Hey, I've just finished writing a VB.NET application. Now I want to package the executable and the database ofcourse into a single installer file. I tried using QSetup, InstallShield to make SQL Server embedded into the setup file, and finally after hours of try&fail I have no idea. Anyone?
I have a form into which the visitor can enter data, and I want to store this data in a mysql database via the $_POST variable. What do I need to prevent sql injection?
I'm working on a mock exam paper at the moment, however I have no set of correct answers and I'm not sure what the correct answer of this SQL query is.
Given a table:
foo, bar
a , 1
b , 3
a , 2
c , 1
and the query:
SELECT foo, sum(bar)
FROM table
GROUP BY foo
The two ways I can see this going are either:
a 3
a 3
b 3
c 1
or
a 3
b 3
c 1
Thanks.
Hi. I'm trying to pivot some data in SQL Server 2000, but the user that runs the application only have read/write permissions. I've looked the solutions posted here, but all involving create/destroy temporary tables.
I have a SQL table it has more than 1000000 rows, and I need to select with the query as you can see below:
SELECT DISTINCT TOP (200) COUNT(1) AS COUNT, KEYWORD
FROM QUERIES WITH(NOLOCK)
WHERE KEYWORD LIKE '%Something%'
GROUP BY KEYWORD ORDER BY 'COUNT' DESC
Could you please tell me how can I optimize it to speed up the execution process? Thank you for useful answers.
How would one go about converting this into a UDF? I'll pass the product_id to the UDF.
Running SQL 2k5
SELECT
sum(qty) as qty,
product_id
FROM vProductQuantity
WHERE
product_id = @product_id
GROUP BY product_id
Hi,
what is index in sql can u explain or any reference to understand clearly. where should i use the index. I search in stackoverflow but it is not clear for me. thank you