Before I get into my question let me give you a little background on me first. I am a ASP programmer and I know enough about SQL Server (user side) to manipulate records to check my screens.
As the title suggests, I am not able to delete a record from an sql table and I was able to about 2 months ago. About 6 months ago the DBA had t...
Hi,
I have this simple JCR_SQL2 query:
SELECT * FROM [my:type]
I'm running it like so:
final QueryManager qMan = session.getWorkspace().getQueryManager();
final Query q = qMan.createQuery("SELECT * FROM [my:type]", Query.JCR_SQL2);
final QueryResult qResult = q.execute();
return qResult.getNodes();
on a workspace which is indexed (a...
I have a web application that utilizes the ReportViewer control in ASP.NET. The reports are defined in the web application, in .rdlc files.
The reports work great, except for the printing functionality. When the user clicks the "print" icon in the header section of the report, it appears that the web app tries to install SQL Server (?!)...
In sql is it possible to script permissions as one can with the stored proc itself? So that I can simply tell somebody to hit execute and the proc and permissions just get created all at once.
...
Given these two tables:
[dbo].[Task]
[Id] [Duration] [ScheduledStart]
int int Nullable DateTime
[dbo].[TaskDependencies]
[Id] [PredecessorTaskId] [TaskId]
int FK_Task_Id FK_Task_Id
I'm trying to find the latest end date of the Tasks immediate predecessors. For the Task table, ScheduledStart is nullab...
We have a fairly large database (in SQL Server 2008) with many tables. We have just bought Red Gate's SQL Doc for documentation purposes. We would like to document this database in a detailed way. What is the best practice in documenting a database? How do you document your attributes with definitions? SQL Doc documents the database nice...
Hi,
I want to insert a page_number in a record that continuously count base on duplicate in a column. example output:
ID PAGE_ORDER PAGE_NUMBER
1 7 1
2 7 1
3 7 1
4 7 1
5 7 1
6 10 2
7 10 2...
How can rows with Non-Ascii Characters be returned using SQL Server?
If you can show how to do it for one column would be great.
I am doing something like this now but it is not working
select *
from Staging.APARMRE1 AS ar
where ar.Line like '%[^!-~ ]%'
For extra credit, if it can span ALL VARCHAR columns in a Table would be outst...
I've got a table with millions of rows.
The PK of that table is an Int column. User wants to be able to do wildcard search on rows of that table by that PK. When doing this query the trivial way, it will be horribly slow, as Sql server does an implicit conversion of the column value from int to char in order to apply the wildcard every s...
What is the best free library in .NET to :
select, insert, update data in SQL Server with best performance (low level)
launch stored procedure
generate automatically object layer (1 object = 1 table) without relationnal link (foreign key is only id - 'int')
I don't want to use EF (very bad performance)
Thank you
...
I have two tables with identical structure and VERY LARGE number of fields (about 1000). I need to perform 2 operations
1) Insert from the second table all rows into the fist. Example:
INSERT INTO [1607348182]
SELECT *
FROM _tmp_1607348182;
2) Update the first table from the second table
but for update i can't found proper sql synt...
Problem: we need to install SQL 2008 R2 Express with Management tools on about 24 physical machines of various OS flavors.
...
I probably didn't word the question right buy I have a query that is taking a substantial amount of time because of 'or'.
select stuff
from table1 T1
left join table2 T2 on T2.field1 = T1.field or T2.field2 = T1.field
where some condition
I have to check both fields to join. Is there a better way to do this?
...
I am doing a inner join between two tables where one is an association table, so there is a many to one relationship. I am trying to come up with a query that can decide if the key on the join exist more than once than store a value multiple in the update column, but not sure the efficient way to make this happen:
SELECT
MainTable.Na...
Hi i am new to Pyqt and i am wondering if it is possible to have goodness of sqlalchemy e.g. connection pooling and managing, abstracting away all the menial low level details?
...
Hi all,
I am looking for tools that I can use to audit the security of my database at the moment. Does anyone have any resources on this? I am running postgres, so that will take precedence.
...
Hi I am doing a task using socket programming,in this I have database on server side and whenver any employee update any table ,server should notify all employee by triggring pop up on employee pc.my question is how to get any update from server and how to trigger pop up on server notifivation.plz help me.
...
MySQL provides a string function named FIELD() which accepts a variable number of arguments. The return value is the location of the first argument in the list of the remaining ones. In other words:
FIELD('d', 'a', 'b', 'c', 'd', 'e', 'f')
would return 4 since 'd' is the fourth argument following the first.
This function provides t...
The query below fetches the wageTypeID based on the current active hiring info record and salary record.
SELECT wt.wageTypeID
FROM TimeSheet t
INNER JOIN Employee e ON e.employeeID = t.employeeID
INNER JOIN Salary s ON s.salaryID = t.salaryID
INNER JOIN Wage w ON w.wageID = s.wageID
INNER JOIN EmpHiringInfo ehf ON ehf.Emp...
When should I be using JOIN ON or WHERE in a scenario like the one below?
DECLARE
@PhoneNumber int = 5551234
-- JOIN ON
SELECT *
FROM Persons
JOIN Employees ON Persons.DateOfBirth = Employee.DateOfBirth AND
Persons.PhoneNumber = Employees.PhoneNumber
WHERE Persons.PhoneNumber = @PhoneNumber
-- WHERE
SELECT *
FROM Persons
JOIN Employ...