Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Simple SQL Question

by Zecho (Hermit)
on May 08, 2003 at 20:23 UTC ( [id://256667]=perlquestion: print w/replies, xml ) Need Help??

Zecho has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Simple SQL Question
by artist (Parson) on May 08, 2003 at 20:46 UTC
    Making it a perl question:

    use SQL-Statement to parse and check the validity of your query.
    (untested)

    artist
    =======================
    Beautify your existence.

Re: Simple SQL Question
by chromatic (Archbishop) on May 08, 2003 at 20:33 UTC

    It's difficult to verify without knowing which database and which version of the database you're using.

    That said, it's pretty easy to verify an update by turning it into a select and running it against your test database. It's also often possible to run it through your database's query analyzer, which should tell you about syntax errors.

Re: Simple SQL Question
by TVSET (Chaplain) on May 08, 2003 at 21:51 UTC
    Firstly, some indent would be nice.

    Secondly, why cannot you just stick that SQL up the database and see what it will tell you. If you have an error in there, then take it one small step at a time.

    P.S.: ObfuSQL is something... :)

    Leonid Mamtchenkov aka TVSET

Re: Simple SQL Question
by Abigail-II (Bishop) on May 08, 2003 at 22:30 UTC
    It's invalid.

    Abigail (you don't tell where you want it to be valid, so I won't tell you where it is invalid. Not that this is a Perl question anyway).

Re: Simple SQL Question
by talexb (Chancellor) on May 09, 2003 at 14:40 UTC

    If your original code were rewritten as

    UPDATE AccountAuthorizationInformation INNER JOIN AccountStatus ON [AccountAuthorizationInformation].[Account_Authorization] = [AccountStatus].[Account_Authorization] SET AccountAuthorizationInformation.Settle_Date = [AccountStatus].[Status_Date] WHERE ( ( [AccountStatus].[Account_Authorization] = [AccountAuthorizationInformation].[Account_Authorization]) And ( [AccountAuthorizationInformation].[Settle_Date]='') )
    it would be clearer. Except for square brackets around the table and field names, it looks like SQL.

    Was that your question?

    And this has what to do with Perl?

    --t. alex
    Life is short: get busy!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://256667]
Approved by VSarkiss
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-23 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found