|
I want to allow users to create filters by typing in a textbox the filter they wish to apply to any particular column. I want to apply the filter as the user types it, and I want to apply it as if the displayed value were a string. For example, if I have data with numbers 0-23 associated with it, and a user types the number 1, all data with numbers 1 or 10-19 should still be displayed. So essentially, I want to apply the filter expression "[ID] LIKE '1%'", but when I do this I get the error "Cannot perform 'Like' operation on System.Int64 and System.String". How can I prevent this error without making the filter string something like "[ID] = 1 OR ([ID] >= 10 AND [ID] < 20) OR ([ID] >= 100 AND [ID] < 200) OR ..." (because that would get out of hand)? Thanks.
-Jeff
|
|
|
|
|
Do not post in multiple forums
|
|
|
|
|
Dear Just Convert the Value Into string in Presentation or coding. and if you used a stored procedure then parameter data type set is nvarchar.
then it is working
|
|
|
|
|
hi all
could i insert an evaluated expression in the isnull function ??
example:
select pag_id ,exp,
temp_col = case when isnull(exp, 0)=1 then 0 else 5+3 end
from page_loc
/*
@ the above query is what i want to do, but the expression inside the
isnull function give a syntax error.
@ exp1 = (select sum(sub_pages_count) from vw_page_loc where pag_lang='en')
@ please ignor the logic
*/
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Yes you can! Check out your expression!
If failed again try out the coalesce function.
Gautham
|
|
|
|
|
what is the Difference between this two using datagrid in vb6
Dim rs As New ADODB.Recordset
dim rs new recordset
thanks
Vuyiswa
|
|
|
|
|
No difference.
in first case u give the exact refernce when u dont import ADODB namespace/Class
in other case u import the ADODB and now used recordset
|
|
|
|
|
Thank you man,sory i did not reply earlier, i was in a meeting
Vuyiswa
|
|
|
|
|
hey guys...
is there any way to speed up(force) the database restoring..plz tell me the syntax...
|
|
|
|
|
|
Hi all,
i want to know that "how to write triggers in stored procedures" is it possible? and can we write cursors in stored procedures? if yes then pls send me solution.
Thanks
|
|
|
|
|
declare <cursor_name> cursor for
open cursor_name
while @@fetch_status=0
begin
fetch next from cursor_name into variable_name1,var2......varn
end
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Sophia Rekhi wrote: i want to know that "how to write triggers in stored procedures" is it possible?
A trigger is a stored procedure of sorts that is run automatically on an event, such as data being inserted into a table.
I don't understand the benefit of writing one in a stored procedure? I also doubt if it is possible. You could write some dynamic SQL and execute that in order to create a trigger from within a stored procedure, but wouldn't it be better just to write the trigger and be done with it?
|
|
|
|
|
i have 3com router and i have Puplic IP address
Nat is Enabled and i configer it like 81.10.29.106:Defule sqlserver port
how to configer sql clint to creat connection Between sql server and sql clint
and thnx
Ahmed El-Badry
|
|
|
|
|
The Server (or Data Source) component of the connection string should contain the IP address and instance name if applicable and Port number
e.g.
81.10.29.106/MyInstance:1433
If you are running the default instance then just the IP and Port.
NOTE: You must also configure SQL Server to accept TCP/IP connection. And you must ensure that all firewalls between the client and server will allow the traffic through. As exposing a SQL Server directly to the internet is a dangerous thing to do it is not normal practice. Some ISPs may automatically block the ports SQL Server uses.
|
|
|
|
|
Enter the IP Address where u Write the Server name.
and give the some information .
|
|
|
|
|
I am inserting Data from one form into two linked tables but i don't know the sql syntax for such a query, plz send me an example.
yasso
|
|
|
|
|
|
Hi Arun thnx for being interested.
As i told u i want the SQL insert query syntax to insert data into two linked tables.
lets say this is the syntax to insert data into one table
INSERT INTO TABLE1(column1, column2)
VAlUES (x, y)
whats is the syntax to insert data into two linked tables or more.
thanx for ur help
yasso
|
|
|
|
|
Why can't you use 2 separate insert statements?
Regards,
Arun Kumar.A
|
|
|
|
|
i used them but its gave a syntax error. Look this is what am going to do:
I am inserting data from one form into two linked tables "Student" and "Grade" linked together by the Grade_ID column which is a primary key in the Grade table and a forgien key in the Student table. After i insert the data i go to the database to see that the primary key
in the Grade table is inserted and its ok but the forgien key in the student table is still null. How can i link them together so that the forgien key in the Student table can take the same value as that in the grade table.
yasso
|
|
|
|
|
How can you say that the foreign key column will be updated automatically
when the primary key column is updated?
I think you have to use two insert statements like:
insert into Student(GradeID,OthercolumnName) values(GradeValue,OthercolumnValue)
insert into Grade(GradeID,OthercolumnName) values(GradeValue,OthercolumnValue).
Regards,
Arun Kumar.A
|
|
|
|
|
I execute the following:
EXEC sp_fulltext_catalog 'DescriptionsOfProducts', 'create'
EXEC sp_fulltext_table 'tblProducts', 'create', 'DescriptionsOfProducts', 'PK__tblProducts__50FB042B'
EXEC sp_fulltext_column 'tblProducts','ProductName','add'
EXEC sp_fulltext_column 'tblProducts','ProductDescription','add'
EXEC sp_fulltext_table 'tblProducts','activate'
EXEC sp_fulltext_catalog 'DescriptionsOfProducts', 'start_full'
On my local pc it works fine... populates the fulltext catalog just great.
however on my web server, it creates everything correctly, however has an item count of 0???
i cannot find whats going on! the databases are identical, both in structure, indexes and data.
any ideas?
|
|
|
|
|
what SQL server is this??
L.W.C. Nirosh.
Colombo,
Sri Lanka.
|
|
|
|
|
Hi All,
I am planing to use SQL server fulltext search and xml to store data of a
ecommerce site (mainly its products).. the site is having about 20 million
products.. I am going to store all the product in xml type.. and I need to
search them extensively.... The site going to have lots of users .. I am
assuming about 500000 page views per hour.. but all these will not hit the
search button .. (we use cache to reduce the database hits as much as
possible)
In a scenario like this .. is it a good approach to use xml ?
Is the SQL fulltext search can perform well here, in simple term is the SQL
server the choice here??
Please give me your honest answers I need to make a choice here..
Also if you suggest me to go with SQL please attempt to assist me with some links where
I can find tips to improve the SQL server performances to hold on to this heavy load..
L.W.C. Nirosh.
Colombo,
Sri Lanka.
|
|
|
|