|
Hi,
I am trying to install sql server 2008 from the last three days..but there was no progress.Earlier,I have SqlServer 08,but that was crashed,So I am trying to install sql server 08 from the begining.
So,
1)I have uninstalled the existed Sql server 08
2)Removed all the features from control panel->Programs and features and no sql services existed in the Services
3)Completely removed the folder"Microsoft SQL Server" from C:\Program Files.
4)Removed sql related registry keys from HKEY_LOCAL_MACHINE\Software\Mocrosoft\
When I am Installing ,I am able to install till support Files only.Supporting files are successfully getting installed .After support files,It is not showing any further windows (like Feature Selection Window etc),and again it is showing the starting window .So,I couldnot move forward.Please help in this to go ahead.
Thanks,
Krishna
|
|
|
|
|
Hi,
I my stored procedure I have an insert query. For this I have to get one value from a sub query. But it is not accepting that query. So I tried to declare a separate variable and assign the subquery value to this and insert it in the table.
Create Procedure [dbo].[AddOrRemoveFavourites]
(
@UserId bigint,
@VideoName varchar(50),
)
as
Declare @VideoId int
Set @VideoId = Select VideoId from Videos where Title='Monkeydog'
Insert into Favourites(UserId,VideoId) values(@UserId,@VideoId)
but in this I am getting error like "Incorrect syntax near the keyword 'Select'."
If anyone have any idea to solve this please reply me.
Thanks in advance.
|
|
|
|
|
Try this one;
SELECT @VideoId = VideoId
FROM Videos
WHERE Title = 'Monkeydog'
I are Troll
|
|
|
|
|
Hi,
You need to enclose your select in parenthesis and include a top(1) clause, like this:
Set @VideoId = ( Select top(1) VideoId from Videos where Title='Monkeydog' )
Regards,
Syed Mehroz Alam
My Blog | My Articles
Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination. - Albert Einstein
|
|
|
|
|
Hi,
Set @VideoId = Select VideoId from Videos where Title='Monkeydog' is wrong
use
Select @VideoId = VideoId from Videos where Title='Monkeydog'
The reason is if we want to assign values to more than one variable at a time then go with Select.
SET allows you to assign data to only one variable at a time.
For more information visit here http://vyaskn.tripod.com/differences_between_set_and_select.htm[^]
Also searching in google will reveal more info
Niladri Biswas
|
|
|
|
|
Hi...
I want to know the diffrence between SQL Express and SQL mangment studio.
On my PC which is standalone ,SQL server 2008 Insrtalled but I unable to see any database
or anything.I can see only Configration manager.
So On my pc SQL express installed or Only Managment studio installed ?
Which application I have to install so I can create the database ?
|
|
|
|
|
One is a database edition
The other is a management toll for the database (create and test database objects, tables, views, procedures etc)
|
|
|
|
|
|
SQL Express[^] is the "express" version of SQL Server, meaning that it's a trimmed down version of SQL Server and available as a free download.
SQL Management Studio[^] is an IDE to manage databases.
In other words, the first thing is a database-server, the second thing is a GUI to manage that server.
I are Troll
|
|
|
|
|
sql query aur ms access main
when i pass "select maid) from enquiry where regdate=#05/11/2009#" from sql
access treate it as 11/05/2009
why???
and wats the solution
|
|
|
|
|
Try this
select maid) from enquiry where regdate=#05/Nov/2009#
or this
select maid) from enquiry where regdate=#2009/11/05#
Read up on datetime
|
|
|
|
|
But for this i have to change Date/Time format of System to what u written.
|
|
|
|
|
In Access you MUST be storing your data as a datetime data type, if you are storing it as varchar/string then you are screwed.
SQL Server has a dateformat, I presume that Access has something similar (I know it has I just can't remember the format). This will allow you to control the format of the datestring when you need it.
|
|
|
|
|
Thats true, type in access is date/time and format is "Short Date - 26/12/2009".
When i call this through SQL it change dd/mm/yyyy to mm/dd/yyyy.
Where to change, in sql or access??? As i cant change system date / time format.
tell
|
|
|
|
|
sachees123 wrote: Where to change, in sql or access???
Well, do you want to change the format that Access uses, or the one that SQL Server uses? For SQL Server, you'd set the time format like this;
SET DATEFORMAT ydm;
sachees123 wrote: As i cant change system date / time format.
The user is the one who sets (or changes) the format, from the control panel. Other applications should display their dates using the format that the user provides. That means that one saves a datetime as a DATE -type. When displaying, convert to a string of the ShortDateFormat or LongDateFormat
I are Troll
|
|
|
|
|
I dont want to change any format anywhere. Its the access which is changing the format from dd/mm/yyyy to mm/dd/yyyy. Why it is doing and wats the solution?? Thats my question.
|
|
|
|
|
sachees123 wrote: Its the access which is changing the format from dd/mm/yyyy to mm/dd/yyyy.
Databases don't store dates in a specific format, they store them as numbers[^]. The database applies one of the predefined dateformats when you retrieve the value. You can change[^] the table-design to change the default format that's used for the date-column though.
I are Troll
|
|
|
|
|
Key announcements were made at PASS Summit 2009 about SQL Server:
Upcoming SQL Server 2008 R2 community technology preview (CTP) would be available in November.
SQL Azure is now feature-complete and goes live in January.
Two new editions of SQL Server to address high-end, mission-critical scenarios:
Microsoft SQL Server 2008 R2 Datacenter
Microsoft SQL Server 2008 R2 Parallel Data Warehouse (formerly project code-named “Madison”)
For more information, see Two New Editions Join SQL Server 2008 R2 Roadmap[^]
|
|
|
|
|
Hi,
I have one SQL query, i want to update it in one database. Please check that SQL query below.
update employee set emp_name = 'Ravi' where emp_id = 1
Now i want to get the count of how many rows get updated..
Can any one help me out as it urgent requirement for me..
Thanks
John.
|
|
|
|
|
ExecuteNonQuery would do that if you are speaking of managed C++.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
|
I always use stored procs but this may work.
update employee set emp_name = 'Ravi' where emp_id = 1; Select @@Rowcount Updated
Not sure if it requires a colon or a semi colon.
|
|
|
|
|
Hello Holmes,
Yes, you have given exact query.. i have executed this query in QueryAnalyser it is working fine and this what i am expecting..
Can you please explain me how to execute this query through VC++..?
Thanks
John.
|
|
|
|
|
Sorry, I wouldn't know VC++ if it wandered up and bit me, I suggest you take it to the language forum.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi!
I have recently published a website to a Windows 2008 x64 Server with SQL 2005 Express Edition. I am able to logon to the website but when I navigate to view employees for instance then I get the error 26 message.
I enabled the TCP/IP and Named Pipes Protocols, added SQL browser.exe to the firewall including port 1433 and 1434. I also checked to make sure SQL Browser is running.
Does anyone have any suggestions?
Illegal Operation
|
|
|
|