Question : SQL Syntax with ASP Dreamweaver Recordset

Dear Experts

I have the following syntax within an ASP page to select records from a table and produce a PDF:

'SELECT RTRIM(pAddress1) + ' ' + RTRIM(pAddress2) + ', ' + RTRIM(pTown) as Address, pBedRooms, pPublicRooms, RTRIM(pPriceType) + ' ' + RTRIM(pPrice) as Price, pBuildingType FROM dbo.Property'

The column pPrice is MONEY and it returns two decimal places.  I would like to remove the decimal places.

Can anyone advise how the SQL Syntax can be amended.

The column pPriceType is CHAR which I think is causing me problems by combining these fields.

Thanks

Answer : SQL Syntax with ASP Dreamweaver Recordset

You must use ncurses: it's a console library that make able to create GUI-like programs like the ones you have with kernel configuration, dpkg interface on debian/ubuntu and similar. It works in console by using ANSI codes. It make you available also mouse interface and other stuff.
To start, see the "ncurses-programming-howto": it provide a step-by-step tutorial on using ncurses. it's a good idea to follow it from start - ncurses have a steep learning curve.
The 18th chapter is dedicated to menus.

http://www.faqs.org/docs/Linux-HOWTO/NCURSES-Programming-HOWTO.html

hope that helps. I attach also the "basic menu example" from that document. Enjoy ;-)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
include <curses.h>
#include <menu.h>

#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#define CTRLD 	4

char *choices[] = {
                        "Choice 1",
                        "Choice 2",
                        "Choice 3",
                        "Choice 4",
                        "Exit",
                  };

int main()
{	ITEM **my_items;
	int c;				
	MENU *my_menu;
	int n_choices, i;
	ITEM *cur_item;
	
	
	initscr();
	cbreak();
	noecho();
	keypad(stdscr, TRUE);
	
	n_choices = ARRAY_SIZE(choices);
	my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *));

	for(i = 0; i < n_choices; ++i)
	        my_items[i] = new_item(choices[i], choices[i]);
	my_items[n_choices] = (ITEM *)NULL;

	my_menu = new_menu((ITEM **)my_items);
	mvprintw(LINES - 2, 0, "F1 to Exit");
	post_menu(my_menu);
	refresh();

	while((c = getch()) != KEY_F(1))
	{   switch(c)
	    {	case KEY_DOWN:
		        menu_driver(my_menu, REQ_DOWN_ITEM);
				break;
			case KEY_UP:
				menu_driver(my_menu, REQ_UP_ITEM);
				break;
		}
	}	

	free_item(my_items[0]);
	free_item(my_items[1]);
	free_menu(my_menu);
	endwin();
}
	
Random Solutions  
 
programming4us programming4us