|
Please see my problem below:
Table structure:
tmpItemPrice(ItemPriceID bigint not null , Thickness varchar(255))
Row1
ItemPriceID: 1
Thickness: xyz
Select ItemPriceID
From tmpItemPrice
Where IsNumeric(Thickness) = 1 and Cast(Thickness as float) <= 0
When above query runs it give my type conversion error which is logical as Thickness is not numeric. But when we use this query in IN clause as shown below it works fine.
select *
from tmpItemPrice
Where ItemPriceID in ( Select ItemPriceID
From tmpItemPrice
Where IsNumeric(Thickness) = 1 and Cast(Thickness as float) <= 0 )
So my question are:
- what is the reason behind it?
- Is it right to use it in this way?
Thanks
|
|
|
|
|
does anyone know how to search with case insensitive in access 2000 ?
|
|
|
|
|
Do you mean how to search case sensitive?
I believe MS Access is case insensitive by default.
What kind of search exactly are you trying to do?
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
how much does Enterprise library affect on performance of the application????
Has anyone used it ?
|
|
|
|
|
Hi,
will the usage of UNION query affect the program throug put efficiency?how to over come that?
Thanks,
DiligenZ
|
|
|
|
|
DiligenZ wrote: will the usage of UNION query affect the program throug put efficiency?how to over come that?
The use of the UNION is to join the result sets of two or more queries into one query. When it is used there generally is no other option so efficiency cannot be a consideration unless you consider it more efficient not to run the query in the first place.
The alternative to using a UNION to join two result sets together is to create a temp table and INSERT the result sets into that then SELECT out of the temp table - I would suggest that route is vastly more complicated and time consuming that a UNION . You should be using temp tables if you want access to the result of a complex query a number of times in near future queries. This saves you from repeated running the same query.
If you are using a UNION incorrectly, for exampe
SELECT * FROM MyTable WHERE someColumn = 1
UNION
SELECT * FROM MyTable WHERE someColumn = 5 then it will probably have an impact - you should, in that case, construct a single query with a WHERE clause as
WHERE someColumn IN (1, 5)
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
-- modified at 2:38 Friday 28th April, 2006
|
|
|
|
|
Hello, Here is the problem I have, is there anyone know how to slove it?
I have a Window XP SP2 machine with Microsoft SQL 2005, All my database are in this machine. I have an application is installing in another Window XP SP2 machine and in the same network. I cannot get access to the database from the second machine using my application. When I run the application, it says [DBNETLIB][ConnectionOpen(connect()).] SQL Server does not exit or access denied.
I know there is a firewall issue in the window xp sp2, I have already open the port 1433 in the server machine, but it still cannot connect.
I very apperiate your help.
Lisa
|
|
|
|
|
If I remember correctly, SQL Server 2005 is locked down and can only communicate with processes on the local machine. You have to turn on TCP/IP communications. I don't have SQL Server 2005 in front of me right now, and I don't remember the exact steps.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
will you please link some how to slove this kind problem articles for me? Thanks.
Lisa
|
|
|
|
|
Colin is absolutely correct (as always<smile>), 2005 is locked down by default.
For a solution to your problem point your browser here for a solution.[^]
Pictures of the menu available at the drive-thru
|
|
|
|
|
Ok, this may sound a little elementary but I have no clue what a "schema" is. I know quite a bit about Sql Server but it's not my area of expertise. My boss just emailed me saying he needs me to create a schema of one of our databases.
What exactly is a schema and how do I go about creating one in enterprise manager?
Thanks in advance.
-Goalie35
|
|
|
|
|
SQL Server Books Online says a schema "can be thought of as a conceptual object containing definitions of tables, views, and permissions."
But your boss probably just wants you to make a database diagram that has all the tables, relationships, keys, etc. in your database. The Diagrams node is right above the Tables node in the Enterprise manager. There isn't much to it.
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
schema is a logical representation of Business logic from a database.
example: You have a large ERP system and have 4 schemas One each for Accounts, Stock Control, Purchasing and Sales.
Consider it a logical database within a physical database.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
I have seen this syntax in several news group posts:
Dim AccessCommand As New System.Data.OleDb.OleDbCommand("INSERT INTO Orders SELECT * FROM [Orders] IN '' [ODBC;Driver={SQL Server};Server=(local);Database=Northwind;Trusted_Connection=yes];", AccessConn)
but of course it does not work and of course I cannot find any reference to anything like it at Microsoft. Does anybody know where to find the documentation to this kind of syntax?
Tom
|
|
|
|
|
hello, i have a problem with the relations between 2 tables. I want to make a table with contacts and another table with websites. I want to have many website for 1 contact! SO 1 contact can have many websites. Can someone help me on this pls?
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Naturally, the contact table will have a primary key (some sort of ID for each individual contact). The websites table will need to store this key also - but in the websites table it will be a foreign key (because it is the primary key of another table). The websites table will also naturally have a primary key of its own.
Is this enough to get you going?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
thanks mate! Now i need to study on ADO.net to make the vb.net communicate with my Database.
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Hi Adrian,
Are you using some kind of form in your .NET application as a database interface? If so, you can use an oleadapter/sqladapter to connect to your database. The procedure is quite straight forward (there is a Wizard). The data controls are on the Data tab of the Toolbox in the IDE.
QC
|
|
|
|
|
When i use oledb.oledbconnection,i connect to SQL Server with this connection string :Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=MDLABS;Data Source=SQL
But when i use sqlclient sql connection , i cannot connect to sql server.
my sqlclient connection string is
Persist Security Info=False;User ID=sa;Initial Catalog=MDLABS;Data Source=SQL
What is missing?
|
|
|
|
|
Try adding in the Instance name
e.g.
Source=SQL\SQLSERVEREXPRESS
or the password even if its blank
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
what is difference between isql and osql
|
|
|
|
|
How extract the numbers only in the particular filed (Mobile_no).
ex. data’s like mr law ( 011-2231183)
House Fax:72336 6553
En Zaiadnal -202323204
I used replace but still the characters is coming
raj
|
|
|
|
|
Well, one solution would be to create table with a column (tinyint) named HouseFax in which you would place the number 72336 6553. You wouldn't have any problem extracting the number then...
Pictures of the menu available at the drive-thru
|
|
|
|
|
thanks for your suggestion. i will try...
raj
|
|
|
|
|
You could soemthing like this, not very clever but it works and you could alway put it in an UDF.
declare @Mob varchar(50)
set @Mob = '0122-1230-123'
set @Mob = REPLACE( @Mob , '-', '')
set @Mob = REPLACE( @Mob , ' ', '')
set @Mob = REPLACE( @Mob , '/', '')
set @Mob = REPLACE( @Mob , 'T', '')
set @Mob = REPLACE( @Mob , '\', '')
SELECT @Mob
Results
--------
01221230123
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|