|
You can do smart things. Just make some table with sources of your procedures encrypted in some heavy algorithm. Then decode it outside of database (or even inside through some .dll with C# CLR integration) and execute it programmatically. Or you can write stored procedure that will exec your encrypted stored procedure
Wish you luck!
Adrian Pasik
|
|
|
|
|
Hi all,
I am using query something like that
select * from table1 where column1 = 'value1' and column2 = 'value2';
and I have created the index like this
create index index1
on table1(
column2
);
i have used only one column because column2 is usually unique and can only sometimes repeat
Will the query will use the index or do i have to create index with both columns? I am using Oracle database.
Regards
Shajeel
|
|
|
|
|
The program I'm working on has a screen full of project data. The client wants to be able to run a "Google like" text search across all the text/lookup fields to return matching projects. Of course they want to be able to search on phrases also, matching all words, some words, etc.
The data is spread across around 10 tables. My first thought was to use Contains() in some capacity, but the db isn't full-text indexed. I'm not sure it would help if it was.
My remaining options seem to be:
1. Concatenate all the string info for each record into a field. Build up a custom select string with multiple Like searches, one for each word in the phrase to search. Run this with exec. Pretty sure the performance will suck on this one.
or
2. Concatenate all the string info for each record into a field. Select this data into a temp table and use a cursor to delete the non-matches for each word in the phrase to search. Pretty sure the performance will suck on this one also.
Are there any options I'm missing or has anyone got any better ideas?
|
|
|
|
|
thrakazog wrote: 1. Concatenate all the string info for each record into a field. Build up a custom select string with multiple Like searches, one for each word in the phrase to search. Run this with exec. Pretty sure the performance will suck on this one.
Well, it ranges from sucky to extremely sucky, depending on the implementation. I'm hoping to write an article about this topic in the weekend
A fast tip; why not create a shadow-table that holds the same columns, as varchar-types? It's a lot faster than converting everything on the fly, and you can let the server insert a varchar-record with a trigger from the original table.
Good luck
I are troll
|
|
|
|
|
There's a new article (not by me btw), containing a simple search-engine algorithm[^] that could be adapted to work with SQL CE
--edit--
This[^] is the article that you wanted
I are troll
modified on Saturday, March 7, 2009 3:22 PM
|
|
|
|
|
Hi All,
Iam Newbie...
IF EXISTS (SELECT RoomID,DateWhenFilled,DateWhenFree,TimeForHouseKeeping
FROM HouseKeeping)
UPDATE HouseKeeping
SET DateWhenFilled=PresidentialSuite.DateWhenFilled,
DateWhenFree=PresidentialSuite.DateWhenFree,
TimeForHouseKeeping=PresidentialSuite.TimeForHouseKeeping
where (HouseKeeping.RoomID = PresidentialSuite.RoomID
and PresidentialSuite.Available='no')
ELSE
INSERT INTO HouseKeeping (RoomID,DateWhenFilled,DateWhenFree,TimeForHouseKeeping)
select PresidentialSuite.RoomID,PresidentialSuite.DateWhenFilled,PresidentialSuite.DateWhenFree,
PresidentialSuite.TimeForHouseKeeping
from PresidentialSuite
where PresidentialSuite.Available='no';
Structure of both tables are not same.
with this Stored Procedure, Iam getting the error...
Msg 4104, Level 16, State 1, Line 4
The multi-part identifier "PresidentialSuite.RoomID" could not be bound.
Msg 4104, Level 16, State 1, Line 4
The multi-part identifier "PresidentialSuite.Available" could not be bound.
Iam unable to find, what the error is?
Please help
|
|
|
|
|
Are you sure that columns RoomID and Avaliable exists in table PresidentialSuite ?
For more info check this google result[^].
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
thanks for ur reply..
yes, they exist.
and RoomID is primary key.
and if i modify the select statement (i just added braces and no other changes)
select (PresidentialSuite.RoomID,PresidentialSuite.DateWhenFilled,PresidentialSuite.DateWhenFree,PresidentialSuite.TimeForHouseKeeping)
then iam getting this error:
Msg 102, Level 15, State 1, Line 14
Incorrect syntax near ','.
|
|
|
|
|
this T-SQL codeselect (PresidentialSuite.RoomID,PresidentialSuite.DateWhenFilled,PresidentialSuite.DateWhenFree,PresidentialSuite.TimeForHouseKeeping)
is not completed,it must contain from caluse to specify from which table those columns comes.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
yeah, it has from clause and where clause too...
INSERT INTO HouseKeeping (RoomID,DateWhenFilled,DateWhenFree,TimeForHouseKeeping)
select PresidentialSuite.RoomID,PresidentialSuite.DateWhenFilled,PresidentialSuite.DateWhenFree,PresidentialSuite.TimeForHouseKeeping
FROM PresidentialSuite
where PresidentialSuite.Available='no';
|
|
|
|
|
try this
INSERT INTO HouseKeeping <br />
select RoomID,DateWhenFilled,DateWhenFree,TimeForHouseKeeping<br />
FROM PresidentialSuite<br />
where Available='no';
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
its not working
same old error
multipart identifier PresidentialSuite.RoomID cannot be bound.............
|
|
|
|
|
CREATE TABLE [dbo].[HouseKeeping]<br />
(<br />
[RoomID] [int] NULL,<br />
[DateWhenFilled] [varchar](50) NULL,<br />
[DateWhenFree] [varchar](50) NULL,<br />
[TimeForHouseKeeping] [varchar](50) NULL<br />
)<br />
____________________________________________________<br />
<br />
CREATE TABLE [dbo].[PresidentialSuite]<br />
(<br />
[RoomID] [int] NULL,<br />
[DateWhenFilled] [varchar](50) NULL,<br />
[DateWhenFree] [varchar](50) NULL,<br />
[TimeForHouseKeeping] [varchar](50) NULL,<br />
[Avaliable] [varchar](50) NULL<br />
)<br />
_____________________________________________________<br />
<br />
Insert Into PresidentialSuite Values(1,'2009.03.06','2009.03.06','20','yes')<br />
Insert Into PresidentialSuite Values(2,'2009.03.06','2009.03.06','20','no')<br />
Insert Into PresidentialSuite Values(3,'2009.03.06','2009.03.06','20','no')<br />
<br />
INSERT INTO HouseKeeping<br />
SELECT RoomID, DateWhenFilled, DateWhenFree, TimeForHouseKeeping<br />
FROM PresidentialSuite WHERE avaliable='no'<br />
SELECT * FROM HouseKeeping
The last select statement should return you two inserted rows in table HouseKeeping.
Hope this will hel you.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
hi,
i didnot use from clause in the first part and used in the second part.
From clause in set solved my problem
thanks alot
|
|
|
|
|
You are welcome.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
helo..i'm new in programming...wanna ask for a favor..
did anyone here know how to do coding for register new password in visual studio..
i need some advice...please help...
for your information..i use microsoft access to store the new password.
|
|
|
|
|
below is my coding for login button and it's work!
hope to get the information on register button..please help...
Dim sql = "SELECT password FROM [tblpass] WHERE (Password) = '" & txtPassword.Text & "'"
passConnection.Open()
cmd = New OleDbCommand(sql, passConnection)
Dim dr As OleDbDataReader = cmd.ExecuteReader
Try
passConnection.Open()
Catch ex As InvalidOperationException
MsgBox(ex.Message)
End Try
Try
If dr.Read = False Then
MessageBox.Show("Authentication Failed...")
Else
MessageBox.Show("Login Successful...")
Me.Hide()
frmData.Show()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
If passConnection.State <> ConnectionState.Closed Then
passConnection.Close()
End If
|
|
|
|
|
i'm using vb.net (VS2005) and Ms sql 2005
when i'm executing sp using my code(executenonquery) it takes more than 10minutes
but when i'm run it normaly(like a sql query in Ms sql2005)it takes only 3seconds.
i created same sp with different name and executed using code.that time it takes only 3seconds(same as normal execute).
in first time, whats da reason for takes long time?anyon can help me?
Thnks you
|
|
|
|
|
can you write how you call sp from VB
Regards,
Rami Sa'id Abdalhalim
Technical Team Leader
Amman Commercial Complex
Ommayah Str. Al-Abdali
Tel: +962 6 5696500 Ext.235
Mobile:+962 79 5366016
Email:r.abdalhalim@alghanem.com.jo
www.alghanemgroup.com
|
|
|
|
|
Hi everyone,
I have a simple table called test with two columns, ID and Name.. I'm trying the following but it doesnt work.
INSERT INTO TEST VALUES(SELECT SEQ_INDI.NEXTVAL FROM DUAL,SELECT NAME FROM TEST);
How would you fill its values again (duplicate them) without violating the primary key constraint?? I tried to use a sequence but how would you do it?? and if you would use a sequence, what your sql statement would look like??
Thank you guys!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
INSERT INTO TEST <br />
SELECT SEQ_INDI.NEXTVAL FROM DUAL,SELECT n.NAME FROM TEST AS n
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Thanks mate, but it still not working, I get this:
1 INSERT INTO TEST
2* SELECT SEQ_INDI.NEXTVAL FROM DUAL,SELECT n.NAME FROM TEST AS n
SQL> /
SELECT SEQ_INDI.NEXTVAL FROM DUAL,SELECT n.NAME FROM TEST AS n
*
ERROR at line 2:
ORA-00903: invalid table name
I like the way you're dealing with it but it seems like it's missing something..
More help.. please..!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Good Day All
I have the Following code
IF MTM_ACTV_SETS.SETS LIKE '%_R%' OR MTM_ACTV_SETS.SETS LIKE '%_L%'
BEGIN
DELETE TBL_CLASH_ACTV
FROM MTM_ACTV_SETS AS1
INNER JOIN MTM_ACTV_SETS AS2 ON AS2.SETS=AS1.SETS
INNER JOIN TBL_CLASH_ACTV CA ON CA.ACTV1=AS1.ACTV AND CA.ACTV2=AS2.ACTV
WHERE AS1.ACTV <> AS2.ACTV
END
And i get the following Error
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "MTM_ACTV_SETS.SETS" could not be bound.
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "MTM_ACTV_SETS.SETS" could not be bound.
What is the Problem ?
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
sORRY I WAS JUST A LITTLE BIT TIRED. I GOT THE ANSWER
SELECT *
FROM MTM_ACTV_SETS AS1
INNER JOIN MTM_ACTV_SETS AS2 ON AS2.SETS=AS1.SETS
INNER JOIN TBL_CLASH_ACTV CA ON CA.ACTV1=AS1.ACTV AND CA.ACTV2=AS2.ACTV
WHERE AS1.ACTV <> AS2.ACTV
AND AS1.SETS NOT IN (SELECT SETS FROM MTM_ACTV_SETS
WHERE MTM_ACTV_SETS.SETS LIKE '%_R%' OR MTM_ACTV_SETS.SETS LIKE '%_L%')
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Hi,
The only privilege I assigned to a newly created user "U" was CREATE SESSION, then I had to assign DBA to it and create a test table then I revoked the DBA Role from the SYS user, now it shows me that the only privilege and role I have for this user is CREATE SESSION
SQL> SELECT PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE = 'U';
PRIVILEGE
----------------------------------------
CREATE SESSION
SQL> SELECT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE = 'U';
no rows selected
SQL>
why can I still select, update and delete that table though I didnt grant this privileges to this table and how can I revoke something I didnt even granted??
Please help guys
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|