|
SELECT suitenumber + ' ' + Address + ' ' + Country AS FullAddress
FROM Table1
WHERE suitenumber + ' ' + Address + ' ' + Country LIKE '%Owl Street%'
|
|
|
|
|
Alternatively
SELECT *
FROM (SELECT suitenumber + ' ' + Address + ' ' + Country AS FullAddress
FROM Table1) AS subquery
WHERE FullAddress LIKE '%Owl Street%'
|
|
|
|
|
i design a website about online reservation systems in travel agents ,and i face many problems database design stage one of these problems is how to display the description of the day for (certain day of certain package)
the second problem if an individual reserve online and fill the reservation form (without going to an agent that exists in his country )should i put him/her in a filegroup or not
if anyone is familiar with tourism fields and its system,please give me advice,i need it urgently,thanks a lot
|
|
|
|
|
dinakatina wrote: how to display the description of the day for (certain day of certain package)
That is an ASP.NET problem.
dinakatina wrote: if an individual reserve online and fill the reservation form (without going to an agent that exists in his country )should i put him/her in a filegroup or not
I don't know. What does your client want to happen in that situation?
|
|
|
|
|
Gotta love the people who 'need it urgently', but don't respond when you try to help.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Gotta love the people who 'need it urgently', but don't respond when you try to help.
It happens. I'm trying not to lose my cool with that sort of thing, so the odd vent on my blog helps. I'm actually trying to vent more frequently so it doesn't build up. Of course, that makes less fireworks for everyone else to see.
|
|
|
|
|
Is this a real world system ?
dinakatina wrote: if anyone is familiar with tourism fields and its system,please give me advice,i need it urgently,thanks a lot
I can only assume that you've taken a job to write this system, the real question is, why are you asking us what your client wants, instead of asking your client ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
SQL 2000 8.00.2039
I am trying to write a backup from SQL (.bak), compress it then insert into a
database.
Can someone help me with the framework of this operation?
Any input is greatly appreciated.
Regards,
Regards,
Hulicat
|
|
|
|
|
Hulicat wrote: Can someone help me with the framework of this operation?
What do you mean by "framework" in the current context?
|
|
|
|
|
Sorry I should have been more specific.
I am trying to accomplish the aformentioned operation via T-SQL.
The only way I have seen is via C# or ASP.
What would the T-SQL look like to achieve the goal of compressing a .bak file then storing the file in the database?
Could I execute a backup, compress it, then drop in the db as a blob?
Regards,
Hulicat
|
|
|
|
|
Hulicat wrote: Could I execute a backup, compress it, then drop in the db as a blob?
Yes. You could use BACKUP, xp_cmd (and call out to a zip application), but I'm not sure how to get it back in the database as I usually do that from within a C# application.
|
|
|
|
|
It looks like it have to be C3
Regards,
Hulicat
|
|
|
|
|
Hulicat wrote: It looks like it have to be C3
|
|
|
|
|
|
Colin and I are from the UK. The 3 key has the £ sign and not the # sign here.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: The 3 key has the £ sign
It's not a sign, it's a symbol. How picky am I?
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi All,
I am working on an application in which on every 100 miliseconds there is an insert statement executing. I am using MySQL server as database and ODBC connector. Can anyone please suggest me how should I change the application's architecture to do this in a better way. Currently on every insert I am creating an connection and command object to perform the INSERT operation.
Regards,
Amit
|
|
|
|
|
I'm going to assume that the application is written using a .NET language because you've not indicated otherwise. If this is incorrect please say.
Use SqlConnection, SqlCommand, etc. rather than the ODBC varients.
|
|
|
|
|
Yes, server part in which INSERT statement has to occur on every 100 millisecond is written in C# using VS 2005. Database MySQL 5.0.
These INSERT statements has to occur anyhow in silent mode (in background) while user can do other Add/Edit/Delete or Update related operations on Database. Actually these insert statements are executed for the data received by the server application on an interval of 100 to 500 millisecond.
Please suggest a better way to do this.
|
|
|
|
|
Sorry, I misread your original post, I though you said "SQL Server" not "MySQL".
You should use the appropriate .NET Data Providers for your database.
logicon wrote: These INSERT statements has to occur anyhow in silent mode (in background)
If you are writing a .NET application you have to define any user interface that may be updated as a result of any database interaction. It is all "silent mode" unless you write code to the contrary.
logicon wrote: while user can do other Add/Edit/Delete or Update related operations on Database.
So, you have multiple threads interacting with the database. MySQL supports transactions now so that isn't a problem.
logicon wrote: Please suggest a better way to do this.
Don't use ODBC, use the appropriate .NET data provider for your database. Other than that, there isn't a better way.
|
|
|
|
|
Thanks Colin,
Problems with current application is that its highly unstable. Some times it works file and sometime the insertion operation fails and gives exception. Even on some test machine it is working file since a long time, but on some other machine it gives exceptions on some insert operations.
I find my self helpless with the provided stack trace.
Which .NET provider is suitable for MySQL 5.0 and VS 2005?
Regards,
Kumar
|
|
|
|
|
logicon wrote: Which .NET provider is suitable for MySQL 5.0 and VS 2005?
One provided by MySQL themselves I would assume.
logicon wrote: I find my self helpless with the provided stack trace.
Maybe others might be able to help - Have you thought about posting it along with the relevant code?
|
|
|
|
|
I've done some googling and reading, and found a few solutions to this, but none that struck as being being particularly elegant, so thought I'd ask for some advice
I have a dynamically generated sql query which enables users to do keyword searches. The user can specify some wildcards to enable partail matching and so forth. It works, and is fairly secure - well I think it is, but I'm sure some crafty soul could hack it if they wanted to.
Anyway, while it works, I'd like to remove all of the querying logic from my application in to stored procedures (as much as a proof of concept and learning exercise than anything else), but I'm becoming unstuck by my lack of T-SQL knowledge.
The major problems I'm having are:
1) How to parse the input string and build the search criteria (including wildcards)
2) How to efficiently iterate over a record set and pull out records matching the criteria
As noted earlier, I have found some solutions - but the amount of SQL involved was fairly impressive, involving the building of temprorary tables, and multiple passes of the table etc. I just get the feeling that given a relatively large table (about 3 million records), performance is going to be an issue.
I'm not too concerned about being bound to SQL Server 2005 in this instance, so could anybody point me in the right direction of the techniques and language constructs I should look at? Woould this be an ideal place to use a CLR stored procedure?
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
i had a 70MB tab splitted file
i read that file in memory (string builder) and than i convert it in to a datatable
after that i set the datasource of grid equals to this table
but the problem is it takes more than one minute to show the data (the application takes around 1.5 minutes after i set the datasource property of the grid)
|
|
|
|
|
Just load it directly (without using Datasource ). Also, make sure you don't have any "look and feel" enabled on the grid prior to loading (sorting, sizing, etc.). Enable this after the load.
1) Disable look and feel.
2) Create rows equal to count of rows.
3) Fill rows/cells using for loop.
4) Enable look and feel.
I gave up using Datasource a long time ago.
|
|
|
|