|
I am such a fool!
Thanks a million, works like a charm!
If the post was helpful, please vote!
Current activities:
Book: Devils by Fyodor Dostoyevsky
Project: Hospital Automation, final stage
Learning: Image analysis, LINQ
Now and forever, defiant to the end.
What is Multiple Sclerosis[ ^]?
|
|
|
|
|
hi
i need help with oracle database!
i have 2 tables in my database A and B. i want add the diffrance between A and B in B and also get the result.
i calculated A-B but i only get to result or insert it to B but i need to to them both!
in ms-sql i saved A-B into temporary table then read from that table and insert it into B
but it doesn't work in oracle
can anyone help me!?!
thanks Eldad.
|
|
|
|
|
Sounds like you want something like this:
Select (stuff from table A)
UNION
Select (table A - table B)
You don't give any details about the tables, so that is the best I can do.
David
|
|
|
|
|
Hi Guys,
I have never used auditing in MSSQL Server2005.
Could you please let me know right steps to use auditing for my Database?
Thanks
|
|
|
|
|
People write books on database auditing and you want a precis in a forum post. Do a search on SQL 2005 auditing[^] in Google, read some of the articles and come back with a more specific problem.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
|
|
Hi, i got 2 tables.. 1 called "accounts" and the other called "event_joined"
inside accounts table i have the following field
accounts
admin_num | name | address | mobile
event joined
id | admin_num | eventid
1 | 123455 | 15
2 | 123455 | 18
3 | 123455 | 22
Now, i want to get all details of accounts as well as 1 more additional information which is counting how many event did the person joined.
In the above, u can see that person "123455" had joined 3 events because there are 3 rows of the same admin_num..
final result would be
admin_num | name | address | mobile | number of event joined
12344 | john tan | address bla bla bla | 91234567 | 3
|
|
|
|
|
select accounts.*,
(select count(event_joined.eventid) from event_joined where event_joined.admin_num=accounts.admin_num) as [Number of event joined]
from accounts
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.
|
|
|
|
|
|
No problem.
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.
|
|
|
|
|
can you send me how to create a database to create an online trading and shopping site
|
|
|
|
|
Without knowing what you wish to trade, it is almost impossible to advise you, with any detail.
It would also take too much time and space. However, if you go to the top of the page and enter shopping cart into the search box and click go!, you will find lots of articles that will get you started.
When you have had a look and tried a few, I'm sure that you will find help for any specific problems that you might have.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Starter kits can be found here[^]. Check out the "BeerHouse" example
I are troll
|
|
|
|
|
Use master;
go
Create Database [Insert name here];
go
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering
|
|
|
|
|
Kindly suggest SQL version to be loaded on Novel Network server
I have tried SQL Express edition but it;s not working
|
|
|
|
|
You need to be more specific!
What do you mean it's not working?
It won't install?
It installs, but you cannot connect?
What?
You might find some useful information here[^].
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hi
I have to get data's from sqlserver 2000 Db to my Sql server 2005 Db, how to do this? is there any way other than linked server..
|
|
|
|
|
BCP, SSIS/DTS or use data compare from red-gate.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I installed SQL Server 2005 on my computer. I am using Vista Ultimate. After installation, I can't login to SQL Server.
It gives the error:
Login Failed for User'DOMAINNAME\ACCOUNTNAME'. (Microsoft SQL Server Error: 18456)
I also have SQL Server Express installed on my computer and I can login to that without any problem.
Any ideas?
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Are you sure you're using the correct account to login with?
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering
|
|
|
|
|
Yeah , I'm Sure.
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Hi,
Thanks to a massively helpful ROb ive manged to learn a little about conditional statements in Stored Procedures. However i have now created the following SP and it gives an error when compiling.
Incorrect syntax near the keyword 'ELSE'
CREATE PROCEDURE web.createDefaultAddressBook
(
@tmp_custID bigint,
@tmp_Description varchar(500),
@tmp_NoRecipients bigint,
@tmp_Email varhar(100),
@tmp_Forename varchar(100),
@tmp_Surname varchar(100)
)
AS
BEGIN
declare @key bigint
declare @newSignUpID bigint
--determine id of record if exists
SELECT @key = addMaster_Key FROM tbl_AddressBookMaster WHERE addMaster_UserId = @tmp_custID AND addMaster_Title = 'Default'
IF @key IS null
--address book doesnt exist just so create default
INSERT INTO tbl_AddressBookMaster ([addMaster_UserId], [addMaster_Title], [addMaster_Description], [addMAster_NoRecipients])
VALUES (@tmp_custID, 'Default', @tmp_Description, 0)
SELECT @newSignUpID = SCOPE_IDENTITY()
--add addresses to second table
INSERT INTO tbl_AddressBookAddresses ([adds_ABMId], [adds_Email], [adds_RecipientForename], [adds_RecipientSurname])
VALUES (@newSignUpID, @tmp_Email, @tmp_Forename, @tmp_Surname)
ELSE
--default already exists
--add addresses to second table
INSERT INTO tbl_AddressBookAddresses ([adds_ABMId], [adds_Email], [adds_RecipientForename], [adds_RecipientSurname])
VALUES (@key, @tmp_Email, @tmp_Forename, @tmp_Surname)
END
What am i doing wrong?
Is there a more efficient way to do this considering i will be using it in code which will loop through a huge array and pass new records into the SP?
Effective but simple is probably best at this stage though.
Thanks in advance.
|
|
|
|
|
munklefish wrote: SELECT @key = addMaster_Key FROM tbl_AddressBookMaster WHERE addMaster_UserId = @tmp_custID AND addMaster_Title = 'Default' IF @key IS null
I guess column addMaster_Key return integer value and your query should be:
set @key = (select addMaster_Key FROM tbl_AddressBookMaster WHERE addMaster_UserId = @tmp_custID AND addMaster_Title = 'Default')
IF @key is null then
begin
end
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.
|
|
|
|