|
Go for the one-shot. It is more effective... Give up about the entity-objects... they are useful when the colexity is very high, else use the database for what the databse is effective and good about...
/Mattias
|
|
|
|
|
natural join looks betteer, but you could make a view for this...
CREATE OR REPLACE VIEW AS
SELECT your_columns_to_return
FROM Address, City
WHERE (Address.CityID = City.id);
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
why there is a syntax error on 2 ?
1 . set @sql = @sql + N' and (summary like ''%' + @keywords + '%'')'
2 . set @sql = @sql + N' and (summary like ' + '%' + @keywords + '%' + ')'
|
|
|
|
|
I don't see a syntax error, but in number 2, @keywords isn't single quoted... your query will look something like...
and (summary like '%somevalue%') and (summary like %somevalue%)
|
|
|
|
|
I would guess it is because the '' in line 1 isn't a quotation mark, but double pings ' which means escaping the second ping.
Ping normally starts a string, but if you need pings in the string, you must escape them by adding a ping infront.
Thus the string isnt' terminated proberly in line 2.
I'd think something along that line?
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
|
ahh - yeah. I've always myself used and heard ' refered to as a ping when used in code - but yes - it is an apostorphe in english
sorry - habbits die hard
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
Hi there...
this is the problem...
U have to have an apostorph after like an you dont... so change the code to:
set @sql = @sql + N' and (summary like ''' + '%' + @keywords + '%' + ''')'
/M
|
|
|
|
|
Hi
This is part of a sp to search on db.
set @sql = @sql + N' and (summary like ''%' + @keywords + '%'')'
but it doesnt find unicode cells of table.
what should i do ?
|
|
|
|
|
Dont't use concated SQL... for this.
Create a procedure and just add the value as paramter..
Also.. beaware of the collation...
/M
|
|
|
|
|
Hello friends,
I got some problem...
I have table like
CREATE TABLE publishers
(
Name char(4) NOT NULL,
ID varchar(40) NULL,
City varchar(20) NULL,
State char(2) NULL,
Comments varchar(3000) NOT NULL
)
I have some store procedure which put xml files and put that into this sql table, now problem i am facing here is that all the character from comments column i am not getting , I already increase the width of that column from varchar(1000 ) to varchar(3000)
Two days before i am getting well results i.e. all the character from this perticular field(comments) and seeing that result, character in that field was just 800 to 850 approx.But now why I am getting like that??? One thing is sure the character which is coming from XML file is not more than 850.Then is there any setting should i change or by mistake changed??
Please Help me out!
T.I.A
Shashank
|
|
|
|
|
Try nvarchar instead of varchar.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
check the prameters for the procedure.. they has to be the same as for the table...
/M
|
|
|
|
|
I have a problem to connect to a remote SQL Server in WinXp SP2.
The error is "SQL Server does not exist or access denied".
I've done almost all of the solutions that are recommended in Microsoft support service.
I added sqlservr.exe program into the exception list of firewall included with XP SP2.
I added 1433 (TCP) and 1434 (UDP) ports into that exception list as well.
Even I disable XP SP2 firewall. but I got the problem again.
Finally I installed SQL Server Service Pack 3a but unfortunately the problem is still exist.
I really don't know what should I do after doing all of the above tasks.
Is there anybody here who can solve this problem?
Thank you in advance.
|
|
|
|
|
---Check if there is a program uses the Same ports
---Check Your Domain Account when you Try to Connect to the Server
---Try to Connect by IP address not the DNS
---check the Secury Setting in the SQL server
---Check if the Server has a firewall that prevent you from Connect
---Norton Firewall ...?
agmb
|
|
|
|
|
How does the connection string looks like...? note that the SQL-server supports several instances and that that might be a peoblem if the instance nto is specified...
/M
|
|
|
|
|
Try:
select * <br />
from aaa cross join aaaa2 <br />
where aaa.q = 1<br />
and aaaa2.e = 7
Or:
select * <br />
from aaa, aaaa2 <br />
where aaa.q = 1<br />
and aaaa2.e = 7
|
|
|
|
|
its a wrongggggggggggggggg answer u have to check ur answers first, i found another soultion which is left join or full join with omition of the alter, however tanks for trying helping me........
Thanks alot
Hamody
|
|
|
|
|
Mohammad Daba`an wrote:
its a wrongggggggggggggggg answer
That was not very polite.
Mohammad Daba`an wrote:
i found another soultion which is left join or full join with omition of the alter
Huh?! Your original request was "i need to change the following code to another one which does the same function without using join, left outer joi, or any join statements"
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Hmmm... strange select.
First of an outer join without a join... hmmm..
What the result is I can not predicct... What is the result you are looking for...?
/M
|
|
|
|
|
i have the following code:
while(true)
{
Thread.Sleep(delay);
SqlConnection connection = new SqlConnection;
connection.Open();
'some code here'
connection.Close();
}
i'm wondering how many sqlconnection will be made? after a while is it possible to get an "System.NullRefferenceException: Object not set to an instance of an object"(probably because the new connections are instantiated, but never disposed)?
thanks.
MetalSandman.
|
|
|
|
|
|
i have a project written in C# using and ODBC database that use SQL pervasive
SQL Driver ,
Problem:
when i run the windows application that lunch the report in my Computer every thing works fine
but when i run the application and try to run report from another computer that have the same ODBC access the Application Threw an Exception Message Said 'ReportDocumetn Threw Exception'
//---Notes
the Report is built by VS.NET Crystal Report IDE : its a Class
DataAdapter filling Data in the Other Machine : C# Code have No Error
Go East Go West C# is the Best
agmb
|
|
|
|
|
Can you force the SELECT command to select only a single row?
Im using the following:
SELECT * from SomeTable(UPDLOCK) where....
I don´t wanna lock all the tables that the SELECT returns, I wanna lock ONLY one. Is that possable?
|
|
|
|
|