Hi,
Can anyone please help me?
I am having bunch of .sql files. I want to parse (validate) those files before executing them on server.
I have many online sites which parse the code. But I want to parse the code using C#.
So please can you guide. If there is any tool, dll I need to use.
I just want to parse the file and not execute it
With respect to an application that has both a web and desktop client version:
What is the best practice for the desktop client which needs access to a SQL Server?
What are the benefits of connecting to the database from the application vs using a web service?
Which one provides better security?
What type of scope would call for one vs the other (enterprise intranet vs. web app, etc)
Are there any other considerations that are necessary when choosing on platform?
Using Linq to SQL:
if(!parentlist.childlist.Contains(row1))
parentlist.childlist.Add(row1);
else
How do I update the required childlist row with row1? Each row of the child list has a unique id.
parentlist implements IEnumerable and childlist is IList.
I have table and I want to swap the values from two rows. I have the rows IDs of the two rows.
Is there any query to do that? Here is an example. Before the query I have this:
row1 : 1,2,3
row2 : 5,6,7
After the swap I want this:
row1 : 5,6,7
row2 : 1,2,3
I don't want write it in .NET code because I think an SQL query is easier than that.
I would like to understand how exactly does sql count work. Is it a whole table scan that happens or is it some property of the table that is read. However I feel a table scan would be an overhead in case of huge tables with lots of records.
Hi Friends,
Could anybody help me by giving some good websites that are describing about T-SQL commands. I am a new guy in this field. thanks in advance..
$sql = 'SELECT
id,
DATE_FORMAT(date,"%d.%m.%Y - %H.%i Uhr") AS dat,
user1,
user2,
p_user1,
p_user2,
be_user1,
be_user2,
win
FROM
kok_1on1_matches
WHERE
user1="$user"
OR
user2="$user"';
What is wrong with the WHERE statement?
I have a very simple INSERT statement being executed from a PHP script running on a Linux Apache web server. I can run the query fine from within SQL Management Studio and it normally runs fine from PHP as well. However, every once in awhile I get an error message from my PHP script that the query failed and the mssql_get_last_message() function returns 'The statement has been terminated'.
What sources can cause this message to be returned from MSSQL?
Good Morning,
I have connected to my SQL Server 2005 - and have managed to list all of the databases on that server. Now I would like to run a check on each database to see if I have permission to view that database..
How would I go about this?
Many Thanks,
Joel
Hello,
I've a SQL statement that returns a xml result, for a serialized object.I want to add a attribute to an element, that reflects the type of the object "xsi:type=table" but i don't know how?
SELECT TotalItems.Total_Items
,TotalItems.No_Items_Present
,ItemsTable.No_Of_Items_Ret
FROM TotalItems
INNER JOIN ItemsTable ON
ItemsTable.Item_Name= '" + DropItemName.SelectedValue + "'"
this is my SQL query what I want is to retrieve two column values corresponding to the item I enter in my dropdown list from one table and the no_of_items_ret from another table satisfying the condition of the dropdownlist
I'm getting all the values corresponding to any item I enter what should i do?
Hi,
i have an strange problem. I want to select "timestamps" from an DB Table with Distinct and orderded by timestamp.
ID TimeStamp
-- ---------
1 123456789
2 123456789
3 333333333
4 334345643
In my PHP Script:
$sql = "SELECT DISTINCT TIMESTAMP FROM TIMESTAMPS ORDER BY TIMESTAMP"
When i use order by, the values are returned twice? Without order by the
result is correct.. but not sorted.
We are using Oracle 10g
Any ideaS?
Hi
I want to log in the console or in a file, all the queries that Grails do, to check performance.
I had configured [this][1] without success.
Any idea would help.
[1]: http://www.grails.org/FAQ#Q: How can I turn on logging for hibernate in order to see SQL statements, input parameters and output results?
Is there any handy tool that can make updating tables easier? Usually I got an Excel file with the original value in one column and new value in another column. Then I write a formula in Excel to create the 'update' statement. Is there any way to simplify the updating task?
I believe the approach in SQL server 2000 and 2005 would be different, so could we discuss them both? Thanks.
sorry if this is a repeat, i looked around some and didnt find what i was after so here goes
SELECT * FROM trees WHERE trees.`title` LIKE '%elm%'
this works fine, but not if the tree is named Elm or ELM ect... how do i make sql case insensitive for this wild-card search?
again apologies if this is repeated.
oh, using MySql 5 on apache
EXEC [dbo].[pr_cfgAddFact]
@SettingName = 'TransferBatch',
@RoleFK = SELECT TOP 1 rolepk FROM cfgRole WHERE cfgRole.Name = 'SuperAdmin'
Why would SQL complain about the SELECT clause here? I am trying to run the proc with the sub query getting the data.
i've read a lot about ORM but wondering if there are side by side comparison examples between an ORM like doctrine and SQL so that you could see what is more easier to maintain?
couldn't find such comparisons in google.
I am trying to set the default value for a new column I just added. In properties I am trying to set 'Default Value or Binding' to a simple XML along the lines of: <root><title>Welcome</title><body>Thank you for your time.</body></root>
However, when I click away, I get "sql error validating the default for column," I set this value in other numerical columns and it worked fine. What gives?
I am using VS2010 and C#
When I map/select my database tables with LINQ to SQL I have to option to change the "member" propery, but when i delete the table (because I changed something in the schema for example) and add it again the member value gets "reset". Is it possible to set/override this member programmaticly, so that I dont have to change it by hand everytime
I mean the member option of
'<'Table Name="dbo.table1" Member="table1"
Is there any way to convert differential backup to SQL statements which will produce identical results when applied?
Or any other solution similar to binary log in MySQL?