|
Hope this will help you.
<br />
where phoneId not in <br />
( <br />
select phoneId from bkPhone order by phoneid asc limit 1<br />
<br />
)
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
hi, anyone can help me installing SQL Server 2005 Developer Edtion.
I have a screenshot of the error after installing the SQL Server 2005.
http://s713.photobucket.com/albums/ww134/vhanjess/?action=view¤t=Step11.jpg[^]
Actually, i'm installing this for 1 week now and i don't know how to fixed it. Maybe one of you will help me to fixed this.
Thanks and Regards
klaydze
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|
|
At a guess you have permissioning issues. Have you created a user for SQL and the services to use.
No one can really help you based on a screen shot of the installation summary. Study the detail of the errors, the first one probably caused all the others so fix it first. Go through the installation directions IN DETAIL, there are 1000s of developer versions installed out there so it is not rocket science.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi, thanks for the reply. My OS is Windows Vista Home Premium Edition.
I read many instruction on how to properly install this, i also follow some KB but no one help me to install the SQL.
Thanks and Regards.
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|
|
hi all,,,
i have a database with a large log file database and i don't know how to do to make it smaller,,,
the file have a large area space what can i do?
thanks in advance,,,
modified on Saturday, March 21, 2009 4:55 PM
|
|
|
|
|
You can shrink the logfile on demand. There's help on how to do that from the Management Studio here[^], or if you want to do this from SQL, look here[^].
That will only help until the file fills up again, or you'll have to hunt down the reason why the logfile is filling up. The documentation on the transaction log can be found here[^].
Good luck
I are troll
|
|
|
|
|
|
Hi
How to activate Oracle server ?
and how to close ?
thank's
|
|
|
|
|
Hi All,
In general, Sql Server having its default password. We can change the password also. But if I want to set a password for individual Databases in SqlServer 2005,
is it possible ?
Thanks in advance.
|
|
|
|
|
I don't believe so. Logins and passwords aren't specified at the database level - but users are. I guess you'd say that logins are specified at the instance level. Logins are then mapped to users. You could create different logins and only give them access to specific databases.
Scott
|
|
|
|
|
scottgp is correct.
dont map the database(s) that you dont want the user to have access to for that login.
|
|
|
|
|
Now days I m working to construct a Relational Database in SQL Server2005 for a school student's Results. in which I've to plase following columns...
Calss Name, Class Section, Student RollNumber, Student Name, Student's Father Name, Student Address, Student Registration Number, Subjects Names, Totla Marks Assigned to each subject, obtained marks from each subject, CGPA, Percentage, Exam Session.
those above all are the necessary columns those I've to add up in a sequence that different classes lets suppose class name= 1 & calss section=1 & then class name=1 & class section =2 similarly multiple sections can have in each class & also I've to use upto 12 classes having their multiple sections.
second thing where I m facing great problem while relating tables is that I can't understand that how to arrage exam session table??? in whitch multiple sessions can be added according to owners demand. & finally how subjects & their marks can be assigned & manuplated....
can anyone help me throughout in making this relational database or just to designing a database diagram on that I can simply use select update & delete queiries & othere quires such as selecting specific class data of students results for the specific exam session or for a specific student's result for specific exam session??? can anyone help me throughout as soon as possible??? coz I've just one day left all other things are finalized now I've to just construct database & their procedures that where what to retrieve. so plz help me throught...
waiting for your urgent & quick response
|
|
|
|
|
Having left it to the last day to try and learn and build this stuff. You are going to FAIL. You deserve to fail and I for one will breathe a sigh of relief, another lazy idiot that will not make it into the ranks of junior programmers.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes that's not reply of my scrap . if you are aware about solution of my problem then you may post scrap or email me & if you don't know solution then its not the right way to disturbe me. OK. coz so for as I almost overcome my problem & if you have best solution then post otherwise don't abuse. thanks.
|
|
|
|
|
Read these info for you[^]
You did almost everything wrong, lousy post title, asked for a solution rather than help with a problem and demanded an urgent reply. This indicates a person with no manners, no common sense to understand the forum you are using and, based on the content, no ability to plan.
Yes I know an answer to your problem, you see I've been doing this for 20yrs and regularly mentor junior programmers and try to turn them into developers. If I had someone like you working with me I would find somewhere to park you until I could get you removed.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hello
need to rewrite the following for Oracle and MySQL... feeling a bit lazy
<br />
USE AuditDB<br />
go<br />
<br />
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Log]') AND type in (N'U'))<br />
DROP TABLE [dbo].[Log]<br />
<br />
CREATE TABLE [dbo].[Log] (<br />
[Id] [bigint] IDENTITY (1, 1) NOT NULL,<br />
[Date] [datetime] NOT NULL,<br />
[Thread] [varchar] (255) NOT NULL,<br />
[Level] [varchar] (50) NOT NULL,<br />
[Logger] [varchar] (255) NOT NULL,<br />
[Message] [varchar] (4000) NOT NULL,<br />
[Exception] [varchar] (2000) NULL<br />
)<br />
#1 what's sys.objects for Oracle and MySQL?
#2 IDENTITY?
#3 the brackets?
#4 USE [DATABASE NAME] --- got a feeling don't apply in Oracle...
Thanks!
dev
|
|
|
|
|
devvvy wrote: feeling a bit lazy
To right. Try google you lazy b*gger.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi as above would like to know if it's possible thanks!
|
|
|
|
|
Express version should work. I am not sure through.
|
|
|
|
|
Hi,
I need to create a table in SQL that will compute costs. I have to read in some information from two other tables and use this to populate the new table from which the costs are calculated. As the data is from a website, it is possible that it will change and I need the costs to update if the data changes. Do I need to create a function to do this, or will the table do it on its own? ( I elected to do a function, but if there is a better way I am open to that)
This is what I have so far:
set ANSI_NULLS ON
go
set QUOTED_IDENTIFIER ON
go
CREATE FUNCTION [dbo].[fcn_computecosts]
( @ProjectID int, @userID int, @startDate datetime, @enddate datetime, @quarter tinyint,
@Cost money, @percent int, @totalDays int, @totalcost)
RETURNS @ComputeCosts TABLE
( ProjectID int, userID int, startDate datetime, enddate datetime, quarter tinyint,
Cost money, percent int, totalDays int, totalcost)
AS
BEGIN
SELECT
P.ProjectID, P.userID, P.startDate, P.enddate, C.quarter,P.Cost, P.percent,
COUNT(C.date) AS totalDays, ((percent/100)*totaldays*Cost*8) AS totalcost
FROM Project AS P INNER JOIN Calendar AS C ON Calendar.date >P.startDate AND Calendar.date <=
P.enddate
WHERE (C.isWeekday =1) AND (C.isHoliday=0)
GROUP BY P.ProjectID, P.userID, P.startDate, P.enddate, C.quarter,P.Cost, P.percent,
totalDays, totalcost
ORDER BY P.ProjectID
RETURN
END
However when I run this I am getting the following error: "msg 207, Level 16, state 1: Invalid column
name 'totalDays', 'totalcost', 'Cost'
Please help!
|
|
|
|
|
Isn't @totalcost missing the datatype declaration ?
CREATE FUNCTION [dbo].[fcn_computecosts]( @ProjectID int, @userID int, @startDate datetime, @enddate datetime, @quarter tinyint, @Cost money, @percent int, @totalDays int, @totalcost)
|
|
|
|
|
In your group by clause, you are trying to group by totalDays and totalcost which are aliases to computed columns. I've seen it where you have to repeat the function again in the group by clause instead of referencing the alias name. Something like below.
GROUP BY P.ProjectID, P.userID, P.startDate, P.enddate, C.quarter,P.Cost, P.percent, COUNT(C.date), ((percent/100)*totaldays*Cost*8)
Do you really need to group by these values ?
|
|
|
|
|
You Not Grouping Properly
SELECT
P.ProjectID, P.userID, P.startDate, P.enddate, C.quarter,P.Cost, P.percent,
COUNT(C.date) AS totalDays, ((percent/100)*COUNT(C.date)*Cost*8) AS totalcost
FROM Project AS P INNER JOIN Calendar AS C ON Calendar.date >P.startDate AND Calendar.date <=
P.enddate
WHERE (C.isWeekday =1) AND (C.isHoliday=0)
GROUP BY P.ProjectID, P.userID, P.startDate, P.enddate, C.quarter,P.Cost, P.percent
ORDER BY P.ProjectID
You Have No Need To It totalDays,totalCost in Group By
|
|
|
|
|
Hi,
My front end is VB.net 2008. Database - sql server 2005
I have two import processes. In both process there are two tables where insertion updation takes place. After running both the process simultaneously, I am facing the following crash
Transaction (Process ID 81) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction
This is the exception, which is coming in between the simultaneous import process.
I then used an alternative to resolve this problem. When ever this exception comes, I resend te control(at front end) from catch block to the beginning of the function, this is letting the second process to complete and as I mentioned the control again starts to execute the process from the scratch , it do the work nicely now for first process also.
Now both the imports are working fine.
For both the processes, I am using the Begin , Commit , Rollback Transaction.
Is it enough?
Please let me know if you face any problem in understanding the question.
|
|
|
|
|
Even we had deadlock proplem in one of our SQl Job. We did following.
Used Begin Try End Try block & Begin catch End catch block.
Use a flag in the permanent table which indicated processed or not. When trying to rerun run only those which is not processed.
This way second time when you run it processes only which are not processed.
|
|
|
|
|