Skip to main content

wcs query to fetch shipping cost by store

In websphere commerce 7 model you can use the folloging query to fetch the shipping cost of catalog entries. This query could also be useful for newer versions.

select cr.calrange_id,cc.calcode_id, c.partnumber,j.code,j.description,value from catentry c
left outer join CATENCALCD cd on c.catentry_id=cd.catentry_id
left outer join calcode cc on  cd.calcode_id=cc.calcode_id
left outer join calrule r on cc.calcode_id=r.calcode_id
left outer join CRULESCALE s on r.calrule_id=s.calrule_id
left outer join CALRANGE cr on s.calscale_id=cr.calscale_id
left outer join CALRLOOKUP cl on cr.CALRANGE_id=cl.CALRANGE_id
left outer join SHPJCRULE sr on sr.calrule_id=r.calrule_id
left outer join JURSTGROUP jg on jg.jurstgroup_id=sr.jurstgroup_id
left outer join JURSTGPREL jgr on jgr.jurstgroup_id=jg.jurstgroup_id
left outer join JURST j on j.jurst_id=jgr.jurst_id
where (partnumber like 'partnumber% )
and catenttype_id in ('ItemBean','PackageBean')
and cc.storeent_id=storeid

and cr.markfordelete=0

Comments

Popular posts from this blog

Configuring web application with gwt+spring+hibernate (continued)

Last Time we learned how to configure a hibernate+ spring+ GWT application. Now we will continue explaining how I built this  application. First, we'll start with the Beans. For this example we will define one bean called Regions and an interface called Bean . Region will be the pojo class that contains the mapping for HR schema regions table The  @Entity  annotation is used to mark this class as an Entity bean. To use this annotation the class must have at least a package scope no-argument constructor. The  @Table  annotation is used to specify the table to persist the data. The  name  attribute refers to the table name. If  @Table  annotation is not specified then Hibernate will by default use the class name as the table name. The  @Id  annotation is used to specify the identifier property of the entity bean. The placement of the @Id  annotation determines the default access strategy that Hibernate will use f...

Removing duplicates with awk

To remove duplicates in linux you can use awk command as follows:  awk -F- '!seen[$1]++' file.txt > output.txt where: -F is paraeter to deternime separator used to define columns and in ths case the dash 8-) is the sparator used '!seen[$1]++' is the expression used for the line in order to be printed > is the instruction to send command output o a file

Configuring web application with gwt+spring+hibernate

Building a web application using hibernate, spring and gwt. This time we will show how to create and cofigure an application that will use hibernate , spring and gwt. I will use HR sample database that comes with OracleXE. First , you have to create a GWT project (you can follow the steps for that on  https://developers.google.com/web-toolkit/ ) After you have the project created you need to create a tree of packages like that: Open HumanResources.gwt.xml and add the following line : By doing that you tell gwt to include model package and all dependent packages into gwt compilation Now we can start configuring spring and hibernate. to configure spring first you have to add the following lines on web.xml This will allow spring context to start doing its business. The you will have to create a field called "app-config.xml" in which you will define the settings for spring and hibernate. Over this app-config file first configure the properties as follo...