Sponsored Content
Top Forums Programming SQL: Alter existing bool after printing Post 302891357 by sea on Wednesday 5th of March 2014 09:12:03 AM
Old 03-05-2014
SQL: Alter existing bool after printing

I'm writing a DB to manage books & dvd's for the library.

So after they added more books/dvd's, they press the print button and all newly added entries are printed.

That is, as it prints all 'printed = false' entries, which (false) is the default value for that field for each new entry.

Anyway, its been several years since my last (my)sql queries, i'm very rusty, further as its access, it might be diffrent as well..

Main issue is, it error's on "UPDATE" and "ALTER" has a syntax error.
Specific part (its vba):
Note that "Gedruckt" is the fieldname and "tblBuchDruck" is the table's name
Code:
Dim blnVariable As Boolean
    blnVariable = True
    'SQL_NEW = "ALTER TABLE tblDataBuch ALTER COLUMN Gedruckt SET default (" & CInt(blnVariable) & ");"
    SQL_NEW = "ALTER tblDataBuch ALTER Gedruckt SET (" & CInt(blnVariable) & ") WHERE Gedruckt = 0;"
    'SQL_NEW= "UPDATE tblDataBuch, SET Gedruckt=" & CInt(blnVariable) & ") WHERE Gedruckt = 0;"
    CurrentDb.Execute SQL_NEW

Thank you in advance
 

10 More Discussions You Might Find Interesting

1. AIX

Can't alter bootlist

Made a sysback tape backup on our 595 running 4.1.5 but when trying to do a restore discovered that rmt0 not in bootlist(s). Tried to alter both the normal and service bootlists but system wont respond to F7(commit). Erased the service boolist then tried alter again, same result. Now have... (2 Replies)
Discussion started by: mooshkie
2 Replies

2. Shell Programming and Scripting

folder existing and file existing

I want to look into a folder to see if there are any folders within it. If there are, I need to check inside each folder to see if it contains a .pdf file So If /myserver/myfolder/ contains a folder AND that folder conatins a .pdf file do X Else do Z I may have multiple folders and... (4 Replies)
Discussion started by: crowman
4 Replies

3. Solaris

Add existing user into an existing group

Pre: no gpasswd/adduser there is just usermod can be used, also there is no -a option for usermod. How should I add a user into a group? (4 Replies)
Discussion started by: a2156z
4 Replies

4. Shell Programming and Scripting

Need help in printing a sql query in perl

Hi All, I have the following sql query select abcd from udbadm.log where xyz='1'. I have 16k queries similar to this with different values for xyz. I want to print the values of 'abcd' for each row. I have the following perl code, but not sure how i can print that particular... (1 Reply)
Discussion started by: userscript
1 Replies

5. Shell Programming and Scripting

insert pipes for existing and non-existing records

I have a source file like this, L4058S462 34329094 F51010141TK1070000483L4058S462 34329094 0232384840 381892 182 5690 L4058S462 34329094 F51020141FIRST CLEARING, LLC A/C 3432-9094 L4058S462 34329094 F51030141JOHAN HOLMQVIST ... (1 Reply)
Discussion started by: saravanamr
1 Replies

6. Programming

Error message: invalid types 'bool...' (array problem)

Hello everyone. I'm stuck with an error message that neither I nor any of my computer science peeps can understand. The program I wrote is meant to be a simple decimal to binary converter, but with this message it's more complicated than I thought. Here's the code: #include <iostream>... (2 Replies)
Discussion started by: qf_woodfox
2 Replies

7. Programming

Error message: invalid types 'bool...' (array problem)

Hello everyone. I'm stuck with an error message that neither I nor any of my computer science peeps can understand. The program I wrote is meant to be a simple decimal to binary converter, but with this message it's more complicated than I thought. Here's the code: #include <iostream>... (3 Replies)
Discussion started by: qf_woodfox
3 Replies

8. Shell Programming and Scripting

Alter existing script to work with longer file name

I have this script: #!/bin/sh for file in "$@" do ext=${file##*.} base=${file%.*} num=${base##*v} zeroes=${num%%*} num=${num#$zeroes} #remove leading zeros, or it uses octal num=$((num+1)) base=${base%v*} new=$(printf... (4 Replies)
Discussion started by: scribling
4 Replies

9. UNIX and Linux Applications

SQL - how to alter info of a cell in table

Hello, I am newbie on mysql and trying to edit my database from terminal under linux. What I need to do is to change the information written in a cell in table. Let me explain what I tried: $ mysql -u mysqluser -p $ show databases; $ USE catalogue; $ show tables ; $ select * from... (2 Replies)
Discussion started by: baris35
2 Replies

10. Programming

Bool vs char * conversion

I have a problem at make step to install a downloaded package consisted of different programs. In file included from kcdbext.cc:16:0: kcdbext.h: In member function �char* kyotocabinet::IndexDB::get(const char*, size_t, size_t*)’: kcdbext.h:1281:14: error: cannot convert �bool’ to... (3 Replies)
Discussion started by: yifangt
3 Replies
SQL::Translator::Parser::PostgreSQL(3pm)		User Contributed Perl Documentation		  SQL::Translator::Parser::PostgreSQL(3pm)

NAME
SQL::Translator::Parser::PostgreSQL - parser for PostgreSQL SYNOPSIS
use SQL::Translator; use SQL::Translator::Parser::PostgreSQL; my $translator = SQL::Translator->new; $translator->parser("SQL::Translator::Parser::PostgreSQL"); DESCRIPTION
The grammar was started from the MySQL parsers. Here is the description from PostgreSQL: Table: (http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=sql-createtable.html) CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ] | table_constraint } [, ... ] ) [ INHERITS ( parent_table [, ... ] ) ] [ WITH OIDS | WITHOUT OIDS ] where column_constraint is: [ CONSTRAINT constraint_name ] { NOT NULL | NULL | UNIQUE | PRIMARY KEY | CHECK (expression) | REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] and table_constraint is: [ CONSTRAINT constraint_name ] { UNIQUE ( column_name [, ... ] ) | PRIMARY KEY ( column_name [, ... ] ) | CHECK ( expression ) | FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ] [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] Index: (http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=sql-createindex.html) CREATE [ UNIQUE ] INDEX index_name ON table [ USING acc_method ] ( column [ ops_name ] [, ...] ) [ WHERE predicate ] CREATE [ UNIQUE ] INDEX index_name ON table [ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] ) [ WHERE predicate ] Alter table: ALTER TABLE [ ONLY ] table [ * ] ADD [ COLUMN ] column type [ column_constraint [ ... ] ] ALTER TABLE [ ONLY ] table [ * ] ALTER [ COLUMN ] column { SET DEFAULT value | DROP DEFAULT } ALTER TABLE [ ONLY ] table [ * ] ALTER [ COLUMN ] column SET STATISTICS integer ALTER TABLE [ ONLY ] table [ * ] RENAME [ COLUMN ] column TO newcolumn ALTER TABLE table RENAME TO new_table ALTER TABLE table ADD table_constraint_definition ALTER TABLE [ ONLY ] table DROP CONSTRAINT constraint { RESTRICT | CASCADE } ALTER TABLE table OWNER TO new_owner View table: CREATE [ OR REPLACE ] VIEW view [ ( column name list ) ] AS SELECT query AUTHORS
Ken Y. Clark <kclark@cpan.org>, Allen Day <allenday@ucla.edu>. SEE ALSO
perl(1), Parse::RecDescent. perl v5.14.2 2012-05-01 SQL::Translator::Parser::PostgreSQL(3pm)
All times are GMT -4. The time now is 01:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy