source filename not working
i am trying to run a sql file with this code: source filename.sql and it says failed to open file ...
i am trying to run a sql file with this code: source filename.sql and it says failed to open file ...
Dear stackoverflowers I am using mysql and trying to block unwanted queries injection of people who will try to use my single query to run several ones. ie, for example when i have the parameter "?id=3", people can try to run it with ="id=3;drop table users" Now, i know that the best way to avoid this is by parsing and checking the par...
I have two MS SQL 2005 servers, one for production and one for test and both have a Recovery Model of Full. I restore a backup of the production database to the test server and then have users make changes. I want to be able to: Roll back all the changes made to the test SQL server Apply all the transactions that have occurred on the ...
what is the default value of a variable (VARCHAR2) at the time of declaration in PL SQL? Can i check it against NULL once after i declare a variable? ...
I have a composite PK in table Strings (integer id, varchar(2) lang) I want to create a FK to ONLY the id half of the PK from other tables. This means I'd have potentially many rows in Strings table (translations) matching the FK. I just need to store the id, and have referential integrity maintained by the DB. Is this possible? If so,...
Does anyone know how to create an entire database from a visual studio database project? Rather then running logs of smaller scripts individually. Thanks ...
Executing the following statement with SQL Server 2005 (My tests are through SSMS) results in success upon first execution and failure upon subsequent executions. IF OBJECT_ID('tempdb..#test') IS NULL CREATE TABLE #test ( GoodColumn INT ) IF 1 = 0 SELECT BadColumn FROM #test What this means is that something is co...
How can I handle an array in a prepared statement? i.e, I want to do a query and one of the parameters I get is an array of strings which I want to use in the query (Don't select rows that have a field that's in the array)? ...
I have a database consisting of 4 or 5 columns, and i want to provide a simple display for that. What WPF control would be best suited to showing the data? ...
I'm using the following code: INSERT INTO tForeignLanguage ([Name]) VALUES ('Араб') this value inserted like this '????' How do I insert unicode text from the sql management studio query window? ...
create table d(id numeric(1), code varchar(2)) After I create the above table how can I add a composite primary key on both fields and also a foreign key? ...
create table re(id numeric(1),bin varchar(10)) how to add not null on table as well as foreign key ...
I have created script to find selectivity of each columns for every tables. In those some tables with less than 100 rows but selectivity of column is more than 50%. where Selectivity = Distinct Values / Total Number Rows So, is those column are eligible for index? Or, can you tell, how much minimum rows require for eligibility for creat...
Ive been searching for Linq tutorials online and came across some articles saying that linq may go away? What is your take on this? Will microsoft really do away with linq ...
I'm not new to Rails but I've not done anything quite so complicated as this so far, so I'm curious what a more experienced rails developer might share: I have a sql query which joins 4 or so tables into one output: SELECT places.id, places.name, places.email, places.website, places.blurb, external_ratings.rating, photos.data_file_name...
I would like to track how many surveys have been done by different departments at work. This is fairly easy to do by using "Group by" and counting the number of matches. SELECT Departments.DepartmentName, count(*) as [survey count] FROM Departments INNER JOIN Surveys ON Departments.DepartmentID = Surveys.D...
I heard that SQL is faster if table relationships are defined. Is this true? Or maybe it's slower, I would like to know. ...
A user can search for colours and add them to their palette.. So if they write blue, blue will show up and they can add it. so on with red, yellow....... But I want, that if they choose "dark colors", then grey black and brown should be added. Today I´m doing like this if($color==darkcolor) insert black and grey and brown... Is ...
Scenerio: I have a folder table with hierarchical records. The ID of the row is of type GUID. A ParentID on the tables stores the parent folder ID: ID (Guid) FolderName (varchar) ParentID (Guid) Question: What is the best practice for inserting a top-level folder? Should I make the parentID column null, or create a "top level" r...
I have a text column that should only have 1 of 3 possible strings. To put a constraint on it, I would have to reference another table. Can I instead put the values of the constraint directly on the column without referring to another table? ...