|
It is ordered by the stock code.
Everything I said at the SQL level applies.
You would write code in a db layer to do that.
Then the GUI level would use the db layer.
|
|
|
|
|
how we find next week day's
date of next day using current calender .
suppose we put sunday in variable then show date 6 jan 2013.we want find next week all days date one by one.
|
|
|
|
|
Do some reading around the datetime data type, there are various attributes that will help you. DayOfWeek (I think) returns 1-7 which can be used to get the info you need.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
dear all
i try to learn ado.net so i start with an article how to build database using ado+access and vb.net and think this article is compatible with visual studio 2005 not 2010 which i have so some error i face like
Me.BindingContext(DataSet1, "table1").Position = 0
i tray to read the first record from access data base
any one can guide me to learn new version of ado.net with ms access
best regards
|
|
|
|
|
I will make 2 recommendations
1. Change to SQL Server database it will be much more useful to train on.
2. Learn to do some research this is an excellent tool[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hello all, i want to ask how syntax cast real to numeric using scale in sql server 2005, i am already try but still error in datagrid, i am using jeasyui framework, can you help me.please...?!
|
|
|
|
|
What error? What did it say? Can you post you Sql-statement?
|
|
|
|
|
insert into rk_process (code,name,label) values ('01','lee001','aa' )
insert into rk_process (code,name,label) values ('01','lee002','aa' )
insert into rk_process (code,name,label) values ('01','lee003','aa' )
insert into rk_process (code,name,label) values ('01','leek001','aa' )
insert into rk_process (code,name,label) values ('01','leek001','aa' )
want to filter only (lee) but it showing (leek) also
select name from rk_process where name like '%lee%')
thanks in advance.
Result
lee001
lee002
lee003
leek001
leek001
but i need only
lee001
lee002
lee003
|
|
|
|
|
You specified in your like clause that you want any words with "lee" so that is what you get. Try "lee0" so it will not get those containing the 'k'.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Not tested, but off-hand...
'%lee[0-9]%'
or
'%lee[^k]%'
P.S. You didn't specify which database system you are using. And you probably don't need the leading percent sign (% )
modified 28-Dec-12 12:55pm.
|
|
|
|
|
Tested:
select name from rk_process where name like '%lee[0-9]%'
Yields:
lee001
lee002
lee003
|
|
|
|
|
thank you so much PIEBALDconsult
|
|
|
|
|
by using this query you can achive you require output
select * from rk_process where name like '%lee0%'
--raj
|
|
|
|
|
I'm not designing a purchase order system per se, but it is the closest thing to what I'm actually doing so that's why my question/concern involve it. In a "minimal" PO system, you have the following tables:
Customers
Orders
Order Details
Products
When an order is first created (e.g., #123), product descriptions and prices are pulled from the Products table. That order is marked as paid. A few months go by and some of the products in the Products table get updated with new prices. Now what happens when I look at order #123 and its details? The price of that order will no longer match the sum of its individual products. Is that common? Am I looking at this from the wrong angle?
Thanks.
- DC
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Instead of having one price record per item, have many records with history so you can see what the price was when the order was placed.
Something like:
Item: ItemId,Name,Description,Supplier,etc.
1,Widget,A standard widget,Widget Co,...
ItemPrice: PriceId,ItemId,FromDate,ToDate,Price
1,1,2012-01-01,2012-07-01,1.00<br />
2,1,2012-07-01,null,1.50
When a new price is added, the FromDate of the new record and the ToDate of the previous price are set as Now.
You find the current price by WHERE ToDate IS NULL
To find a price for an order you can use WHERE orderdate BETWEEN FromDate and ISNULL(ToDate,Now)
You may add NextPrice and PreviousPrice fields if you need to do a lot of lookups.
(Specific syntax depends on the particular database in use.)
|
|
|
|
|
Another alternative is to have the details table also record the price.
That is basically a requirement if one allows a manager to do a price override.
|
|
|
|
|
Good point. Yet shouldn't there be some sort of an adjustment record that can store that rather than leave an auditor wondering why the price was different?
Still, you need both the price history and a way to override the price (with a paper trail).
|
|
|
|
|
PIEBALDconsult wrote: Yet shouldn't there be some sort of an adjustment record th
An Audit record.
The audit records would also keep track of things like voided transactions, reversed items, etc.
|
|
|
|
|
jschell has the right of it, put all the details required to calc the value on the detail record. This may also include any discount/adjustment values. Your invoice report should only pull the descriptors from the product and customer tables
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am learning Asp.net with C# and Sql
server. I came across with a huge fixed width text file of 1780 columns. I have to import this file in sql server table. I will appreciate if you can help in this.
Thanks
Ibrahim Sharief
isharief291@gmail.com
|
|
|
|
|
|
Use Data Import Export Wizard of Sql Server
|
|
|
|
|
Besides just importing it you might want to consider if you really want to have a table with that many columns.
|
|
|
|
|
Hi
i want to show results something like this...
First row contain the opening balance calculated by this i.e: Sum(Balance)where datefield <= DateByUser
and next rows shows the records between dates given by user & evaluate balance on each row
output should like this..
VchrNo___DrAmnt___CrAmnt___ Balance
00 --------00---------00--------1570
113--------10---------00--------1580
115--------15---------00--------1585
123--------10---------00--------1595
123--------12---------00--------1607
. . . .
. . . .
|
|
|
|
|