Showing posts with label details. Show all posts
Showing posts with label details. Show all posts

Tuesday, March 20, 2012

comprehensive details for setting up SSE?

First, soapbox questions for someone who might have more direct pull with Microsoft (or at least knowledge of how I should work with what they've given us), then a more specific question:

Scenario: You install SQL Server Express (or any other version, it doesn't matter) and the feedback with all the little green checkmarks tells you it has installed successfully. "Oh goody," say people (like me) who are not super experienced with SQL Server, "it installed successfully; now I can jump in and start using it!" But it aint so--there are so many other hoops to jump through before it really becomes operational.

After successful installation, why can't some link become visible indicating what you have to do after that? I mean, it's fine to wade through all the questions in this forum and get answers from all you nice and informed guys, AFTER the problems start coming; but I would rather not have to associate with you, to be honest, in terms of time spent that could be going into my projects.

Why isn't there a comprehensive guide right off the bat? That is, something referenced immediately that tells you such things as: how to register a database with emphasis on the fact that just creating a database won't do the trick for your application; how to set permissions and rights; that (what was I reading in the advice of one post?) you have to register both the database and the user, blah blah; all about instances, the web.config file, etc. etc. I mean, doesn't it seem logical that by virtue of a person installing the database, come on, that this is a pretty good indication that he/she in all likelihood is new at it? As it is now, all they tell you on the SSE site is that you have to have the .NET Framework installed; and the green checkmarks indicating that you've installed it correctly (sorry for mentioning that twice).

"OK, self," I say, "I have the Framework installed and SSE installed correctly, so let's get to work." Then the trouble begins. Unless Microsoft's purpose is to keep you tech guys and book writers in business, I don't understand why they don't give more up-front guidance. Any thoughts on why they work it this way? Bueller, Bueller? Anyone, anyone?

Now, to the question that's pressing me at the moment: I've installed SSE and I'm going through a tutorial ("How Do I: Create Data-Driven Web Sites?" onhttp://www.asp.net/getstarted/default.aspx?tabid=61). Yeah, the guy makes it look really easy. He creates a database then shuts down the connection. I try to do the same things and I'm informed that I don't even have a valid connection! How SQL-Server-Express fun and easy is that? It's a real AdventureWorks, if you ask me.

OK, that's my rant; and since MS didn't think in advance and implement my idea of a link to jump off from the installation menu, I have to face the reality of learning this by putting all the pieces together myself. So, my question is, before I try to go through the video and get more frustrated, WHERE DO I GO FOR THE MOST BASIC OF ALL THE STEPS I NEED TO DO, ONE BY ONE? This is like the second "beginner" video I've tried to go through but even these don't start at the very beginning with information on how to register a new database, making the user a part of aspnetWHATEVER, what permissions to dole out, etc.

Guidance is solicited and will be most appreciated. Thanks, Bryan

Hi,

I saw this: Http:www.sswug.org/see/21350 I haven't done the registration to access this site, so I can't say it will help. (Just came across it in a search). If you do check it out, let me know if it seems worthwhile.

BTW, I could find no Microsoft webcast/vids on installing SSE. Being a free product, the support is very limited. It's also a very complex and powerful program, and maybe it should be more surprising that the install is easy for anyone! I never seem to have the 'Standard' or 'Typical' system configuration that would make for an easy install. As i recall, the install of SQL Server 2005 (Standard) went easier for me than the SSE install.

I did install SSE for use with developing ASP.Net apps - works better with the defaults, and doesn't pose risks to the full version install. BRN..

Wednesday, March 7, 2012

Complex SQL Query

Hi all,

I am developing an application using SQL Server as Back-end. I am facing a problem in creating a SQL Query. The details are as follows:

There are three tables in the Database, Data Type of all Columns is Numeric in all three tables:

1. T1

(column names and sample data)

en
==

1
2
3

2) T2

(column names and sample data)

en gn
== ==

1 10
1 11
2 10
2 12
2 13

3) T3

(column names and sample data)

en pn
== ==

1 20
1 21
1 22
2 20

Now I have to create a SQL Query, whereby I can get the following result:

en gn pn
== == ==
1 10 20
1 11 21
1 NULL 22
2 10 20
2 12 NULL
2 13 NULL

I have tried various combination of Joins, but unable to get the desired result as the tables have many-to-many relationships, therefore I get many duplicate rows in the result. UNION will not solve the problem, as that will add the additional rows for the third table. Although I can achieve this by writing few lines of code, but I have to create a SQL Query for getting this result. Kindly tell me the way for creating the required Query for this. Many Thanks for your help.there does not seem to be any join criterion

how do you know gn=10 matches pn=20?

try stating the join criterion on english, and i don't think you can do it

you may have to do your "matching" with application code|||I agree with rudy, tried playing with the query but could not come up with anything.|||I think this is what you search for:

create table ##tmp1 (en Int,pn Int,ref Int);
create table ##tmp2 (en Int,gn Int,ref Int);

insert into ##tmp1
select
a.en,
a.pn,
count(b.en) ref
from t3 a,t3 b
where a.en=b.en and a.pn>=b.pn
group by a.en,a.pn;

insert into ##tmp2
select
a.en,
a.gn,
count(b.en) ref
from t2 a,t2 b
where a.en=b.en and a.gn>=b.gn
group by a.en,a.gn;

select
coalesce(##tmp1.en,##tmp2.en) en,
##tmp1.pn,
##tmp2.gn
from ##tmp1
full join ##tmp2 on ##tmp1.en=##tmp2.en and ##tmp1.ref=##tmp2.ref
order by en

Complex SQL Query

Hi All
We have search page and want to query the database with search terms
entered.
The table details are like this
TapeRecords
ID (Primary Key)
ItemTitle
Location
Country
Keywords
TapeLogDetails
ID (primary key)
TapeNumber (Related to TapeRecords.ID)
Description
What I am looking for is the SQL Query to query the database for all the
records that match two search items i.e. "Burma" "Asia"
I want to search the combination of two in any of the following fields
TapeRecords.ItemTitle
TapeRecords.Location
TapeRecords.Country
TapeRecords.Keywords
TapeLogDetails.Decription
If the two keywords match AND combination of any of the above fields I want
to display the records.
For example "Burma" in decription and "Asia" in ItemTitle or "Burma" AND
"Asia" in Location
Is this possible?JP
Since you have not provided the DDL I have made some assumptions
CREATE TABLE w
(
COL1 VARCHAR(20)
)
INSERT INTO W VALUES ('URIDIMANT')
INSERT INTO W VALUES ('DIMANT')
INSERT INTO W VALUES ('URIRON')
INSERT INTO W VALUES ('RR')
CREATE TABLE w1
(
COL1 VARCHAR(20)
)
INSERT INTO W1 VALUES ('URIDIMANT')
INSERT INTO W1 VALUES ('DIMANTRON')
INSERT INTO W1 VALUES ('URI')
INSERT INTO W1 VALUES ('URIRON')
SELECT W.COL1,W1.COL1 FROM W JOIN W1
ON W.col1 LIKE '%' + W1.col1 + '%'
DROP TABLE W
DROP TABLE W1
"JP SIngh" <none@.none.com> wrote in message
news:urPcJYNIGHA.596@.TK2MSFTNGP10.phx.gbl...
> Hi All
> We have search page and want to query the database with search terms
> entered.
> The table details are like this
> TapeRecords
> ID (Primary Key)
> ItemTitle
> Location
> Country
> Keywords
>
> TapeLogDetails
> ID (primary key)
> TapeNumber (Related to TapeRecords.ID)
> Description
> What I am looking for is the SQL Query to query the database for all the
> records that match two search items i.e. "Burma" "Asia"
> I want to search the combination of two in any of the following fields
> TapeRecords.ItemTitle
> TapeRecords.Location
> TapeRecords.Country
> TapeRecords.Keywords
> TapeLogDetails.Decription
> If the two keywords match AND combination of any of the above fields I
> want to display the records.
> For example "Burma" in decription and "Asia" in ItemTitle or "Burma" AND
> "Asia" in Location
> Is this possible?
>
>
>|||Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. What you did post is a complete mess.
There is no magical, univeral "id', the rest of the names violate
ISO-11179 rules, are you really modeling tape records and not tapes
themselves? Why is there a detail table with a header table? etc.
Here is a guess.
CREATE TABLE Tapes
(tape_nbr INTEGER NOT NULL PRIMARY KEY,
tape_title VARCHAR(20) NOT NULL,
tape_loc VARCHAR(20) NOT NULL,
country_code CHAR(3) NOT NULL, --iso standard);
--normalize the data
CREATE TABLE TapeKeywords
(tape_nbr INTEGER NOT NULL
REFERENCES Tapes (tape_nbr)
ON UPDATE CASCADE,
ON DELETE CASCADE,
keyword VARCHAR(15) NOT NULL,
PRIMARY KEY (tape_nbr, keyword));
CREATE TABLE TapeLog
(tape_nbr INTEGER NOT NULL
REFERENCES Tapes (tape_nbr),
log_seq INTEGER NOT NULL,
PRIMARY KEY (tape_nbr, log_seq),
tape_description VARCHAR (100) NOT NULL);
Rows are not anything like records, and columns are not anything like
fields. This is foundations. This will mean that you have to clean up
your data before you can do anything. Now write two queries on Tapes
and TapeKeywords and UNION them. I would extract keywords from the
titles and use relational divisions on that single table myself.

Tuesday, February 14, 2012

Compatibility Level

Clicking "Details" from the drop-down menu that lists all the databases in
the Query Analyzer (in SQL Server 2000) pops out a dialog box where all the
databases are listed along with their Compatibility Level. What is this
Compatibility Level? Does this mean backward compatibility i.e. SQL Server
2000's compatibility with SQL Server 7.0? Also why is the Compatibility
Level for all databases 70 - what does it signify? Why not some number other
than 70?
Installing SQL Server 7.0 along with SQL Server 2000 on the same machine -
is that a sane approach or should such a situation be avoided? What problems
could arise if both versions of SQL Server are installed on the same
machine?
Thanks,
Arpan>> What is this Compatibility Level? <<
It is a DBMS specific internal value, that keep certain database behaviors
to be compatible with the specified DBMS version. The values are 80, 70, 65,
or 60 for SQL 2000, SQL 7.0, SQL 6.5 and SQL 6.0 respectively.
For example when you upgrade SQL Server from version 6.5 to version 7.0, the
compatibility will not get updated. You will have to use the procedure
sp_dbcmptlevel to get it to 70. Without this compatibility level, certain
features specific to SQL 7.0 like TOP clause will not work properly. See
details about sp_dbcmptlevel in SQL Server Books Online.
>> Also why is the Compatibility Level for all databases 70 - what does it
signify? Why not some number other than 70? <<
It simply means, this level is specific to SQL Server version 7.0.
>> Installing SQL Server 7.0 along with SQL Server 2000 on the same
machine - is that a sane approach or should such ... <<
You can keep an installation of SQL Server version 7.0 intact on your
computer and also install a named instance of SQL Server 2000 on the same
computer. Details on how to proceed can be found in SQL Server Books Online.
--
- Anith
( Please reply to newsgroups only )|||Thanks, Anith, for your input. What do you mean by "named instance" of SQL
Server 2000?
Regards,
Arpan
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:OuiU2ODlDHA.2244@.TK2MSFTNGP12.phx.gbl...
> >> What is this Compatibility Level? <<
> It is a DBMS specific internal value, that keep certain database behaviors
> to be compatible with the specified DBMS version. The values are 80, 70,
65,
> or 60 for SQL 2000, SQL 7.0, SQL 6.5 and SQL 6.0 respectively.
> For example when you upgrade SQL Server from version 6.5 to version 7.0,
the
> compatibility will not get updated. You will have to use the procedure
> sp_dbcmptlevel to get it to 70. Without this compatibility level, certain
> features specific to SQL 7.0 like TOP clause will not work properly. See
> details about sp_dbcmptlevel in SQL Server Books Online.
> >> Also why is the Compatibility Level for all databases 70 - what does it
> signify? Why not some number other than 70? <<
> It simply means, this level is specific to SQL Server version 7.0.
> >> Installing SQL Server 7.0 along with SQL Server 2000 on the same
> machine - is that a sane approach or should such ... <<
> You can keep an installation of SQL Server version 7.0 intact on your
> computer and also install a named instance of SQL Server 2000 on the same
> computer. Details on how to proceed can be found in SQL Server Books
Online.
> --
> - Anith
> ( Please reply to newsgroups only )
>|||Refer to :
http://msdn.microsoft.com/library/en-us/architec/8_ar_cs_9i5u.asp
--
- Anith
( Please reply to newsgroups only )