I am using Visual Studio 2005 and SQL Server 2005+SQL Server MAnagement Studio 2005.i m using Windows Vista home.
when in "SQL Data source" i configure it ,then after selecting "NewConnection",
i select "Sql Client".
then select the Server (.).
But then in the "Database" Dropdownlist,I couldnt find any of the databases i had made SQL Server MAnagement Studio 2005.
i am new to SQL Server 2005.Please help me out...
thanx in advance
Are you trying to connect/attach a new database or connect to a new instance of SQL Server?
“If we are all in agreement on the decision - then I propose we postpone further discussion of this matter until our next meeting to give ourselves time to develop disagreement and perhaps gain some understanding of what the decision is all about.”-Alfred P. Sloan
I am taking a class on Databases. As a project assignment I need to write about an 'important database subject (such as query optimization, database design, distributed databases)'. I was hoping someone would be willing to offer some other important database subjects that may not have received much attention. If you have a topic please share, no I am NOT asking anyone to provide any research or writing.
this thing looks like it was written by an epileptic ferret
Hello, I've googled far and wide and this is one of those rare things I just can't seem to find an answer for. Hopefully it's easy, but this is my first time ever playing with SQL Server CE and the answer eludes me.
All I want to do is reset my AutoIncrement column back to 1 when I clear the table. DBCC CHECKIDENT apparently is not supported in CE and I can't find a way to do it. Can anyone help?
select m_id from w_mat where ( w_mat.row_id in (Select prime_id from d_table where a_type=3 and o_type='XXX' and a_name='YYYY' and ( decode(REPLACE (TRANSLATE(TRIM(a_value),'-.0123456789', '000000000000'), '0', NULL), NULL,to_number(TRIM(a_value))) = 1 )) ) order by 1
If a_value encounters a non-numeric value, this query returns an error. Is there a way to modify the query to look for the particular value (i.e) 1 and ignore if it encounters any non-numeric value during the data fetch..
You have several approaches to this, for example:
- use REGEXP_INSTR to find nonnumeric characters. Use this inside DECODE to make the decision if to convert or not
- create a small function which returns number. Inside this, use TO_NUMBER and catch the potential error and ignore it. In case of an error, return NULL (or whatever is desired)
I want to design a database for a Advertisement web site.
there are some ads in my site such as:car,shirt,mobile,house,etc...
any ads saved by a member of site and belong to it.
any ads visited by some member .
any ads have it's property .for example car has model,color.mobile has weight,have cam,have tollbooths.
house has infrastructure ,stage and ....
in FUTURE many ads may add to my site with their specific properties.
i want know should i store all of my ads in my table or save them separately?
I would recommend you have a Member table and an Advertisement table on with a memberid field which is the member's id who uploaded the advert.
A VisitHistory table that contains the Advert id, member id and maybe datetime with foreign keys to the member and Advertisement tables.
A table with main categories like cars, mobiles, houses etc and then a table with subcategories with a parent id on it which will be the foreign key to the categories table that filters the subcategories for each category. That way you can have all these main categories with all their subcategories and easily add new ones if you want diffirent kinds of adds.
This is obviously high level without any indexes or anything but I hope you get the idea.
Use inheritance in your database, so you can add different subclasses of Advert later.
From our docs:
In this example, a ServiceProduct and a StockProduct table are defined. Both primary key columns
are also declared as foreign keys referencing the Product.Id column. These relationships guarantee
that for every ServiceProduct or StockProduct record there will be a corresponding Product record
with the same Id. Effectively these two tables inherit from the product table...
SELECT iAccountID,iViolatorID,Count(iViolatorID) FROM tbTempQNotificationRequest (NOLOCK)
WHERE IsProcessed = 0 AND sdtStatusDate >= @sdtCurrentDate AND sdtStatusDate < @sdtCurrentDate + 1
GROUP BY iAccountID,vcGroupByValue,iViolatorID
Is it possible say when I group by the result set return