|
Thanks for your reply. I also have thinking using LIKE , but if the date is 20200611(11 Jun 2020 ), then my data is getting wrong already ! aLthough the date is many years later, but i just thinking have any other way to get the correct data, any idea ? thanks.
Best regards,
Chee ken
|
|
|
|
|
"Where ApplyDate >= 20061101 and ApplyDate < 20061201"
|
|
|
|
|
I have Created a FullText Indexed table to store the Doc files.
I want querying the DocAuthor,Size, etc.. from Full Text catalog, not from OS Physical file.
I am using Sql Server 2005.
Regards
Fenil
|
|
|
|
|
please, with code and thank u another time
|
|
|
|
|
|
|
|
You're welcome.
BTW, it is customary to just replay to the same post, rather than staring a new one. That makes it much more likely that the person you are replying to will actually see the post, since replying sends an anonymous email. If you create a new psot, it may scroll off the current page long before the person you are addressing revisits that forum.
|
|
|
|
|
Thank you Christian Graus but please, explain your answer as i am beginner and give me an example.
|
|
|
|
|
To rephrase Christian's answer:
1. create a table with a field of type LongVarBinary to hold the wave file (a blob field)
2. read the wave file into a byte array.
3. store the byte array in the LongVarBinary (blob) field using a parameterized query, with the byte array as the value of the parameter.
|
|
|
|
|
please,how can i insert wav data type " audio files " in sql server 2000 database ?
|
|
|
|
|
As binary data, probably a blob
Christian Graus - C++ MVP
|
|
|
|
|
im trying to create a get records function that searches the database for a value and returns all records that match that value. I originally had to working with pure sql, but my professor said i should make my function use parameters. My problem is searching strings. In my original sql statement i used the following to search for strings.
sqlString = "SELECT * FROM " & genTable & _
" WHERE (((" & genTable & "." & field & ")Like'?%'));"
My ill attempt to create a parameter based is as follows
sqlString = "SELECT * FROM " & genTable & _
" WHERE " & field & " Like '?%'"
Any ideas on whats wrong ???
|
|
|
|
|
Whoah. Don't go there. Do not do a query like that EVER. This just cries out for a SQL Injection attack. Search for Colin Angus Mckay's article on SQL Injection to see why this is a really bad idea.
I suspect that the parameters that your professor was talking about were SqlParameters (assuming that this is a .NET application) or some similar.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hey everyone, im a little stuck here
basically i have a SQL 2000 function like this:
<br />
CREATE PROCEDURE GetTaskListForSupervisor<br />
as<br />
declare @rowcount int<br />
set @rowcount = select count(id) from TimeStudy<br />
<br />
GO<br />
Obviously, that doesnt pass the syntex check, but can you see what id like to do? just put the count of all the rows into a locally declared variable? Im a bit out of my depth here so could someone pull me back into shallow waters please
Cheers
Will
|
|
|
|
|
"select @rowcount = count(*) from TimeStudy" ;no advantage to count(id) over count(*)...
|
|
|
|
|
|
thanks guys
Excellent forum - excellent help!
|
|
|
|
|
you may use like this:
declare @ROWCOUNT int
select @ROWCOUNT = count(id) from syscolumns where id = 1
if @ROWCOUNT > 2
print @ROWCOUNT
else
print 'Less'
|
|
|
|
|
i have two tables in my data base named tableA and tableB
tableA and tableB have a filed named (Eid),, how do i know from tableB that it shows me that particular record which is not in tableA
hello
|
|
|
|
|
select * from tableB b where not exists ( select * from tableA a where a.Eid = b.Eid )
Chris Meech
I am Canadian. [heard in a local bar]
I agree with you that my argument is useless. [Red Stateler]
Hey, I am part of a special bread, we are called smart people [Captain See Sharp]
The zen of the soapbox is hard to attain...[Jörgen Sigvardsson]
I wish I could remember what it was like to only have a short term memory.[David Kentley]
|
|
|
|
|
|
I have absolutely no idea why some idiot voted your question a 1.
That aside, are you executing the create commands over an ADO.Net connection, or reading the script with osql?
If you are using an ADO.Net connection, try issueing a "use MYNewDatabase" command on the same connection, and then execute the stored procs on that same connection, rather than opening a new one.
|
|
|
|
|
Hello,
in Visual Studio 2005, I designed an SQL database for storing large amount of rows (several hundred million rows). It's intended for storing market tick data.
With this huge amount of rows, I wanted to make the row design as small as possible datawise, naturally. So I employed several TinyInt (byte) columns instead of int (Int32) or SmallInt (Int16).
But the problem is now that VisualStudio doesn't allow the primary keys with the TinyInt data type to be set as "AutoIncrement" in the DataSet. Why this is so I can't tell.
How can I work around this?
Thank you very much for any help,
Michal Kreslik
|
|
|
|
|
Hoahh boy. Well, think about how big a TinyInt is, and then think about how big your Autoincrement will get.
To work around this (for a DB the size that you have indicated), you can either use a uniqueuidentifier field (set to default with NewID()) or use a long (Int64).
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|