|
Thanks for the info.
TOMZ_KV
|
|
|
|
|
I use the script below to create auto gen scripts for crud. Mix and match to suit your needs. Once you have what you want save it as an sp with
the table name as a parameter and you are good to go.
SELECT * FROM sysColumns WHERE id = (select id from sysObjects where name = 'myTable');
|
|
|
|
|
Thanks for your help!
TOMZ_KV
|
|
|
|
|
|
A great trick. Wish sql server have this functionality natively. Thanks,
TOMZ_KV
|
|
|
|
|
I'm glad you got answers you like.
But... Personally I don't see the point in writing stored procedures that simply do those tasks -- especially update; update what? -- database tasks depend on the needs of business requirements which often don't include simple inserts, updates, and deletes on individual tables. Most database tables don't exist all on their own and several operations need to be executed at one time. It's well known that I don't like stored procedures at all, but at least they should be written to perform a higher-level operation than one simple operation.
|
|
|
|
|
I've seen lots of tools make attempts at using sql, but in response to your question all you have to do is wrap the generated sql in a create procedure call, add parameters and voila, you have your skeleton procedure. Of course I believe that all procedures should do whatever they can to protect the data so I insist that any procedures written on my watch contain validation of whatever can be validated.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
hi
I am trying to run this query
select Name from data where id='67' and file like '[pdfrtfdoc]%'
and it didn't give any data.
well if my query is
either
select Name from data where file like '[pdfrtfdoc]%'
or
select Name from data where id='67'
it runs.
and also in the database it has record having id = 67 and file = *.pdf file.
Need quick help.
suchita
|
|
|
|
|
Try this
where file in ('%pdf', '%rtf', '%doc')
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Sorry that wasn't my question.
I have two conditions
one is id check and another is file check.
If i put one of those conditions, it runs but if i put two conditions , then its not running.
suchita
|
|
|
|
|
If by "not running" you mean that no rows are returned, then that means that the rows returned from running the id check are different than the rows returned from running with the file check.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
why is 67 in quotes? ID fields normally are numeric, for maximum performance, and numeric literals don't take quotes.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
no i tried both. actually is it possible to have sql conditions where there is LIKE condtion and other normal condition in the same statement. I can't find that example either.
something like
select Name from data where id=67 and file like '[pdfrtfdoc]%'
or
select Name from Grapp1L where Name='suchita' and file like '[pdfrtfdoc]%'
the above both statements didn't run though i have data in both fields on the same row.
when i run with only one condition, it runs. I have never tried LIKE condition with any other conditions. well I am familiar with multiple conditions though.
suchita
|
|
|
|
|
SayamiSuchi wrote: no i tried both
only string literals need quotes. numeric literals don't.
SayamiSuchi wrote: is it possible to ...
yes, of course.
add a record that has id=67 and file="pqr", then try
select Name from data where id=67 and file like 'p%'
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Since you have AND between the conditions both conditions must be true on the same row. So if you don't get any results with those two conditions but you do get results when using the conditions separately, you don't have a row in the table that satisfies both conditions at the same time.
Also when you use LIKE operator like that, you select all rows that start with letters P, D, F, R, T, F (again), D(again), O or C. For example if the field file contains a value 'test.abc', this will satisfy the condition since it start with the letter T. Is this what you really want?
|
|
|
|
|
Hello everybody,
I am developing an Application in which have a data base which i can share in different machines(more then 2).
So I wanna use any database which support sharing.
Because the application is download from web and it is small application.So i want to use the Fee and Small Size database.
My Application is like as billing.
So please suggest me what database to use for my application.
Thanks
If you can think then I Can.
|
|
|
|
|
SQL server Express[^] or SQL Compact Edition would probably fit the bill.
I must get a clever new signature for 2011.
|
|
|
|
|
It is free or not?
If you can think then I Can.
|
|
|
|
|
If you look at the page in the link it says: A free and feature-rich database for developing and deploying
desktop, web, and small server applications
So yeah, I think it is free...
Wout Louwers
|
|
|
|
|
eg_Anubhava wrote: It is free or not?
Go and look at the link; I cannot do everything for you!
I must get a clever new signature for 2011.
|
|
|
|
|
Thanks sir
If you can think then I Can.
|
|
|
|
|
Sql Compact isn't a database-server, it's a file-based system. It's not recommended in a multi-user environment.
I are Troll
|
|
|
|
|
Dear Sir,
Thanks for good suggestions.
Actually My Application is a Small Application which User can download from Web. In Which application i want to use the data which i can compact with my application. And I want to use it Application to For Multi User Support.
In this Case Access Database is the good and free database but it generate problems in Multiuser.
Please give me ur views.
Thanks
If you can think then I Can.
|
|
|
|
|
eg_Anubhava wrote: And I want to use it Application to For Multi User Support.
That sounds like they need to access a database simultaneously. That'd mean that they'd have an application at their own computer, and they would need to be able to access another computer that contains the database. That's your database-server. Usually, that's located somewhere in a LAN, a company-network.
If you're going to share data over the internet, then you might want to consider "the cloud" - using Amazons' API to store your data remotely. That way, you wouldn't need to worry about databases and how to access it.
Otherwise, you'll need to expose the database to the internet. That means providing a computer with Sql Server and hooking it up to the internet for 24hrs/day, or finding a webhost. Some providers disallow direct connections to their database, in which case you'd need a layer of webservices to communicate with the database.
I are Troll
|
|
|
|
|
Yes off Course,
I want to share my database in LAN network. My Application is same like ERP. So i want to select the database which multiple system can access at the same time without generating problem.
I think Microsoft Access generate the problem while sharing database.
So please suggest me which one is good in selected database.
MSaccess
SQL Server
Oracle
MySql
Microsoft SQL Server
Thanks
If you can think then I Can.
|
|
|
|