|
So what do you expect from us? Read the book. If you have a specific problem then why don't you ask it? Good luck with learning
|
|
|
|
|
So what? Are you expecting us to write it for you from scratch? Try reading a book and learning or finding tutorials on Google. These forums are for specific questions like "I'm getting an error with this query, here is my code" not for people who are to lazy to do the research themselves.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Which database do you think that you will be using (MS-Access, SQL-Server, Oracle, etc) and what programming language will you be using for the front-end application?
|
|
|
|
|
sajid.salim.khan wrote: any book
Well, Harry Potter and the Chamber Of Secrets is pretty good but I won't spoil it for you.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
sajid.salim.khan wrote: to study database from a to z
WOW I havent been able to do that in 3 years...
as a beginner, and to get aware of the basics of DBMS concepts try reading the jeffery Hoffman's book on Database Management Systems
Try searching it on google 4 urself to find the exact title.
|
|
|
|
|
Hi,
Is it possible to print a table's fields with the coloumn names and data types for each field? I normally take screenshots. It's for SQL Server 2000 and 2005.
Regards
ma se
|
|
|
|
|
Have you tried sp_help 'tablename' ?
Ben
|
|
|
|
|
The best way to document a table is to generate the script that creates the table - that way you can be certain you've captured all the parameters. Right-click the table, then select all tasks -> generate SQL script.
|
|
|
|
|
I create a new DataBase in the user pc i want to script some assistant information in a certain tables in the created DataBase.
merwa
|
|
|
|
|
merwa wrote: I create a new DataBase in the user pc i want to script some assistant information in a certain tables in the created DataBase.
Do you have a question? or do you just want to tell us what you are planning to do? If it is the latter, perhap http://www.twitter.com[^] may be a better site to announce this.
|
|
|
|
|
check out Vyas' site for a stored proc. You pass in a table name it scripts the data as inserts , really neat.
W
http://vyaskn.tripod.com/code.htm#inserts
|
|
|
|
|
Hi,
I have the following tables:
Product
ProductInCategory
Category
When I supply the product ID then I need to know all the category names in which it belongs. ProductInCategory contains only product IDs and category IDs. Here is my "link statement:
SELECT *
FROM Product
INNER JOIN ProductInCategory as "pc_Product"
ON Product.ID = pc_Product.ProductID
INNER JOIN ProductInCategory as "pc_Category"
ON pc_Category.CategoryID = Category.ID
WHERE Product.ID = '9780817637606';
My error is:
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "Category.id" could not be bound.
Please can some one help me.
Regards
ma se
|
|
|
|
|
You didn't include Category table in your select query
here is my quick analyze
SELECT Product.*,ProductInCategory.*,Category.*<br />
FROM Product,ProductInCategory,Category<br />
where Product.ID = ProductInCategory.[ProductID]<br />
and ProductInCategory.CategoryID = Category.[ID]<br />
and Product.[ID] = '9780817637606';
I Love SQL
|
|
|
|
|
Thanks.
But I would like to use JOINS. Can you please help me now?
|
|
|
|
|
Just open Enterprise Manager of SQL2000 then create new View, copy code and paste in area of view then SQL Manager generates joins .
I Love SQL
|
|
|
|
|
I did the following and seems to work just fine:
SELECT
Product.ID,
Category.ID,
Category.Name
FROM
ProductInCategory
INNER JOIN Product
ON ProductInCategory.ProductID = Product.ID
INNER JOIN Category
ON ProductInCategory.CategoryID = Category.ID
WHERE
Product.ID = '9780817637606';
|
|
|
|
|
You haven't actually joined onto Category anywhere. Instead, you join onto the ProductInCategory table twice. I assume this is meant to read
SELECT *
FROM ProductInCategory
INNER JOIN Product
ON Product.ID = ProductID
INNER JOIN Category
ON CategoryID = Category.[ID]
WHERE Product.ID = '9780817637606';
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
This post has been posted about 3 times and no one has been able to help me.
I am using full text searching. When I type in text1 in my title textbox, then my CONTAINSTABLE looks like:
CONTAINSTABLE(tblFullTextSearch, [fldTitle], ' "text1" ')
When I type in text1 text2 then my CONTAINSTABLE looks like:
CONTAINSTABLE(tblFullTextSearch, [fldTitle], ' "text1" AND "text2" ')
But when I type in "text1 text2" then I NEED it to look like:
CONTAINSTABLE(tblFullTextSearch, [fldTitle], ' "text1 text2" ')
I'm not sure how to do this, please can some one help me?
Regards
ma se
|
|
|
|
|
hi,
i have an asp page which takes user input say password,with both uppercase and lower case letters and his password has to check with database and allow the user to see the member page,
the only problem is that when the user enter the only lowercase word ,its accepting..
how to correct that?
thanks
|
|
|
|
|
Are you storing the unencrypted password in your database? If you are then the quick way round this would be to change the collation on that column so that it is case-sensitive.
Most people use a "hash" of the password rather than actually storing the password in plain-text.
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message".
|
|
|
|
|
hi
no am storing it as text..
how to use the hash in storing the password?
thanks
|
|
|
|
|
Your text password column probably has a case-insensitive collation. Making it case-sensitive depends on your database software. Unser SQL-Server you would use the COLLATE clause of the ALTER TABLE statement.
If you are using SQL-Server 2005 then the HashBytes function can be used to create a hash of your password. To store the hash:
insert into UserTable values (@UserName, HashBytes('SHA1', @UserName + @Password)) To check if a user's password is correct:
select 1 from UserTable
where UserName = @UserName
and PasswordHash = HashBytes('SHA1', @UserName + @Password) If you just hash the password then you would be able to see which users have the same password (because they would have the same hash value). It is better practice to "seed" the hash - so most people concatenate the user id (as above).
Hope that helps.
Andy
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message".
|
|
|
|
|
Am using Ms access
any idea how to do it
|
|
|
|
|
i used the following sql statement within my asp page.where the user input his username and passwords.th sql check them with ms access database
SQL = "SELECT username, lpassword FROM clientlist WHERE username ='" & UserName & "'" & _<br />
" AND lpassword = '" & sPassword & "'"
thanks
-- modified at 7:47 Wednesday 15th August, 2007
|
|
|
|
|
I think that MS-Access is always case-insensitive, and that it does not have any hashing functions build-in. If you are using ASP.NET then you should be able to use one of the classes in the .NET framework to hash the password - and then store that in your database. If you are using "classic" ASP then you should be able to search Google for a SHA1 or MD5 implementation.
On a separate note - try entering a password of "' or '' = ' ". You should find that bypasses you password check. If you just want an error then enter a single-quote as your password. Read Colin's article on SQL injetion attacks[^] for information about how to stop this.
Regards
Andy
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message".
|
|
|
|