|
I NEED TO UPDATE THESES RECORDS BASED ON THIS QUERY
select * from property where
Lis_key in(select lis_key from property where substring(func_key,1,5)='GEOSS'
And substring(func_key,6,8) >=3)and
Func_key = 'PV000000'
and substring(Attrib_code,5,2)!=16
AND ACTIVE = 1
order by Lis_key
HELP ME
Vuyiswa
|
|
|
|
|
DON'T SHOUT
Just use
update <tablename> set <columnname> = value, ...<br />
Where...
Wout Louwers
|
|
|
|
|
Please tell me sql queery which returns the recordset between two date inclusive of two dates
|
|
|
|
|
"select * from from table where coldate between date1 and date2"
date1 and date2 should be according to database format.
Regards
Shajeel
|
|
|
|
|
I always avoid BETWEEN because it is not clear whether it is inclusive or exclusive. If there was a bug that another developer had to fix I'd want to keep the intent as clear as possible.
|
|
|
|
|
I will keep this in mind. thanks.
Regards
Shajeel
|
|
|
|
|
sonia_basangar wrote: Please tell me sql queery which returns the recordset between two date inclusive of two dates
You have not provided enough information to do that. However, I can tell you that in your WHERE clause you will need something that looks like this:
MyDateColumn >= @SomeStartDate AND MyDateColumn <= @SomeEndDate
Remember that for the end date, you may have to set the time element to 23:59 if you are storing a date and time and want the results for any time on the end date.
|
|
|
|
|
Hi Thanks for reply
MyDateColumn >= @SomeStartDate AND MyDateColumn <= @SomeEndDate
this is perfect this is waht i did but when @SomeStartDate and @SomeEndDate
are same then it dont return the records for same date not works.
|
|
|
|
|
If the start and end date are the same and nothing is returned then there is no data for that date.
Keep in mind what I said about time shifting the end date to 23:59 in case the dates stored in the database contain time information also.
e.g. You want to find stuff on 25/Apr/2007. If you create a datetime with only the date part, the time part will be 00:00 (midnight). If you have data marked as 25/Apr/2007 09:36 then the query will not return anything because the data is not at midnight. This is why you have to set your end date to 25/Apr/2007 23:59 to ensure that you get everything
|
|
|
|
|
Hi Colin
Thanks for your mail
but still my problem is not get resolved
...........
MyDateColumn >= @SomeStartDate AND MyDateColumn <= @SomeEndDate
this is perfect this is what i did but when @SomeStartDate and @SomeEndDate
are same then it dont return the records .
|
|
|
|
|
What Mr.Colin is said right.
He says that some of Ur date Column will have date like 03:03:2007:20:20:20
i.e with hrs and minutes.
Try This:
floor(Cast(MyDateColumn as float)) >=
floor(cast(@SomeStartDate as float)) AND
floor(cast(MyDateColumn as float)) <=
floor(cast( @SomeEndDate as float))
Regards,
Arun Kumar.A
|
|
|
|
|
try like this
MyDateColumn >= "01-Apr-2007 12:00:00 AM" AND MyDateColumn <= "01-Apr-2007 11:59:59 PM"
Make sure urself - the value i gave in double quotes for just sample. So u have to convert this into date in the SQL
Regards
R.Arockiapathinathan
|
|
|
|
|
I need to Find All the Records that Are GEOSS and that are not DUETt.The Following statement made that Possible.
select * from property
where substring(func_key,1,5) = 'GEOSS' And substring(func_key,6,8)>= 3
*There is a Column that is named lis_key in the above results i need to select it from the results above results distictively and search based on that Distict lis_key to Find al records that have
Func_key column ='PV000000' and substring(Attrib_code,5,2)!=16
Please Help ,i hope i explained it clear today
Vuyiswa
Vuyiswa
|
|
|
|
|
REPLYING TO PROBLEM, I GOT IT FIXED NOW THATNKS FROM MY MAN HERE WHO HELPED ME
HERE WAS THE SOLUTION
select * from property where
Lis_key in(select lis_key from property where substring(func_key,1,5)='GEOSS'
And substring(func_key,6,8) >=3)and
Func_key = 'PV000000'
and substring(Attrib_code,5,2)!=16
AND ACTIVE = 1
order by Lis_key
Vuyiswa
|
|
|
|
|
Hi all,
Any one can provide me a way to download/buy "informix ODBC 3.81"
thanks
|
|
|
|
|
Try IBM Informix[^].
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
How i can protect my database so that unautorised users cann't have access to my database from backened but can have access from frontened
Manoj Bisht
|
|
|
|
|
Hi, this is was a question in my interview. Now i have a dataset which has to be binded to datagrid. Before binding to datagrid we have to customize the dataset. For example the following data dataset has no, name, address.
no name address
---------------------------------
| City | Zipcode |
| | |
| | |
Now i should not bind the address directly, it should be as above. city in one coloumn or zipcode in one coloumn like that it should be customized. How it is possible. plz answer me...
thanx in advance
|
|
|
|
|
there is no in-built function in .net which you can use to customize a dataset. what u have to do is store the Address in a string variable...with the string manipulation functions(like Substring,Split etc.) you have to split the address to have the City/Zip etc...now with this data u have to make a new Dataset
Tirtha
Miles to go before I sleep
|
|
|
|
|
thanx. Yes till part i can do after this how to bind this to datagrid.
|
|
|
|
|
Do have 4 Columns in the Grid.
Bind 3rd column with the DataField="Address".
Dont specity the DataField property for the 4th column.
Iterate through the entire grid like
for(int i=0;i<grid.rows.Count;i++)
{
String txt=grid.rows[i].Cells[2].Text;
create 2 string city and zip from txt.
grid.rows[i].Cells[2].Text=City;
grid.rows[i].Cells[3].Text=zip;
}
Regards,
Arun Kumar.A
|
|
|
|
|
Hi, Can anyone tel me in which situation to use a stored procedure and in situation to use a sql function.
thanx
|
|
|
|
|
Why cant U better buy a good book and prepare for Ur interview?
Regards,
Arun Kumar.A
|
|
|
|
|
Do u think that the in the books they will give the situations also. I know the difference between both of them. I have a book in which there are no situations for the concepts. Thanx for your suggestion.
|
|
|
|
|
Hi guys
I've have set up a data-table in MS Access.
I have a colomn with the names of my data and a column with numbering of the data (One number for each name). I then have a new entry of data, which I want to compare to the data in my table. I want to do this by calculating the distances between the new data and all of the data (numberings) in the data-table. Finally I want to choose the ten data-items from the tables, which have the shortest distance to the new data-entry.
My problem is... How can I in sql-code calculate the distances, one row at a time - save them and later compare all the distances and choosing the ten shortest ones.
I haven't done much sql-code before - so i would really apreciate any suggestions or maybe some good links
Thanks in advance
AL
|
|
|
|