Showing results for 
Search instead for 
Did you mean: 

RE: [personal kdb+] Select a column mapped to a username

New Contributor
X-Originating-IP: Workspace Webmail 5.15.9Message-Id: <>From: "David Demner \(AquaQ\)" To: personal-kdbplus@googlegroups.comSubject: RE: [personal kdb+] Select a column mapped to a usernameDate: Thu, 29 Oct 2015 07:21:08 -0700Mime-Version: 1.0
Use #:

q)(1#upper .z.u)#t

-------- Original Message --------
Subject: [personal kdb+] Select a column mapped to a username
From: Roni Hoffman <>
Date: Thu, October 29, 2015 7:13 am
To: Kdb+ Personal Developers <>

I have table with columns for users.

ie. t:([]Dave:`$();Nick:`$())

I am wondering how to dynamically select the column that matches the current username using .z.u

I will have to consider string cases, using something like `$ssr[string .z.u;string .z.u;upper] to cast the entire username to upper and match it against the column name casted to upper as well.

Any ideas?

You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

New Contributor III
Thanks David

New Contributor III
Hmm sorry quick question, I am trying to pull a second column using that dynamic column name but not sure the syntax

exec Col from (`Col;upper .z.u)#t where upper .z.u=1b

results in type error

Never mind got using functional select.  Thanks.